This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Add pattern to expand UMulExtended for WebGPU
ClosedPublic

Authored by kuhar on Jan 4 2023, 8:21 AM.

Details

Summary

This is needed because WGSL does not yet support extended multiplication
ops.

Set up pattern/pass stuff and handle the first op: UMulExtended.
SMulExtended handling will go to a separate patch.

Issue: https://github.com/llvm/llvm-project/issues/59563

Diff Detail

Event Timeline

kuhar created this revision.Jan 4 2023, 8:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 8:21 AM
kuhar requested review of this revision.Jan 4 2023, 8:21 AM
kuhar updated this revision to Diff 486301.Jan 4 2023, 8:22 AM

Add newline

kuhar updated this revision to Diff 486302.Jan 4 2023, 8:25 AM

Simplify pattern

antiagainst accepted this revision.Jan 4 2023, 9:19 AM
antiagainst added inline comments.
mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.td
50

It would be nice to explain a bit more here, e.g., "Prepare SPIR-V to target WebGPU by running transformations to lower away features not supported there to more primitive ones" or something like that.

This revision is now accepted and ready to land.Jan 4 2023, 9:19 AM
kuhar updated this revision to Diff 486338.Jan 4 2023, 10:28 AM

Update pass description. Rebase.

kuhar marked an inline comment as done.Jan 4 2023, 10:28 AM
This revision was landed with ongoing or failed builds.Jan 4 2023, 10:30 AM
This revision was automatically updated to reflect the committed changes.