Skip to content

Commit e409fe2

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 e409fe2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tritonbench/operators/gemm/warp_spec_persistent_matmul.py

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

1419
# TODO: Add proton support
1520

0 commit comments

Comments
 (0)