No opencl device when running android_rpc_test.py

When trying to run android_rpc_test.py in: tvm/apps/android_rpc at main · apache/tvm · GitHub I get the following error when testing for opencl:

I built the app with opencl enabled in the config.mk file:

I also added to ADD_C_INCLUDES a path to opencl headers downloaded from: GitHub - KhronosGroup/OpenCL-Headers: Khronos OpenCL-Headers

and to an sdk path for adreno macos installer downloaded from:

I also added to ADD_LDLIBS a path to libOpenCL.so pulled from /system/vendor/lib64 in the android device.

When I built from tvm source the shared library libtvm.dylib I tried to set USE_OPENCL to OFF and ON but both settings did not work.

My remote device is an LG G6 with: GLES: Qualcomm, Adreno ™ 530, OpenGL ES 3.2 V@269.0

The android_rpc_test.py script is run on a mac.

Any help will be appreciated.

stack trace:

Traceback (most recent call last):
  File "/Users/nkaminsky/code/my-tvm/apps/android_rpc/tests/android_rpc_test.py", line 132, in <module>
    test_rpc_module()
  File "/Users/nkaminsky/code/my-tvm/apps/android_rpc/tests/android_rpc_test.py", line 100, in test_rpc_module
    a = tvm.nd.array(a_np, dev)
  File "/Users/nkaminsky/.local/lib/python3.7/site-packages/tvm-0.8.dev1556+g20844a6cd-py3.7-macosx-10.9-x86_64.egg/tvm/runtime/ndarray.py", line 568, in array
    return empty(arr.shape, arr.dtype, device).copyfrom(arr)
  File "/Users/nkaminsky/.local/lib/python3.7/site-packages/tvm-0.8.dev1556+g20844a6cd-py3.7-macosx-10.9-x86_64.egg/tvm/runtime/ndarray.py", line 327, in empty
    arr = _ffi_api.TVMArrayAllocWithScope(shape_ptr, ndim, dtype, device, mem_scope)
  File "tvm/_ffi/_cython/./packed_func.pxi", line 323, in tvm._ffi._cy3.core.PackedFuncBase.__call__
  File "tvm/_ffi/_cython/./packed_func.pxi", line 267, in tvm._ffi._cy3.core.FuncCall
  File "tvm/_ffi/_cython/./base.pxi", line 163, in tvm._ffi._cy3.core.CALL
tvm.error.RPCError: Traceback (most recent call last):
  [bt] (8) 9   libtvm.dylib                        0x000000011a36b3aa tvm::runtime::RPCDeviceAPI::AllocDataSpace(DLDevice, int, long long const*, DLDataType, tvm::runtime::Optional<tvm::runtime::String>) + 138
  [bt] (7) 8   libtvm.dylib                        0x000000011a37632b tvm::runtime::RPCClientSession::AllocDataSpace(DLDevice, int, long long const*, DLDataType, tvm::runtime::Optional<tvm::runtime::String>) + 315
  [bt] (6) 7   libtvm.dylib                        0x000000011a37482c std::__1::__function::__func<tvm::runtime::RPCEndpoint::Init()::$_3, std::__1::allocator<tvm::runtime::RPCEndpoint::Init()::$_3>, void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&) + 348
  [bt] (5) 6   libtvm.dylib                        0x000000011a36c29e tvm::runtime::RPCEndpoint::HandleUntilReturnEvent(bool, std::__1::function<void (tvm::runtime::TVMArgs)>) + 622
  [bt] (4) 5   libtvm.dylib                        0x000000011a36c53e tvm::runtime::RPCEndpoint::EventHandler::HandleNextEvent(bool, bool, std::__1::function<void (tvm::runtime::TVMArgs)>) + 494
  [bt] (3) 4   libtvm.dylib                        0x000000011a3704e9 tvm::runtime::RPCEndpoint::EventHandler::HandleProcessPacket(std::__1::function<void (tvm::runtime::TVMArgs)>) + 393
  [bt] (2) 3   libtvm.dylib                        0x000000011a372485 tvm::runtime::RPCEndpoint::EventHandler::HandleReturn(tvm::runtime::RPCCode, std::__1::function<void (tvm::runtime::TVMArgs)>) + 213
  [bt] (1) 2   libtvm.dylib                        0x0000000119007999 tvm::runtime::detail::LogFatal::Entry::Finalize() + 89
  [bt] (0) 1   libtvm.dylib                        0x000000011a30f228 tvm::runtime::Backtrace() + 24
  File "/Users/nkaminsky/code/my-tvm/src/runtime/rpc/rpc_endpoint.cc", line 376
RPCError: Error caught from RPC call:
[16:06:59] /Users/nkaminsky/code/my-tvm/apps/android_rpc/app/src/main/jni/../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:196: 
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
  Check failed: (context != nullptr) is false: No OpenCL device


Process finished with exit code 1