intel / intel-graphics-compiler

Other
594 stars 155 forks source link

Need help for using IGC and NEO #335

Closed yonghaek closed 1 month ago

yonghaek commented 1 month ago

Thanks for the great work. I am currently trying to use IGC for a research purpose. What I am hoping to do is to develop a custom LLVM opt pass in the IGC LLVM framework and apply that pass when compiling OpenCL compute applications.

I was able to build the IGC without an issue but still wondering how to actually use it. I am sorry if this is not the right place to ask. I have also checked out the compute-runtime repo (NEO) and successfully built it. However, I still have no idea how to use these frameworks for my usecase.

Could you please provide any advice on this direction?

pszymich commented 1 month ago

Hi @yonghaek, you can use Level0 or OpenCL APIs to build host applications with kernels. Installed NEO runtime calls IGC for the compilation task, then dispatches these to the GPU. This is called online or JIT compilation. If you have SPIRV or OpenCL-C input file you can also use the ocloc package from NEO to run ahead-of-time offline compilation.