You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As some people and I mentioned in #6816, the currently TVM cannot support wasm32 target well using Rust APIs. It can run into this error: wasm trap: indirect call type mismatch.
This error originates in the incorrect extern function definition in rust/tvm-sys/src/lib.rs:
However, the correct definition in C is from include/tvm/runtime/c_backend_api.h:
/*! * \brief Signature for backend functions exported as DLL. * * \param args The arguments * \param type_codes The type codes of the arguments * \param num_args Number of arguments. * \param out_ret_value The output value of the the return value. * \param out_ret_tcode The output type code of the return value. * \param resource_handle Pointer to associated resource. * * \return 0 if success, -1 if failure happens, set error via TVMAPISetLastError. */typedefint (*TVMBackendPackedCFunc)(TVMValue*args, int*type_codes, intnum_args,
TVMValue*out_ret_value, int*out_ret_tcode,
void*resource_handle);
Here is an additional parameter, void* resource_handle. It seems people forgot to update the Rust interface. My previous issue(#8439) is also related to this error.
As some people and I mentioned in #6816, the currently TVM cannot support
wasm32
target well using Rust APIs. It can run into this error:wasm trap: indirect call type mismatch
.This error originates in the incorrect extern function definition in
rust/tvm-sys/src/lib.rs
:However, the correct definition in C is from
include/tvm/runtime/c_backend_api.h
:Here is an additional parameter,
void* resource_handle
. It seems people forgot to update the Rust interface. My previous issue(#8439) is also related to this error.@mssun and @m4sterchain are also interested in this issue.
The text was updated successfully, but these errors were encountered: