This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Fix Physical32/Physical64 support for OpenCL
ClosedPublic

Authored by antiagainst on Feb 26 2023, 8:02 AM.

Details

Summary

We use use64bitIndex in the option to decide the target device
address bitwidth. This makes it consistent with index type
conversion too.

Diff Detail

Event Timeline

antiagainst created this revision.Feb 26 2023, 8:02 AM
antiagainst requested review of this revision.Feb 26 2023, 8:02 AM

The patch LGTM, but I have a design question: have you considered moving PhysicalXY from the module level to target env? I understand that this follows SPIR-V proper, but what do we gain much by keeping those separate?

The patch LGTM, but I have a design question: have you considered moving PhysicalXY from the module level to target env? I understand that this follows SPIR-V proper, but what do we gain much by keeping those separate?

Target environment is actually the requirements towards which we are CodeGen, where these Logical/PhysicalNN is the derived module addressing model details to meeting those requirements. Those are part of the final SPIR-V blob; it's more for driver consumption. So I don't think we should require the developer to figure them out; that's the job of the compiler?

kuhar accepted this revision.Feb 26 2023, 3:13 PM
This revision is now accepted and ready to land.Feb 26 2023, 3:13 PM