Skip to content

Commit 7b643d0

Browse files
committed
add verifiers
1 parent 6120c9a commit 7b643d0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def AMDGPU_PackedScaledTruncOp
198198
`,` $scale
199199
`:` type($source) `to` type($res) (`into` type($existing)^)?
200200
}];
201-
let hasVerifier = 0;
201+
let hasVerifier = 1;
202202
}
203203

204204
def AMDGPU_PackedStochRoundFp8Op :

mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ LogicalResult PackedStochRoundFp8Op::verify() {
6060
return success();
6161
}
6262

63+
//===----------------------------------------------------------------------===//
64+
// mxfp float ops
65+
//===----------------------------------------------------------------------===//
66+
LogicalResult PackedScaledTruncOp::verify() {
67+
if (getExisting() && getExisting().getType() != getResult().getType())
68+
return emitOpError("existing values must have same type as result");
69+
return success();
70+
}
71+
6372
//===----------------------------------------------------------------------===//
6473
// FatRawBufferCastOp
6574
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)