Actually I haven’t completed turning on web. I still have jobs to make it work.
I think turning need two process.
- build network connection between web and local machine. so that I could upload and transform params or model and then run model on web, which have already worked.
- build the new model or module by localbuilder.
After turning, I found the library cannot run model on web. The error message is “no such function in module: fused_layout_transform_42”. It looks like there’s some incorrect in the process of building library.
Here is my code, firstly I use custom build_func to build wasm library.
builder=autotvm.LocalBuilder( n_parallel = 1, # build_func = “wasm” build_func=fcompile )
def fcompile(*args): emcc.create_tvmjs_wasm(args[0], args[1]) fcompile.output_format = “wasm”
Durning turning I found that the library is smaller than these way
with tvm.transform.PassContext(opt_level=3): graph, lib, params = relay.build(mod, target, params=params) lib.export_library(wasm_path, emcc.create_tvmjs_wasm)
Any suggestion about that?