Error while Auto tuning for GPU using opencl "CL_OUT_OF_RESOURCES"


#1

I face the following error
tvm/src/runtime/module_util.cc:73: Check failed: ret == 0 (-1 vs. 0) : TVMError: Check failed: e == CL_SUCCESS: OpenCL Error, code=-5: CL_OUT_OF_RESOURCES
while auto-tuning for firefly rk3399 GPU following the tutorial for auto-tuning for mobile GPUs https://docs.tvm.ai/tutorials/autotvm/tune_relay_mobile_gpu.html

I changed the target from “opencl -device=mali” to “opencl”.
#target = tvm.target.create('opencl -device=mali')
target = tvm.target.create('opencl')
It seems the same problem descibed at #761
I faced this error while evaluating inference time cost, after the tuning process was finished.

BTW It works fine for target “opencl -device=mali”
target = tvm.target.create('opencl -device=mali')
after disabling the tophub as mentioned at #3980


#2

opencl is not the same as opencl -device=mali, the latter will run into mali schedule in the topi/mali, but opencl will go into the gpu, which will go into the cuda schedule in the topi/cuda. So it make sense rk3399 can not run the schedule mainly designed for CUDA.


#3

Hello, @FrozenGene
Thanks a lot for your helping, I understand know why it didn’t work.
I want to auto-tune for Imagination GPU, when I auto-tune using Mali configuration it runs fine but I think I should use another schedule to match Imagination GPU.

What do you think?


#4

I think you should be better to write one schedule for imagination gpu.


#5

Do you have any tutorials or guide lines to do this?


#6

I think you could modify MALI / CUDA schedule and read imagination gpu doc.