[AOTI] Refactor additional_files generation (#141979)

Summary: https://github.com/pytorch/pytorch/pull/140675 adds logic to collect all the generated cubin file paths into an additional_files list, but the collection should only happen when DeferredGpuKernelLine is materialized. This is to prepare for one-pass AOTI CUDA codegen.

Differential Revision: [D66718227](https://our.internmc.facebook.com/intern/diff/D66718227)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/141979
Approved by: https://github.com/chenyang78
ghstack dependencies: #141388, #141387
This commit is contained in:
Bin Bao
2024-12-04 14:27:30 -08:00
committed by PyTorch MergeBot
parent 7e49da6077
commit 2fd8a7be71
2 changed files with 25 additions and 33 deletions

View File

@ -1783,12 +1783,12 @@ class PythonWrapperCodegen(CodeGen):
def generate_default_grid(
self,
kernel_name: str,
grid: List[Any],
grid_args: List[Any],
gpu: bool = True,
grid_callable: Optional[Callable[..., Any]] = None,
**grid_extra_kwags,
):
return grid
return grid_args
def prepare_triton_kernel_call(self, device_index, call_args):
def wrap_arg(arg):