Skip to content

Commit a51208c

Browse files
yf225pytorchmergebot
authored andcommitted
Check cluster_dims attribute exists before access (pytorch#167187)
Error in Helion CI's AMD job: https://github.com/pytorch/helion/actions/runs/19118581048/job/54633730633 ``` > (binary.metadata.num_ctas, *binary.metadata.cluster_dims) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ if hasattr(binary, "metadata") else () ) ), "function": get_first_attr(binary, "function", "cu_function"), "runner": get_first_attr(binary, "run", "c_wrapper"), "math": math_lib, "torch": torch_lib, "triton": triton_lib, } E torch._inductor.exc.InductorError: AttributeError: 'KernelMetadata' object has no attribute 'cluster_dims' ``` Pull Request resolved: pytorch#167187 Approved by: https://github.com/oulgen
1 parent ed4aa44 commit a51208c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torch/_inductor/runtime/triton_heuristics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,8 @@ def make_launcher(self) -> LauncherType:
18511851
else (
18521852
(binary.metadata.num_ctas, *binary.metadata.cluster_dims)
18531853
if hasattr(binary, "metadata")
1854+
and hasattr(binary.metadata, "num_ctas")
1855+
and hasattr(binary.metadata, "cluster_dims")
18541856
else ()
18551857
)
18561858
),

0 commit comments

Comments
 (0)