8000 [Cutlass] Fix int check in example tensor creation (#152306) · pytorch/pytorch@72273be · GitHub
[go: up one dir, main page]

Skip to content

Commit 72273be

Browse files
mlazospytorchmergebot
authored andcommitted
[Cutlass] Fix int check in example tensor creation (#152306)
Pull Request resolved: #152306 Approved by: https://github.com/Skylion007, https://github.com/eellison ghstack dependencies: #152305
1 parent 4293a60 commit 72273be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torch/_inductor/codegen/cuda/cutlass_lib_extensions/evt_extensions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ def create_example_tensors(
6969
def cutlass_tensor_from_buffer(buffer: Buffer) -> CutlassTensor:
7070
shape = buffer.get_layout().size
7171
stride = buffer.get_layout().stride
72-
assert all(isinstance(x, int) for x in buffer.get_layout().stride), (
72+
73+
assert all(x.is_integer for x in shape), (
7374
f"{buffer.get_name()}'s shape {shape} contains symints which aren't supported for cutlass EVT"
7475
)
75-
assert all(isinstance(x, int) for x in buffer.get_layout().stride), (
76+
assert all(x.is_integer for x in stride), (
7677
f"{buffer.get_name()}'s stride {stride} contains symints which aren't supported for cutlass EVT"
7778
)
7879
shape = tuple(int(x) for x in shape)

0 commit comments

Comments
 (0)
0