Change linalg.matmul_unsigned to linalg.matmul with unsigned type_fn (#3587)

Change linalg.matmul_unsigned to linalg.matmul with unsigned type_fn

Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Co-authored-by: Max Dawkins <max.dawkins@gmail.com>
pull/3588/head
Rob Suderman 2024-08-02 11:32:24 -07:00 committed by GitHub
parent d273bdfabf
commit f7b5c13870
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View File

@ -186,10 +186,10 @@ public:
ValueRange{lhs, rhs, lhsZeroPoint, rhsZeroPoint}, zeroFill)
.getResult(0);
} else if (isUnsigned) {
matmul = rewriter
.create<linalg::MatmulUnsignedOp>(
loc, zeroFill.getType(), ValueRange{lhs, rhs}, zeroFill)
.getResult(0);
auto matmulOp = rewriter.create<linalg::MatmulOp>(
loc, zeroFill.getType(), ValueRange{lhs, rhs}, zeroFill);
matmulOp.setCast(linalg::TypeFn::cast_unsigned);
matmul = matmulOp->getResult(0);
} else {
matmul = rewriter
.create<linalg::MatmulOp>(loc, zeroFill.getType(),

View File

@ -55,7 +55,7 @@ func.func @torch.aten.mm$basic_strict(%arg0: !torch.vtensor<[?,?],f32>, %arg1: !
// -----
// CHECK-LABEL: func.func @torch.aten.mm$basic_unsigned(
// CHECK: linalg.matmul_unsigned
// CHECK: linalg.matmul {cast = #linalg.type_fn<cast_unsigned>}
func.func @torch.aten.mm$basic_unsigned(%arg0: !torch.vtensor<[?,?],ui32>, %arg1: !torch.vtensor<[?,?],ui32>) -> !torch.vtensor<[?,2],ui32>
attributes {torch.assume_strict_symbolic_shapes}
{