We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 777cc74 commit a421f57Copy full SHA for a421f57
1 file changed
onnxscript/function_libs/torch_lib/ops/core.py
@@ -1540,7 +1540,7 @@ def aten_cat(tensors: Sequence[TTensor], dim: int = 0) -> TTensor:
1540
if tensor is None:
1541
continue
1542
# Remove empty tensors
1543
- if tensor.shape is not None and 0 in tensor.shape:
+ if tensor.shape == (0,):
1544
1545
filtered_tensors.append(tensor)
1546
assert filtered_tensors, "aten::cat received all None or empty tensors"
0 commit comments