Error while running Tvm on Android with OpenCL
See original GitHub issueAm trying to run android rpc test script (https://github.com/dmlc/tvm/tree/master/apps/android_rpc) “Build with OpenCL” with my following environment with OpenCL enable in make/config.mk.
Environment : Laptop:: Description: Ubuntu 17.10 Release: 17.10 Target:: Huawei Mate 9 Mali G71 GPU
Error :
xxxxxxx@Dayananda:~/shared-windows7/nnvm/nnvm/tvm/apps/android_rpc$ python tests/android_rpc_test.py
TVM: Initializing cython mode...
[16:03:39] src/runtime/opencl/opencl_device_api.cc:190: No OpenCL platform matched given existing options ...
Traceback (most recent call last):
File "tests/android_rpc_test.py", line 75, in <module>
test_rpc_module()
File "tests/android_rpc_test.py", line 34, in test_rpc_module
f = tvm.build(s, [A, B], "opencl", target_host=target, name="myadd")
File "/home/xxxxxxx/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/build_module.py", line 449, in build
mdev = codegen.build_module(fdevice, str(target_device))
File "/home/xxxxxxx/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "/home/xxxxxxx/.local/lib/python3.6/site-packages/tvm-0.2.0-py3.6-linux-x86_64.egg/tvm/_ffi/function.py", line 255, in my_api_func
return flocal(*args)
File "tvm/_ffi/_cython/./function.pxi", line 264, in core.FunctionBase.__call__
File "tvm/_ffi/_cython/./function.pxi", line 213, in core.FuncCall
File "tvm/_ffi/_cython/./function.pxi", line 205, in core.FuncCall3
File "tvm/_ffi/_cython/./base.pxi", line 131, in core.CALL
tvm._ffi.base.TVMError: b'[16:03:39] src/runtime/opencl/opencl_module.cc:94: Check failed: workspace_->context != nullptr No OpenCL device
Note : For compilation success purpose libOpenCl.so is pointing with “/usr/lib/x86_64-linux-gnu/libOpenCL.so.1”
Questions::
- How to resolve this problem?
- “Build with OpenCL” tutorial i couldn’t find any much information related to OpenCl installation??
- Why tvm.build is depending on host libOpenCl.so?
tvm.build with CPU is success but tvm.build with OPENCL is failure.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Error while running Tvm on Android with OpenCL #921 - GitHub
TVM uses a cross compiler. For android, you will need to download specific OpenCL library from the vendor or find it in your...
Read more >Error while enabling OpenCL on TVM Android Demo Application
Dear All , I am trying to run TVM compiled GPU models on Android Device.
Read more >[Apache TVM Discuss] [Questions] Check failed: ret == 0
I need to implement opencl operator resize, I modified the function check_target() in tests/python/topi/python/test_topi_image.py,The ...
Read more >apps/android_rpc - tvm - Git at Google
This will compile TVM IR to shared libraries (CPU, OpenCL and Vulkan) and run vector addition on your Android device. To verify compiled...
Read more >Build with different EPs | onnxruntime
Learm how to build ONNX Runtime from source for different execution providers.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please I don’t know how to link the opencl library for RK3288. “The cross compiled library: runs on your phone, this must be built with USE_OPENCL=1, and link to proper opencl library on your phone” Help
Do we need to add topi compute and schedule in CPP to support for running in Android device with OpenCL? or the ones with python alone can work fine?