cbingdu opened a new issue, #16953:
URL: https://github.com/apache/tvm/issues/16953

   
   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 <module>
       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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to