This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Modify constraint and interface for warp reduce on f16 and i8
ClosedPublic

Authored by raikonenfnu on Nov 8 2022, 11:11 PM.

Details

Summary

Quantization method is crucial and ubiqutous in accelerating machine
learning workloads. Most of these methods uses f16 and i8 types.

This patch relaxes the type contraints on warp reduce distribution to
allow these types. Furthermore, this patch also changed the interface
and moved the initial reduction of data to a single thread into the
distributedReductionFn, this gives flexibility for developers to control
how they are obtaining the initial lane value, which might differ based
on the input types. (i.e to shuffle 32-width type, we need to reduce f16
to 2xf16 types rather than a single element).

Diff Detail

Event Timeline

raikonenfnu created this revision.Nov 8 2022, 11:11 PM
Herald added a project: Restricted Project. · View Herald Transcript
raikonenfnu requested review of this revision.Nov 8 2022, 11:11 PM
ThomasRaoux accepted this revision.Nov 9 2022, 11:21 AM
This revision is now accepted and ready to land.Nov 9 2022, 11:21 AM