-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
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
[Bug] Using AOT with UMA and TFLITE #12410
Comments
this looks odd--it's late for today for me to investigate but hopefully we can look into it next week. |
Seems the bug is in the lowering step from relay_prim_func to tir_prim_func. When collecting the input arguments, the order gets messed up. By replacing the function by
everything works perfectly fine for all the test case we provided including the tflite import Does anyone know if it is sufficient to rely on the |
There was a flaw in uma_lower (see issue #12410) that lead in some case to a different argument ordering of the cached_func and the Relay function. This results in an incorrect lowering of the primfunc and eventually a wrong result of a run-time error, in some cases. This commit adds code to correct the described misbehavior and a unit test case to check this end-to-end functionality with a TFLITE model.
@MichaelJKlaiber is this one fixed? |
yes, the bugfix is in main |
There was a flaw in uma_lower (see issue apache#12410) that lead in some case to a different argument ordering of the cached_func and the Relay function. This results in an incorrect lowering of the primfunc and eventually a wrong result of a run-time error, in some cases. This commit adds code to correct the described misbehavior and a unit test case to check this end-to-end functionality with a TFLITE model.
Hi everyone,
found a possible issue.
When executing a testcase using UMA and generating the test .c files via aot.py, it seems that the pointers of the offloaded functions are not in the right order.
Can anyone help?
Thanks,
Michael
CC: @cgerum @PaulPalomeroBernardo @manupa-arm @areusch @lhutton1 @d-smirnov @mehrdadh @SebastianBoblest @sezgin1947
Expected behavior
Correct execution of provided NN imported from TFLITE file.
Actual behavior
Segmentation fault, due to mixed up pointers in generated file.
In particular: in default_lib2.c the pointers for placeholder_1, placeholder are mixed up
Environment
Ubuntu 18.04
TVM c3c7c4c
Steps to reproduce
Run tests/python/contrib/test_uma/test_uma_pipeline.py from this branch
https://github.com/MichaelJKlaiber/tvm/tree/issue/uma-tflite
Generated file looks like this:
when changing the function signature manually to
TVM_DLL int32_t tvmgen_default_vanilla_accelerator_main_0(float* placeholder_1, float* placeholder, float* T_matmul_NT, uint8_t* global_const_workspace_4_var, uint8_t* global_workspace_5_var)
the test is successful
The text was updated successfully, but these errors were encountered: