Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhekunz2 committed Nov 2, 2023
1 parent 5ed54af commit 6724064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Dialect/Torch/IR/TorchOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ static Value getScalarFloatValue(Value input, Location loc,
return nullptr;

Type inputDtype = inputTensorType.getOptionalDtype();
if (!inputDtype || !inputDtype.isF16() || !inputDtype.isF32() ||
!inputDtype.isF64())
if (!inputDtype ||
(!inputDtype.isF16() && !inputDtype.isF32() && !inputDtype.isF64()))
return nullptr;

std::optional<unsigned> inputRank = getTensorRank(input);
Expand Down

0 comments on commit 6724064

Please sign in to comment.