Skip to content

Commit bf54e16

Browse files
committed
Add backward compatibility for TensorDescriptor
This commits adds a guard around tensor_descriptor import in warp spec for backward compatibility Signed-off-by: Bryan Bowyer <[email protected]>
1 parent 0d8be61 commit bf54e16

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tritonbench/operators/gemm/warp_spec_persistent_matmul.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
import torch
1010
import triton
1111
import triton.language as tl
12-
from triton.tools.tensor_descriptor import TensorDescriptor
12+
13+
# Conditional import for TensorDescriptor - only available in newer Triton versions
14+
try:
15+
from triton.tools.tensor_descriptor import TensorDescriptor
16+
except ModuleNotFoundError:
17+
TensorDescriptor = None
18+
1319

1420
# TODO: Add proton support
1521

0 commit comments

Comments
 (0)