Skip to content

Commit

Permalink
[MLIR][TORCH] Add support for unsigned integer types
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekkhandelwal1 committed Nov 21, 2023
1 parent 03e8f99 commit d50d3aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Dialect/Torch/IR/TorchTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ static bool isValidTorchDtype(Type dtype) {
}
}
if (type.isUnsigned()) {
return type.getWidth() == 8 || type.getWidth() == 4;
for (unsigned width : {4, 8, 16, 32, 64}) {
if (type.getWidth() == width)
return true;
}
}
}
return false;
Expand Down

0 comments on commit d50d3aa

Please sign in to comment.