This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Fix extended umul expansion for WebGPU
ClosedPublic

Authored by kuhar on Jan 5 2023, 1:21 PM.

Details

Summary

Fix an off-by-one error in extended umul extension for WebGPU.
Revert to the long multiplication algorithm originally added to wide
integer emulation, which was deleted in D139776. It is much easier
to see why it is correct.

Add runtime tests based on the mlir-vulkan-runner. These run both with
and without umul extension.

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

Diff Detail

Event Timeline

kuhar created this revision.Jan 5 2023, 1:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 1:21 PM
kuhar requested review of this revision.Jan 5 2023, 1:21 PM
kuhar updated this revision to Diff 486663.Jan 5 2023, 1:22 PM

Remove debug print

kuhar updated this revision to Diff 486664.Jan 5 2023, 1:23 PM

Re-add comment

antiagainst accepted this revision.Jan 5 2023, 2:10 PM

nice, thanks for fixing it!

This revision is now accepted and ready to land.Jan 5 2023, 2:10 PM
kuhar edited the summary of this revision. (Show Details)Jan 5 2023, 3:37 PM
kuhar retitled this revision from [mlir][spirv] Fix extended umul extension for WebGPU to [mlir][spirv] Fix extended umul expansion for WebGPU.
This revision was landed with ongoing or failed builds.Jan 5 2023, 3:42 PM
This revision was automatically updated to reflect the committed changes.