File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
mlir/lib/Dialect/NVGPU/Transforms Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ struct MmaSyncF32ToTF32Pattern : public OpRewritePattern<nvgpu::MmaSyncOp> {
38
38
precision (precision) {}
39
39
40
40
LogicalResult matchAndRewrite (nvgpu::MmaSyncOp op,
41
- PatternRewriter &rewrite ) const override {
41
+ PatternRewriter &rewriter ) const override {
42
42
Location location = op->getLoc ();
43
43
44
44
if (op->hasAttr (op.getTf32EnabledAttrName ()) ||
@@ -53,8 +53,10 @@ struct MmaSyncF32ToTF32Pattern : public OpRewritePattern<nvgpu::MmaSyncOp> {
53
53
return emitError (location, " TF32x3 is not supported at the moment "
54
54
" for nvgpu.mma.sync on f32 datatype" );
55
55
56
- if (precision == MmaSyncF32Lowering::TF32)
57
- op.setTf32EnabledAttr (rewrite.getUnitAttr ());
56
+ if (precision == MmaSyncF32Lowering::TF32) {
57
+ rewriter.updateRootInPlace (
58
+ op, [&]() { op.setTf32EnabledAttr (rewriter.getUnitAttr ()); });
59
+ }
58
60
59
61
return success ();
60
62
}
You can’t perform that action at this time.
0 commit comments