This is an archive of the discontinued LLVM Phabricator instance.

[mlir][gpu] NFC change to pass threadID ops to rewriteOneForeachThreadToGpuThreads
ClosedPublic

Authored by ThomasRaoux on Feb 13 2023, 2:10 PM.

Details

Summary

This allows user to give both the thread ids and dimension of the threads we want to distribute on.
This means we can use it to distribute on warps as well.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Feb 13 2023, 2:10 PM
ThomasRaoux requested review of this revision.Feb 13 2023, 2:10 PM
Herald added a project: Restricted Project. · View Herald Transcript
harsh accepted this revision.Feb 13 2023, 5:09 PM

Looks good overall! Thanks for getting this to work with warps!

mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
437

is threadOpsUpdated size guaranteed to be the same as globalBlockDims size? If not, this might result in out of bounds access. Maybe have an assert that threadOps size is 3?

This revision is now accepted and ready to land.Feb 13 2023, 5:09 PM

address review comment

mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp
437

Good point, added an assert

This revision was landed with ongoing or failed builds.Feb 13 2023, 5:28 PM
This revision was automatically updated to reflect the committed changes.