Skip to content

Commit 0f5dbbe

Browse files
Revert "Fix onnx.If lowering with scalar condition tensor (#3846)"
This reverts commit 032a636.
1 parent 9188846 commit 0f5dbbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void mlir::torch::onnx_c::populateDefaultDomainGtoP(
180180

181181
auto conditionType =
182182
cast<Torch::ValueTensorType>(conditionTensor.getType());
183-
if (!conditionType || conditionType.getSizes().size() > 1)
183+
if (!conditionType || conditionType.getSizes().size() != 1)
184184
return rewriter.notifyMatchFailure(
185185
binder.op, "condition must have one single element per "
186186
"https://onnx.ai/onnx/operators/onnx__If.html");

0 commit comments

Comments
 (0)