mirror of https://github.com/llvm/torch-mlir
[MLIR][TORCH] Add support for unsigned integer types
Refer: https://github.com/pytorch/pytorch/issues/58734pull/2590/head
parent
03e8f99730
commit
d50d3aa5e7
|
@ -200,7 +200,10 @@ static bool isValidTorchDtype(Type dtype) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type.isUnsigned()) {
|
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;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue