This is an archive of the discontinued LLVM Phabricator instance.

[mlir][GPU] Add op for unrolling contractions to a native size
ClosedPublic

Authored by qedawkins on Jul 23 2023, 10:53 PM.

Details

Summary

Adds apply_patterns.gpu.unroll_vectors_subgroup_mma which allows
specifying a native MMA shape of m, n, and k to unroll to,
greedily unrolling the inner most dimension of contractions and other
vector operations based on expected usage.

Diff Detail

Event Timeline

qedawkins created this revision.Jul 23 2023, 10:53 PM
Herald added a project: Restricted Project. · View Herald Transcript
qedawkins requested review of this revision.Jul 23 2023, 10:54 PM

This would fit better in nvgpu transform ops I believe, as it has heuristics specifically for those cases.

Approving conditioned on moving to nvgpu.

This revision is now accepted and ready to land.Jul 23 2023, 11:10 PM
qedawkins updated this revision to Diff 543564.Jul 24 2023, 8:17 AM

Move op to GPUTransforms

This would fit better in nvgpu transform ops I believe, as it has heuristics specifically for those cases.

Approving conditioned on moving to nvgpu.

Because this first targets gpu.subgroup_mma ops (which has a shared target of SPIR-V Cooperative Matrix) I moved it to gpu instead.

qedawkins retitled this revision from [mlir][Vector] Add op for unrolling contractions to a native size to [mlir][GPU] Add op for unrolling contractions to a native size.Jul 25 2023, 7:36 AM
qedawkins edited the summary of this revision. (Show Details)