Linker Error on QNX 7.1 with OpenCLML SDK for doing inference of NN on Adreno GPU

OS : QNX 7.1

Platform : Qualcomm Board

Target Hardware Accelerator : Adreno GPU

TVM build : From source

Description : I have built tvm runtime from source with following openclml flags:

USE_OPENCL : ON

USE_CLML : Path_to_clml_sdk

USE_CLML_GRAPH_EXECUTOR : path_to_clml_sdk

and cross-compiled tvm runtime for QNX 7.1 . The runtime was built without error . I’ve produced the model.so by setting target HWA to “opencl -device=adreno” . I’m trying to build a C++ executable that can be run directly on QNX. During linking , I’m linking the model.so to the libOpenCL.so ( that is coming from OpenCLML sdk) and tvm_runtime.so ( built for aarch64-qnx). The linking phase is failing as linker wants to link libOpenCL.so to “libvndksupport.so” , “libdl.so”, “libcutils.so”. How should I resolve linker errors? Does openclml has support on QNX 7.1? @srkreddy1238

Hi,

You are mixing 2 backends here. CLML along with OpenCL works fine. You may refer to the adreno deploy docs for the same.

May be if you share the error log I can try to guide on the linker error

@srkreddy1238 Thanks for your reply I’m getting following error when I’m linking my C++ executable to tvm_runtime only ( build for QNX 7.1 with CLML based flags ON ) :

Since this showed that it is unable to find definition for some CLML based API’s , I also linked libOpenCL.so ( present within the lib64 folder of CLML SDK) along with tvm_runtime and I got following error:

@srkreddy1238 Any updates?

This looks like an incompatible CLML SDK linked. What is the Adreno Hardware version you are using here ? Also share me the hardware platform (Board / Commercial device …etc) to under stand compatibilities.

Thanks for the reply I’m using Adreno 663 GPU . The platform is Qualcomm RIDE 4.0 SX ( Qualcomm 8650P). CLML SDK version I’m using is 3.0 . Currently the platform has QNX 7.1 OS running.

Thanks for details. I am checking few details internally with respect to the compatibilities.

Meanwhile, Above error relates to cross compilation SDK (Is it Android ?) incompatibility with pre compiled OpenCL.so from CLML SDK.

CLML support on target to be confirmed. I am checking internally on this. Mean while you may also look for opencl extension on target (using clinfo tool) for “cl_qcom_ml_ops”.

Thanks for the reply As such there is no clml-based api on qnx os. How should I confirm the support for CLML on platform which runs QNX 7.1?

Hi Varun,

As I said earlier,

I am checking internally on this. Mean while if you have clinfo (OpenCL tool) you could run this on target and inspect the opencl extensions. Extension “cl_qcom_ml_ops” presence on target indicates CLML support.