Skip to content

Commit f87d117

Browse files
henrylhtsangpytorchmergebot
authored andcommitted
redo of [Inductor][Cutlass] verify cutlass has cache_file attribute before moving...resolves cutlass cute exception (pytorch#158206)
trying to land pytorch#156672 Pull Request resolved: pytorch#158206 Approved by: https://github.com/lessw2020, https://github.com/Skylion007
1 parent 5633283 commit f87d117

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

torch/_inductor/codegen/cuda/cutlass_utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ def move_cutlass_compiled_cache() -> None:
4545
else:
4646
import cutlass as python_cutlass # type: ignore[import-not-found] # noqa: F401
4747

48-
if not os.path.exists(python_cutlass.CACHE_FILE):
48+
# Check if the CACHE_FILE attribute exists in python_cutlass and if the file exists
49+
if not hasattr(python_cutlass, "CACHE_FILE") or not os.path.exists(
50+
python_cutlass.CACHE_FILE
51+
):
4952
return
5053

5154
try:

0 commit comments

Comments
 (0)