We have done and are working on supporting some glsl operations (most of them are related to image and vectors, e.g. SampledImageType, ImageType…) supporting in SPIRV Dialect. We noticed that the latest MLIR project hasn’t support some operations we have done. We are interested in knowing the status and plan of supporting GLSL operations in SPIRV dialect. Also we would be happy to contribute our work if possible. Is there any suggestion on what we should do? I am a newbie in this community. Thanks!
That’s awesome to know! By GLSL operations I assume you mostly mean core SPIR-V types/operations for graphics (which is different from GLSL extended instruction set operations)?
Yup. We don’t have much in-tree support for graphics at the moment. This is because folks interested in SPIR-V right now are using it for lowering ML models via either Vulkan compute or OpenCL. But I’ve been wanting to see progress on the graphics side from the beginning and the dialect and its infrastructure is designed with that support. If you have use cases that would need graphics support, please certainly feel free to push it forward!
Contributions are certainly very welcome! Thanks in advance!
I’d suggest you to read through How to Contribute - MLIR, which describes the logistics for contributing to MLIR in general. For SPIR-V side, given you mentioned that you have already done some ops, I’d assume you’ve already read about 'spv' Dialect - MLIR, which describes some useful tools/scripts. After that, a good first step might be to isolate some small amount of code you’ve already written and upload via Phabricator to get familiar with the flow. Let me know if you hit issues; help to help!
I have uploaded a patch https://reviews.llvm.org/D95580. As you suggested, this patch is a small one to support the OpImageType. Please review it and let me know if it has any problem. As I mentioned, I am a beginner of MLIR, any feedback is appreciated! Thanks in advance and have a good night!