Open cbingdu opened 7 months ago
Thanks for participating in the TVM community! We use https://discuss.tvm.ai for any general usage questions and discussions. The issue tracker is used for actionable items such as feature proposals discussion, roadmaps, and bug tracking. You are always welcomed to post on the forum first 😸
onnx_model = onnx.load(path_onnx)
model_shape = {"input": [1,3,224,224]} model, params = relay.frontend.from_onnx(onnx_model, model_shape)
target = "llvm -mtriple=mipsel-linux-gnu" compiler = "path/to/mips-linux-gnu/bin/mips-linux-gnu-gcc"
with tvm.transform.PassContext(opt_level=3): lib = relay.build(model, target=target, params=params) lib.export_library(args.tvm, cc=compiler, options=options)
Traceback (most recent call last): File "utils/tvm_convert.py", line 164, in
main()
File "utils/tvm_convert.py", line 154, in main
lib.export_library(args.tvm, cc=compiler, options=options)
File "/home/ducuibing/anaconda3/envs/tvm/lib/python3.8/site-packages/tvm-0.16.dev0-py3.8-linux-x86_64.egg/tvm/relay/backend/executor_factory.py", line 203, in export_library
return self.module.export_library(file_name, fcompile=fcompile, addons=addons, kwargs)
File "/home/ducuibing/anaconda3/envs/tvm/lib/python3.8/site-packages/tvm-0.16.dev0-py3.8-linux-x86_64.egg/tvm/runtime/module.py", line 624, in export_library
return fcompile(file_name, files, kwargs)
File "/home/ducuibing/anaconda3/envs/tvm/lib/python3.8/site-packages/tvm-0.16.dev0-py3.8-linux-x86_64.egg/tvm/contrib/cc.py", line 94, in create_shared
_linux_compile(output, objects, options, cc, cwd, ccache_env, compile_shared=True)
File "/home/ducuibing/anaconda3/envs/tvm/lib/python3.8/site-packages/tvm-0.16.dev0-py3.8-linux-x86_64.egg/tvm/contrib/cc.py", line 371, in _linux_compile
raise RuntimeError(msg)
RuntimeError: Compilation error:
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: /tmp/tmp0kg2pyv0/lib0.o: linking -mnan=legacy module with previous -mnan=2008 modules
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: Warning: ../weights/local/yolov8n-tmp.so uses -mgp32 -mfp64 (set by /home/ducuibing/envs/mips-linux-gnu/bin/../mips-linux-gnu/libc/mfp64/usr/lib/crti.o), /tmp/tmp0kg2pyv0/lib0.o uses -mdouble-float
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: failed to merge target specific data of file /tmp/tmp0kg2pyv0/lib0.o
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: /tmp/tmp0kg2pyv0/devc.o: linking -mnan=legacy module with previous -mnan=2008 modules
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: Warning: ../weights/local/yolov8n-tmp.so uses -mgp32 -mfp64 (set by /home/ducuibing/envs/mips-linux-gnu/bin/../mips-linux-gnu/libc/mfp64/usr/lib/crti.o), /tmp/tmp0kg2pyv0/devc.o uses -mdouble-float
/home/ducuibing/envs/mips-linux-gnu/bin/../lib/gcc/mips-linux-gnu/7.2.0/../../../../mips-linux-gnu/bin/ld: failed to merge target specific data of file /tmp/tmp0kg2pyv0/devc.o
collect2: error: ld returned 1 exit status
Command line: /home/ducuibing/envs/mips-linux-gnu/bin/mips-linux-gnu-gcc -shared -fPIC -o ../weights/local/yolov8n-tmp.so /tmp/tmp0kg2pyv0/lib0.o /tmp/tmp0kg2pyv0/devc.o