Closed vivekkhandelwal1 closed 1 month ago
As mentioned in the sync earlier, I think that the issue is because of the flag "iree-input-demote-i64-to-i32", which is turned on by default. Try running with iree compile args as -ica=""
or with mode -m cl-onnx-iree
and see if the issue persists.
We should figure out why the numerics are incorrect specifically when i64 inputs are used with this flag.
Yeah, I just checked that this gives correct numerics without --iree-input-demote-i64-to-i32
.
We can remove this flag from the default.
Hi, I was trying to run an operator test through the SHARK-Testsuite and I found that the test result generated through the test suite does not match the golden result. While the same test, when compiled through IREE, and executed manually gives the results matching the golden results. I think there's some issue with the way test results are generated. I'm sharing the test script and the steps to repro the issue.
Script to run the test:
Add this script in the
/SHARK-TestSuite/alt_e2eshark/onnx_tests/operators/
directory with a name let's sayslice.py
and then addfrom .slice import *
in/SHARK-TestSuite/alt_e2eshark/onnx_tests/operators/model.py
. Since the test is registered now, you can run the test usingpython ./run.py -t slice_test -v
, now it will generate the numerics failed issue with the values present in/SHARK-TestSuite/alt_e2eshark/test-run/slice_test/inference_comparison.log
.If you run this test manually, using the torch onnx IR present in the
test-run/slice_test
directory, you will find out that the results generated are same as the golden results.To compile and run this manually, run the following: 1.)
iree-compile --iree-hal-target-backends=llvm-cpu test-run/gather_test/model.torch_onnx.mlir -o slice_test.vmfb
2.)iree-run-module --module=slice_test.vmfb --device=local-task --input=1xi64=4