I have a question about the Polygeist. I don’t know I am right or not but what I found out is that Polygiest tries to use MLIR in C/C++ and it tries to get the clang AST and pass it through MLIR and use its dialects for optimizations. I want to know if it can use for compiling OpenCL program or not? I searched a lot in discussions and its website but I could not find anything. And if it works, can it use gpu or spv dialect? Or if it is not, is there any technology for doing this? (I mean it use MLIR for compilation)
It only supports CUDA so far.
There is a lot of excitement about frontends for C-like language in an adjacent forum - [RFC] An MLIR based Clang IR (CIR) - #52 by bcardosolopes - but I don’t think anybody has OpenCL working yet. So your best shot is likely just adding the subset of features you need into Polygeist, which is an incubator project.
Do you have any sample OpenCL codes you’d like to see work.
I haven’t used OpenCL before, but happy to add support (and can add the samples you provide as tests)
There is an open-source project of OpenCL whose name is PoCL. This project is written in C and could be compiled by clang. I wanted to see if Polygeist could compile it or not? Because it uses some parameters in clang, I don’t know whether Polygeist supports them or not.