Hello, there is a error when I run the tests test_benchmark_topi_conv2d.py on FPGA pynq-Z1.
My setting is completely follow the VTA FPGA pynq-z1 setup.
However, when I run the test test_benchmark_topi_conv2d.py from my host, I get the following errors:
key=resnet-cfg[1]
Conv2DWorkload(batch=1, height=56, width=56, in_filter=64, out_filter=64, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=1, wstride=1)
----- CONV2D CPU End-to-End Test-------
Traceback (most recent call last):
File “test_benchmark_topi_conv2d.py”, line 268, in
test_cpu_conv2d()
File “test_benchmark_topi_conv2d.py”, line 134, in test_cpu_conv2d
vta.testing.run(_run)
File “/home/fdsoc/Documents/tvm/vta/python/vta/testing/util.py”, line 45, in run
run_func(env, remote)
File “test_benchmark_topi_conv2d.py”, line 129, in _run
run_cpu_conv2d(env, remote, key, batch_size, wl)
File “test_benchmark_topi_conv2d.py”, line 103, in run_cpu_conv2d
conv_normal(False)
File “test_benchmark_topi_conv2d.py”, line 99, in conv_normal
cost = verify(s, True)
File “test_benchmark_topi_conv2d.py”, line 72, in verify
f = remote.load_module(“conv2d.o”)
File “/home/fdsoc/Documents/tvm/python/tvm/rpc/client.py”, line 119, in load_module
return base._LoadRemoteModule(self._sess, path)
File “/home/fdsoc/Documents/tvm/python/tvm/_ffi/_ctypes/function.py”, line 185, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File “/home/fdsoc/Documents/tvm/python/tvm/_ffi/base.py”, line 68, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: Except caught from RPC call: TVMCall CFunc Error:
Traceback (most recent call last):
File “/home/xilinx/tvm/python/tvm/_ffi/_ctypes/function.py”, line 55, in cfun
rv = local_pyfunc(*pyargs)
File “/home/xilinx/tvm/vta/python/vta/exec/rpc_server.py”, line 44, in load_module
return _load_module(file_name)
File “/home/xilinx/tvm/python/tvm/_ffi/_ctypes/function.py”, line 185, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File “/home/xilinx/tvm/python/tvm/_ffi/base.py”, line 68, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: TVMCall CFunc Error:
Traceback (most recent call last):
File “/home/xilinx/tvm/python/tvm/_ffi/_ctypes/function.py”, line 55, in cfun
rv = local_pyfunc(*pyargs)
File “/home/xilinx/tvm/python/tvm/rpc/server.py”, line 50, in load_module
m = _load_module(path)
File “/home/xilinx/tvm/python/tvm/module.py”, line 216, in load
_cc.create_shared(path + “.so”, path)
File “/home/xilinx/tvm/python/tvm/contrib/cc.py”, line 33, in create_shared
_linux_shared(output, objects, options, cc)
File “/home/xilinx/tvm/python/tvm/contrib/cc.py”, line 58, in _linux_shared
raise RuntimeError(msg)
RuntimeError: Compilation error:
/usr/bin/arm-linux-gnueabihf-ld: /tmp/tmpz1_us39g/conv2d.o: relocation R_ARM_MOVW_ABS_NC against __TVMAPISetLastError' can not be used when making a shared object; recompile with -fPIC /usr/bin/arm-linux-gnueabihf-ld: /tmp/tmpz1_us39g/conv2d.o(.text+0x79c): unresolvable R_ARM_CALL relocation against symbol
__aeabi_idiv@@GCC_3.5’
/usr/bin/arm-linux-gnueabihf-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
I can not figure it out! I need help!