This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] mask reduction update
ClosedPublic

Authored by aartbik on Mar 4 2021, 7:19 PM.

Details

Summary

Reduction updates should be masked, just like the load and stores.
Note that alternatively, we could use the fact that masked values are
zero of += updates and mask invariants to get this working but that
would not work for *= updates. Masking the update itself is cleanest.
This change also replaces the constant mask with a broadcast of "true"
since this constant folds much better for various folding patterns.

Diff Detail

Event Timeline

aartbik created this revision.Mar 4 2021, 7:19 PM
aartbik requested review of this revision.Mar 4 2021, 7:19 PM
aartbik updated this revision to Diff 328376.Mar 4 2021, 8:53 PM

better type test reduction end

nicolasvasilache accepted this revision.Mar 5 2021, 1:33 AM
This revision is now accepted and ready to land.Mar 5 2021, 1:33 AM
This revision was landed with ongoing or failed builds.Mar 5 2021, 8:56 AM
This revision was automatically updated to reflect the committed changes.