Hello, with android_rpc, I am trying to run TVM RPC on exynos’s mali gpu.
I pulled libOpenCL.so from my device and downloaded CL header file from here.
I modified ‘config.mk’ like this,
APP_ABI = all
APP_PLATFORM = android-24
USE_OPENCL = 1
USE_VULKAN = 0
USE_SORT = 1
USE_RANDOM = 1
ifeq ($(USE_VULKAN), 1)
APP_PLATFORM = android-24
endif
ADD_C_INCLUDES = /workspace/data/mali
ADD_LDLIBS = /workspace/data/mali/libOpenCL.so
When I used Gradle to compile JNI, I came across following errors.
/workspace/data/mali/CL/cl_version.h:34:9: warning: cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2) [-W#pragma-messages]
#pragma message(“cl_version.h: CL_TARGET_OPENCL_VERSION is not defined. Defaulting to 220 (OpenCL 2.2)”)
^
1 warning generated.
[x86_64] SharedLibrary : libtvm4j_runtime_packed.so
/opt/android-sdk-linux/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld: error: /workspace/data/mali/libOpenCL.so: incompatible target
../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:54: error: undefined reference to ‘clGetDeviceInfo’
../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:93: error: undefined reference to ‘clGetDeviceInfo’
../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:100: error: undefined reference to ‘clGetDeviceInfo’
../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:70: error: undefined reference to ‘clGetDeviceInfo’
../../../../../../include/../src/runtime/opencl/opencl_device_api.cc:122: error: undefined reference to ‘clCreateBuffer’
.
.
.
make: *** [/opt/android-sdk-linux/ndk/21.3.6528147/build/core/build-binary.mk:725: /workspace/apps/android_rpc/app/src/main/obj/local/x86_64/libtvm4j_runtime_packed.so] Error 1 make: Leaving directory ‘/workspace/apps/android_rpc/app/src/main/jni’