We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have a lot of tests in SHARK-TestSuite/iree_tests/onnx/node/generated/ like https://github.com/nod-ai/SHARK-TestSuite/blob/main/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir that uses a dim specified as an argument to the func.func & loaded from a npy file.
Since torch_mlir requires a lot of dims to be constant in order to compile, these tests fail, causing a lot of false positives.
I wonder if there is some sort of mass solution that could convert the args to onnx.Constant like:
└──╼ $git diff ./model.mlir diff --git a/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir b/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir index 182a1fc6..8ee10c96 100644 --- a/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir +++ b/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir @@ -1,5 +1,6 @@ module { - func.func @test_reduce_l1_do_not_keepdims_example(%arg0: !torch.vtensor<[3,2,2],f32>, %arg1: !torch.vtensor<[1],si64>) -> !torch.vtensor<[3,2],f32> attributes {torch.onnx_meta.ir_version = 8 : si64, torch.onnx_meta.opset_version = 18 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} { + func.func @test_reduce_l1_do_not_keepdims_example(%arg0: !torch.vtensor<[3,2,2],f32>) -> !torch.vtensor<[3,2],f32> attributes {torch.onnx_meta.ir_version = 8 : si64, torch.onnx_meta.opset_version = 18 : si64, torch.onnx_meta.producer_name = "backend-test", torch.onnx_meta.producer_version = ""} { + %arg1 = "torch.operator"() <{name = "onnx.Constant"}> {torch.onnx.value = dense<2> : tensor<1xsi64>} : () -> !torch.vtensor<[1],si64> %none = torch.constant.none %0 = torch.operator "onnx.ReduceL1"(%arg0, %arg1) {torch.onnx.keepdims = 0 : si64} : (!torch.vtensor<[3,2,2],f32>, !torch.vtensor<[1],si64>) -> !torch.vtensor<[3,2],f32> return %0 : !torch.vtensor<[3,2],f32>
spicifically, instead of taking arg1 from the func arguments, we have:
%arg1 = "torch.operator"() <{name = "onnx.Constant"}> {
which causes the test cases to pass
The text was updated successfully, but these errors were encountered:
Don't change the tests to make them pass :P
Those sound like true positives, not false positives? (edit: or true negatives vs false negatives? 🤔)
Sorry, something went wrong.
Yup that makes sense. Opening torch-mlir issue to fix this llvm/torch-mlir#3573
Nothing to do here, closing this issue. (and iree_tests/onnx/node moved to https://github.com/iree-org/iree-test-suites)
No branches or pull requests
We have a lot of tests in SHARK-TestSuite/iree_tests/onnx/node/generated/ like https://github.com/nod-ai/SHARK-TestSuite/blob/main/iree_tests/onnx/node/generated/test_reduce_l1_do_not_keepdims_example/model.mlir that uses a dim specified as an argument to the func.func & loaded from a npy file.
Since torch_mlir requires a lot of dims to be constant in order to compile, these tests fail, causing a lot of false positives.
I wonder if there is some sort of mass solution that could convert the args to onnx.Constant like:
spicifically, instead of taking arg1 from the func arguments, we have:
which causes the test cases to pass
The text was updated successfully, but these errors were encountered: