Hi Everyone,
I am encountering an issue when I try to get tvm host work with my vta-device - A terasic stratix 10 FPGA board. I had vta build on the device side with “set(USE_VTA_FPGA ON)” option. I got rpc_server up running. like below: *terasic@localhost:/media/workspace/tvm$ apps/vta_rpc/start_rpc_server.sh * INFO:RPCServer:bind to 0.0.0.0:9091
Then I try "python vta/tests/python/integration/test_benchmark_topi_conv2d.py " on the host side, The CPU convd2D portion passed test, however, the program stopped when it try to start vta portiaion. Here is lwhat I got on host side:
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) CPU CONV2D TEST PASSED: Time cost = 0.0165433 sec/op, 13.9761 GOPS Conv2DWorkload(batch=1, height=56, width=56, in_filter=64, out_filter=128, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.0087746 sec/op, 13.175 GOPS Conv2DWorkload(batch=1, height=56, width=56, in_filter=64, out_filter=128, hkernel=1, wkernel=1, hpad=0, wpad=0, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.0013579 sec/op, 9.45951 GOPS Conv2DWorkload(batch=1, height=28, width=28, in_filter=128, out_filter=128, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=1, wstride=1) CPU CONV2D TEST PASSED: Time cost = 0.015791 sec/op, 14.6419 GOPS Conv2DWorkload(batch=1, height=28, width=28, in_filter=128, out_filter=256, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.00878055 sec/op, 13.1661 GOPS Conv2DWorkload(batch=1, height=28, width=28, in_filter=128, out_filter=256, hkernel=1, wkernel=1, hpad=0, wpad=0, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.0012507 sec/op, 10.2703 GOPS Conv2DWorkload(batch=1, height=14, width=14, in_filter=256, out_filter=256, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=1, wstride=1) CPU CONV2D TEST PASSED: Time cost = 0.0136664 sec/op, 16.9182 GOPS Conv2DWorkload(batch=1, height=14, width=14, in_filter=256, out_filter=512, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.0115497 sec/op, 10.0094 GOPS Conv2DWorkload(batch=1, height=14, width=14, in_filter=256, out_filter=512, hkernel=1, wkernel=1, hpad=0, wpad=0, hstride=2, wstride=2) CPU CONV2D TEST PASSED: Time cost = 0.00133672 sec/op, 9.60939 GOPS Conv2DWorkload(batch=1, height=7, width=7, in_filter=512, out_filter=512, hkernel=3, wkernel=3, hpad=1, wpad=1, hstride=1, wstride=1) CPU CONV2D TEST PASSED: Time cost = 0.0167759 sec/op, 13.7823 GOPS Traceback (most recent call last): File “vta/tests/python/integration/test_benchmark_topi_conv2d.py”, line 311, in test_conv2d(device=“vta”) File “vta/tests/python/integration/test_benchmark_topi_conv2d.py”, line 306, in test_conv2d vta.testing.run(_run) File “/media/tliu/ECE699/tvm-repo/dev-tvm-working/vta/python/vta/testing/utils.py”, line 74, in run run_func(env, remote) File “vta/tests/python/integration/test_benchmark_topi_conv2d.py”, line 297, in _run program_fpga(remote, bitstream=None) File “/media/tliu/ECE699/tvm-repo/dev-tvm-working/vta/python/vta/rpc_client.py”, line 64, in program_fpga fprogram = remote.get_function(“tvm.contrib.vta.init”) File “/media/tliu/ECE699/tvm-repo/dev-tvm-working/python/tvm/rpc/client.py”, line 73, in get_function return self._sess.get_function(name) File “/media/tliu/ECE699/tvm-repo/dev-tvm-working/python/tvm/runtime/module.py”, line 91, in get_function raise AttributeError(“Module has no function ‘%s’” % name) AttributeError: Module has no function ‘tvm.contrib.vta.init’
I had a look at the device side, and I have added coresponding entry for ‘tvm.contrib.vta.init’ for my device in rpc_server.py module under tvm/vta/python/vta/exec/ folder.
Anybody had seen this before? I was stopped here for few days, I would appreciate any suggestion, comment, and helps!
Thanks,
Tong