mirror of https://github.com/llvm/torch-mlir
[onnx] Fix onnx.cast cases between int32 and int64 (#2982)
2 modifications: 1. torch.int64 is enum 4 in TORCH_DTYPE_TO_INT 2. add int32 supportpull/3032/head
parent
f34c187ac4
commit
d8a52e82c2
|
@ -43,8 +43,10 @@ static int64_t onnxDtypeIntToTorchDtypeInt(int64_t dtypeIntOnnx) {
|
|||
switch (dtypeIntOnnx) {
|
||||
case 1:
|
||||
return 6; // float
|
||||
case 6:
|
||||
return 3; // int32
|
||||
case 7:
|
||||
return 5; // int64
|
||||
return 4; // int64
|
||||
case 9:
|
||||
return 11; // bool
|
||||
case 10:
|
||||
|
|
|
@ -1883,10 +1883,7 @@ ONNX_XFAIL_SET = {
|
|||
"BucketizeTensorOutInt32RightModule_basic",
|
||||
"ElementwiseToDtypeI64ToI8Module_basic",
|
||||
"ElementwiseToDtypeI64ToUI8Module_basic",
|
||||
"HBC_basic",
|
||||
"QuantizedMLP_basic",
|
||||
"TypeConversionI1ToI32Module_basic",
|
||||
"TypeConversionI64ToI32Module_basic",
|
||||
|
||||
# Failure - onnx_lowering: onnx.Clip
|
||||
"NormalizeModule_basic",
|
||||
|
|
Loading…
Reference in New Issue