[inductor] Include types and size hints in MultiKernel cache key (#142349)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/142349
Approved by: https://github.com/eellison, https://github.com/shunting314
This commit is contained in:
Jason Ansel
2024-12-09 22:08:13 -08:00
committed by PyTorch MergeBot
parent e2d47a133b
commit cf46eb3bf5

View File

@ -313,7 +313,14 @@ class MultiKernelCall:
self._recorded = False
def cache_file_path(self):
key = code_hash(",".join([k.fn.cache_key for k in self.kernels]))
key = code_hash(
",".join(
[
f"{k.fn.cache_key}{k.size_hints!r}{k.triton_meta!r}"
for k in self.kernels
]
)
)
_, _, path = get_path(key, "picked_kernel")
return pathlib.Path(path)