when i reproduce benchmark on Mobile-gpu:
python3 mobile_gpu_imagenet_bench.py --model rk3399 --rpc-key rk3399
i got the following error:
[10:43:05] /home/zzw/tvm/src/pass/vectorize_loop.cc:343: Detect vector condition in Vectorized Loop, scalarizing… [10:43:05] /home/zzw/tvm/src/pass/vectorize_loop.cc:343: Detect vector condition in Vectorized Loop, scalarizing… [10:43:05] /home/zzw/tvm/src/pass/vectorize_loop.cc:343: Detect vector condition in Vectorized Loop, scalarizing… [10:43:05] /home/zzw/tvm/src/pass/vectorize_loop.cc:343: Detect vector condition in Vectorized Loop, scalarizing… [10:43:05] /home/zzw/tvm/src/runtime/opencl/opencl_device_api.cc:244: No OpenCL platform matched given existing options … Traceback (most recent call last): File “mobile_gpu_imagenet_bench.py”, line 88, in evaluate_network(network, target, target_host, args.dtype, args.repeat) File “mobile_gpu_imagenet_bench.py”, line 44, in evaluate_network rlib = remote.load_module(filename) File “/home/zzw/tvm/python/tvm/rpc/client.py”, line 132, in load_module return base._LoadRemoteModule(self._sess, path) File “/home/zzw/tvm/python/tvm/_ffi/_ctypes/function.py”, line 190, in call raise get_last_ffi_error() tvm._ffi.base.TVMError: Traceback (most recent call last): [bt] (8) /home/firefly/tvm/build/libtvm.so(+0xc1e68c) [0x7f96ecb68c] [bt] (7) /home/firefly/tvm/build/libtvm.so(+0xc1e360) [0x7f96ecb360] [bt] (6) /home/firefly/tvm/build/libtvm.so(+0xc23efc) [0x7f96ed0efc] [bt] (5) /home/firefly/tvm/build/libtvm.so(+0xc23448) [0x7f96ed0448] [bt] (4) /home/firefly/tvm/build/libtvm.so(+0xc22368) [0x7f96ecf368] [bt] (3) /home/firefly/tvm/build/libtvm.so(+0xc1c8cc) [0x7f96ec98cc] [bt] (2) /home/firefly/tvm/build/libtvm.so(+0xc21c2c) [0x7f96ecec2c] [bt] (1) /home/firefly/tvm/build/libtvm.so(+0xc1d6e4) [0x7f96eca6e4] [bt] (0) /home/firefly/tvm/build/libtvm.so(+0xbdc600) [0x7f96e89600] File “/home/firefly/tvm/python/tvm/_ffi/_ctypes/function.py”, line 55, in cfun rv = local_pyfunc(*pyargs) File “/home/firefly/tvm/python/tvm/rpc/server.py”, line 50, in load_module m = _load_module(path) File “/home/firefly/tvm/python/tvm/module.py”, line 244, in load return _LoadFromFile(path, fmt) File “/home/firefly/tvm/python/tvm/_ffi/_ctypes/function.py”, line 190, in call raise get_last_ffi_error() [bt] (4) /home/firefly/tvm/build/libtvm.so(TVMFuncCall+0x70) [0x7f96e8c6e8] [bt] (3) /home/firefly/tvm/build/libtvm.so(+0xbf1fb4) [0x7f96e9efb4] [bt] (2) /home/firefly/tvm/build/libtvm.so(tvm::runtime::Module::LoadFromFile(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0x3c0) [0x7f96e9c618] [bt] (1) /home/firefly/tvm/build/libtvm.so(+0xbe3934) [0x7f96e90934] [bt] (0) /home/firefly/tvm/build/libtvm.so(+0xbf69b0) [0x7f96ea39b0] File “/home/firefly/tvm/src/runtime/module_util.cc”, line 36 TVMError: Except caught from RPC call: TVMError: Check failed: f != nullptr: Loader of opencl(module.loadbinary_opencl) is not presented.
Before that, i have install OpenCL by:
sudo apt install ocl-icd-libopencl1
sudo apt install opencl-headers
sudo apt install clinfo
sudo apt install ocl-icd-opencl-dev
and then i build TVM with OpenCL by:
cmake..
make -j4
I am sure that it is successfully build.