Hello,
In “nnvm.compiler.build(sym, target, shape, params=params, target_host=target_host)”
what are the Opencl “target” and “target_host” parameters for ARM platforms?
Note:
The system is not Android
The incorporated GPU isn’t Mali
Hello,
In “nnvm.compiler.build(sym, target, shape, params=params, target_host=target_host)”
what are the Opencl “target” and “target_host” parameters for ARM platforms?
Note:
The system is not Android
The incorporated GPU isn’t Mali
You can just use tvm.target.create('opencl')
, but this may not be will optimized for you GPU (typically these schedules are for desktop GPUs). The target host depends on the CPU of your platform.
For OpenCl target am using below parameters for ARM platform(Android Phone).
target = 'opencl' target_host = "llvm -target=%s-linux-android" % arch
where arch is android phone processor architecture (ex. arch= "arm64" for my Nexus6P)
I could generate .so file, the issue was somehow related to the OpenCL support in my laptop, after installing OpenCL for my laptop GPU, the .so library could be generated.
I have no explanation why OpenCL of my laptop is required to cross-compile for another HW platform! any idea?
Even if you are targeting another hardware platform, you may need to have a copy of the OpenCL headers at compile time (these are usually added when you install an OpenCL package).
eqy,
Makes sense, but, any idea how to make TVM refer to the headers of my “target” OpenCL library rather than the machine OpenCL libraries?
Are you generating the code to be run on the device itself, or on another machine.
If you are generating code on another machine, you would change the target to correspond to your target device. To completely avoid a conflict in this case you could compile TVM without OpenCL support (on the machine doing compilation), and ship a generic OpenCL source module to the target device.
If you are compiling on the target device, you can specify the path to your OpenCL headers manually, as you would already need to in order to compile the runtime with OpenCL support on the device.
I found this to be useful when debugging cmake errors due to missing OpenCL headers.
eqy,
I need to run DNN model on ARM based system (target system) with OpenCL support.
So I generate .so file on Xeon based system (host system) , then I cross-compile it for the target system.
Referring to another thread, in latest release v0.4 I can generate .so with target=‘opencl’, without OpenCL installed in the host machine. I guess this will solve the problem.