This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] arith::RemSIOp OpenCL lowering
ClosedPublic

Authored by Hardcode84 on Nov 24 2021, 4:10 AM.

Diff Detail

Event Timeline

Hardcode84 created this revision.Nov 24 2021, 4:10 AM
Hardcode84 requested review of this revision.Nov 24 2021, 4:10 AM

@antiagainst actually, I have an issue with this Shader/Kernel ops selection approach. I am using AtomicFAddEXT in kernel which depends on SPV_C_AtomicFloat32AddEXT which have implies = [SPV_C_Shader];. Intel L0 drivers can successfully compile and run such kernels but it breaks this entire approach. Do you have any ideas how to handle this properly? As a quick workaround I can manually patch AtomicFloat32AddEXT to remove implies.

antiagainst accepted this revision.Nov 24 2021, 10:23 AM

@antiagainst actually, I have an issue with this Shader/Kernel ops selection approach. I am using AtomicFAddEXT in kernel which depends on SPV_C_AtomicFloat32AddEXT which have implies = [SPV_C_Shader];. Intel L0 drivers can successfully compile and run such kernels but it breaks this entire approach. Do you have any ideas how to handle this properly? As a quick workaround I can manually patch AtomicFloat32AddEXT to remove implies.

I think it's a bug in the upstream JSON grammar. From the spec (https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/EXT/SPV_EXT_shader_atomic_float_add.asciidoc) AtomicFloat32AddEXT/AtomicFloat64AddEXT has no implicit implied capabilities (the table there is malformed though), but the commit to update JSON grammar has (https://github.com/KhronosGroup/SPIRV-Headers/commit/7083cb52e1812201c2d5641306fcbca639c9560f). I'd suggest you to open a pull request to SPIRV-Headers repro to fix this. In the meanwhile, feel free to manually drop the implies in the td files.

This revision is now accepted and ready to land.Nov 24 2021, 10:23 AM
This revision was automatically updated to reflect the committed changes.