This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Add CL/Kernel memory mapping
ClosedPublic

Authored by raikonenfnu on Aug 22 2022, 6:58 PM.

Diff Detail

Event Timeline

raikonenfnu created this revision.Aug 22 2022, 6:58 PM
raikonenfnu requested review of this revision.Aug 22 2022, 6:58 PM
antiagainst accepted this revision.Aug 23 2022, 7:44 AM

LGTM; just one thing to fix. Feel free to land afterwards!

mlir/lib/Conversion/MemRefToSPIRV/MapMemRefStorageClassPass.cpp
95

Don't think OpenCL supports Input/Output; we should drop them.

This revision is now accepted and ready to land.Aug 23 2022, 7:44 AM

Removed Input/Output from CL memory mapping.

LGTM; just one thing to fix. Feel free to land afterwards!

Done! thanks :)

LGTM; just one thing to fix. Feel free to land afterwards!

Although I don't have commit access to land yet 😅

antiagainst requested changes to this revision.Aug 23 2022, 10:45 AM

Actually there is one more issue. I'll land once that's fixed.

mlir/lib/Conversion/MemRefToSPIRV/MapMemRefStorageClassPass.cpp
95

Actually more to fix here: Uniform needs Shader capability; so it's not available for OpenCL. You might want to move UniformConstant here and map it to 4.

This revision now requires changes to proceed.Aug 23 2022, 10:45 AM

Replaced Uniform with UniformConstant for memoryspace 4.

fix comment in test.

Minor linting

antiagainst accepted this revision.Aug 23 2022, 12:56 PM
This revision is now accepted and ready to land.Aug 23 2022, 12:56 PM
This revision was landed with ongoing or failed builds.Aug 23 2022, 1:02 PM
This revision was automatically updated to reflect the committed changes.