Page MenuHomePhabricator

[mlir][gpu] Introduce gpu.global_id op

Authored by Hardcode84 on Mar 13 2022, 4:03 AM.



Introduce OpenCL-style global_id op and corresponding spirv lowering.

Diff Detail

Event Timeline

Hardcode84 created this revision.Mar 13 2022, 4:03 AM
Hardcode84 requested review of this revision.Mar 13 2022, 4:03 AM

fix op description

bondhugula added inline comments.Mar 13 2022, 6:32 AM

There definitely has to be more description and explanation here -- at least on par with what you have above thread_id and block_id ops.

expand description

antiagainst accepted this revision.Mar 14 2022, 6:07 AM
antiagainst added inline comments.

I'd suggest something like:

Returns the unique global workitem/thread id, i.e., the unique index of the current workitem/thread within all workgroups / grid along the x, y, or z `dimension`.
This revision is now accepted and ready to land.Mar 14 2022, 6:07 AM

rebase, update op description

This revision was automatically updated to reflect the committed changes.