Page MenuHomePhabricator

[MLIR][linalg] Make integer matmul ops cast before multiplying
ClosedPublic

Authored by GMNGeoffrey on Feb 25 2021, 2:47 PM.

Details

Summary

Right now they multiply before casting which means they would frequently
overflow. There are various reasonable ways to do this, but until we
have robust op description infra, this is a simple and safe default. More
careful treatments are likely to be hardware specific, as well (e.g.
using an i8*i8->i16 mul instruction).

Diff Detail

Event Timeline

GMNGeoffrey created this revision.Feb 25 2021, 2:47 PM
GMNGeoffrey requested review of this revision.Feb 25 2021, 2:47 PM
mravishankar accepted this revision.Feb 25 2021, 2:50 PM
This revision is now accepted and ready to land.Feb 25 2021, 2:50 PM
  • Restore elision of indexing maps

@nicolasvasilache given that I've now changed the test, waiting for your review as well. Mahesh is skeptical of the vectorization pattern itself

Cool, thanks for fixing.
Not sure what "skeptical about the vectorization pattern" means but this is good to go.

GMNGeoffrey edited the summary of this revision. (Show Details)Feb 26 2021, 8:34 AM