I want to know where this code is called. Specially when we use OpenCL. (The TIRToRuntime function)
path/to/tvm/src/relay/backend/contrib/uma/tir_to_runtime.cc
I am trying to understand how we can generate OpenCL kernel code in TVM workflow and finally I got this part return what I want but I do not know when it is used.
I am trying to understand how we can generate OpenCL kernel code in TVM workflow and finally I got this part return what I want but I do not know when it is used.
The generic approach to use target=“opencl” and target_host=“llvm …” where ... is something for your platform. For example for native it is enough to have target_host jsut “llvm” in case of cross compilation for android “llvm -mtriple=arm64-linux-android”
And regarding the target - there are some vendor dependent keys like
target = "opencl -device=adreno" for Qualcomm Adreno
target="opencl -device=mali" for ARM Mali graphics