Page MenuHomePhabricator

[mlir][gpu] Split ops sinking from gpu-kernel-outlining pass into separate pass
ClosedPublic

Authored by Hardcode84 on Feb 16 2022, 4:40 AM.

Details

Summary

Previously gpu-kernel-outlining pass was also doing index computation sinking into gpu.launch before actual outlining.
Split ops sinking from gpu-kernel-outlining pass into separate pass, so users can use theirs own sinking pass before outlining.
To achieve old behavior users will need to call both passes: -gpu-launch-sink-index-computations -gpu-kernel-outlining.

Diff Detail

Event Timeline

Hardcode84 created this revision.Feb 16 2022, 4:40 AM
Hardcode84 requested review of this revision.Feb 16 2022, 4:40 AM

fix missing return

fix Passes.td

herhut accepted this revision.Feb 16 2022, 6:00 AM

Thanks for splitting this out.

Consider adding an explanation to the commit message to let users know what they have to change to get the old behavior.

mlir/include/mlir/Dialect/GPU/Passes.td
14

As this is now hardwired to sinking index computations, maybe call it gpu-launch-sink-index-computations?

This revision is now accepted and ready to land.Feb 16 2022, 6:00 AM

rename pass

Hardcode84 retitled this revision from [mlir][gpu] Split ops sinking from gpu-kernel-outlining pass ito separate pass to [mlir][gpu] Split ops sinking from gpu-kernel-outlining pass into separate pass.Feb 16 2022, 7:34 AM
Hardcode84 edited the summary of this revision. (Show Details)
Hardcode84 marked an inline comment as done.

mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp did use the pass, was it intentional to change behavior, or should it now also have the new pass before outlining?

mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp did use the pass, was it intentional to change behavior, or should it now also have the new pass before outlining?

It should be safe to add this new pass before outlining to exactly preserve old behavior but I'm don't know if it really needed there.