HomePhabricator

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

Authored by GMNGeoffrey on Feb 25 2021, 5:20 PM.

Description

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

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).

Reviewed By: nicolasvasilache, mravishankar

Differential Revision: https://reviews.llvm.org/D97505

Details

Committed
GMNGeoffreyFeb 26 2021, 8:36 AM
Reviewer
nicolasvasilache
Differential Revision
D97505: [MLIR][linalg] Make integer matmul ops cast before multiplying
Parents
rG301551ae8e8f: [PDB] Fix unsigned integer overflow
Branches
Unknown
Tags
Unknown