Details
Diff Detail
Event Timeline
mlir/include/mlir/Dialect/SPIRV/SPIRVOCLOps.td | ||
---|---|---|
82 | Nit: Maybe rename this to SPV_OCLExpOp (and similarly below) |
Thanks for the review.
I added serialization roundtrip tests, as there seems to no infrastructure to properly check generated spirv assembly.
The serialization round trip convert from MLIR to SPIR-V binary and then reads it back. Its not a definitive check, though. Ideally we want to verify with SPIR-V validator, but we cant have that dependency in MLIR.
FWIW, a lot of the SPIR-V dialect is used in IREE which runs SPIR-V generated code on Vulkan drivers. There is also a mlir-vulkan-runner that use Vulkan to run the SPIR-V binaries generated from MLIR. So these validate the overall structure of the serialization/deserialization. Since whats added here is using the same infra as the GLSL ops, I think thats good enough testing. Any additional way to verify the SPIR-V binary would be of course welcome!
Thank you @mravishankar, could you merge on my behalf?
FYI we have opencl-runner in PlaidML, but I'm afraid its too diverged from mlir to be useful.
If time permits I'll be sure to put something together based on that :)
Nit: Maybe rename this to SPV_OCLExpOp (and similarly below)