tvm-mali icon indicating copy to clipboard operation
tvm-mali copied to clipboard

Does TVM support RK3288?

Open wjtan99 opened this issue 6 years ago • 7 comments

Hi, I saw you do the benchmark test on RK3399. RK3288 has a Mali-T764 GPU. We tried it but the opencl has some problem recognizing the GPU. Do you have idea if TVM supports RK3288?

wjtan99 avatar Mar 15 '18 15:03 wjtan99

rk3288 is similar to rk3399, so tvm supports it. There maybe some problems in your environment configuration, like opencl driver, tvm build option.

Could you post your error message?

merrymercy avatar Mar 15 '18 17:03 merrymercy

Here is the error message

python -m tvm.exec.rpc_server --host 0.0.0.0 --port=9090 INFO:root:RPCServer: bind to 0.0.0.0:9090 INFO:root:RPCServer: connection from ('192.168.7.48', 33508) INFO:root:Connection from ('192.168.7.48', 33508) [01:12:39] src/runtime/rpc/rpc_server_env.cc:23: Upload /tmp/tmpSITYtx/net.tar... nbytes=421284 [01:12:54] src/runtime/opencl/opencl_device_api.cc:197: Initialize OpenCL platform 'ARM Platform' ERROR: The DDK is not compatible with any of the Mali GPUs on the system. The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched: /dev/mali0 detected as 0x750 r1p0 status 0 [01:12:54] src/runtime/opencl/opencl_device_api.cc:202: No OpenCL device any device matched given the options: gpu mode [01:12:54] src/runtime/opencl/opencl_device_api.cc:203: Now try OpenCL cpu mode ERROR: The DDK is not compatible with any of the Mali GPUs on the system. The DDK was built for 0x750 r0p0 status range [1..1], but none of the GPUs matched: /dev/mali0 detected as 0x750 r1p0 status 0 [01:12:54] src/runtime/opencl/opencl_device_api.cc:206: No OpenCL device any device matched given the options: cpu mode [01:12:54] src/runtime/rpc/rpc_session.cc:751: Shutdown... INFO:root:Finish serving ('192.168.7.48', 33508)****

wjtan99 avatar Mar 16 '18 01:03 wjtan99

“make USE_OPENCL=1 LLVM_CONFIG=llvm-config-4.0 -j4”

wjtan99 avatar Mar 16 '18 01:03 wjtan99

It seems the problem is your opencl driver, not the tvm runtime.

merrymercy avatar Mar 16 '18 02:03 merrymercy

When I run the test on RK3288, I get the error message:

Traceback (most recent call last): File "mali_imagenet_bench.py", line 109, in run_case(args.model, args.dtype) File "mali_imagenet_bench.py", line 55, in run_case module = runtime.create(graph, rlib, ctx) File "/work/python-tvm/local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-x86_64.egg/tvm/contrib/graph_runtime.py", line 42, in create return GraphModule(fcreate(graph_json_str, hmod, device_type, device_id), ctx) File "/work/python-tvm/local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-x86_64.egg/tvm/_ffi/_ctypes/function.py", line 183, in call ctypes.byref(ret_val), ctypes.byref(ret_tcode))) File "/work/python-tvm/local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-x86_64.egg/tvm/_ffi/base.py", line 66, in check_call raise TVMError(py_str(_LIB.TVMGetLastError())) tvm._ffi.base.TVMError: Except caught from RPC call: [02:02:46] src/runtime/graph/graph_runtime.cc:485: Check failed: storage_id >= 0 (-1 vs. 0) Do not support runtime shape op

Stack trace returned 10 entries: [bt] (0) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(dmlc::StackTraceabi:cxx11+0x37) [0xb5c9fa4c] [bt] (1) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x21) [0xb5ca011a] [bt] (2) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::GraphRuntime::SetupStorage()+0x50f) [0xb5f601c0] [bt] (3) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::GraphRuntimeCreate(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tvm::runtime::Module, int, int)+0x1c1) [0xb5f60c92] [bt] (4) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(+0x4321bc) [0xb5f611bc] [bt] (5) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::RPCSession::EventHandler::HandlePackedCall()+0x3d3) [0xb5f4ad5c] [bt] (6) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::RPCSession::EventHandler::SwitchToState(tvm::runtime::RPCSession::EventHandler::State)+0x1a7) [0xb5f4e7f8] [bt] (7) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::RPCSession::EventHandler::HandleRecvPackedSeqArg()+0x20d) [0xb5f4efce] [bt] (8) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::RPCSession::EventHandler::HandleNextEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0x1d7) [0xb5f4f474] [bt] (9) /home/firefly/.local/lib/python2.7/site-packages/tvm-0.2.0-py2.7-linux-armv7l.egg/tvm/libtvm.so(tvm::runtime::RPCSession::HandleUntilReturnEvent(tvm::runtime::TVMRetValue*, bool, tvm::runtime::PackedFunc const*)+0xf7) [0xb5f4bf18]

@merrymercy Could you give some help ?

liurs1990 avatar Mar 20 '18 02:03 liurs1990

cc @tqchen

merrymercy avatar Mar 20 '18 10:03 merrymercy

Please use the latest nnvm along with latest tvm

tqchen avatar Mar 20 '18 10:03 tqchen