Error while Auto tuning for GPU using opencl "CL_OUT_OF_RESOURCES"


I face the following error
tvm/src/runtime/ 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

I changed the target from “opencl -device=mali” to “opencl”.
#target ='opencl -device=mali')
target ='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 ='opencl -device=mali')
after disabling the tophub as mentioned at #3980


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.


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?


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


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


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