[opencl] support image memory object in opencl backend

Hello,

since image memory and buffer memory are two types of storage in Opencl. and sometimes Image will outperform Buffer in some case, But seems TVM can’t generate kernel code with Image.

Could anyone give some hints or guideline about how to enable TVM could create Image memory as storage?

to be more specific

  • use clcreateimage to create a memory object and read_image to read from it.

I wonder if there are supports for opencl image in TVM now? Thx

Yes. I think so. There is a PR in TVM and we demonstrated that TVM can surpass most of human-written code in mobile -GPU with texture memory support.

That’s impressive. So can you show some docs or keywords about the feature? BTW, I really care about that can I use ansor to generate code spporting opencl images? Thank you !

Here is the related RFC [[RFC] Texture memory support] by the other authors. But I think there is no out-of-the-box ansor supporting right now. You can create a topic to discuss that.