Skip to content

Commit cb3ae1c

Browse files
committed
[mlir][spirv] Update assembly format for Image operand types
In the example below it is not clear that `(f32)` relates to `%arg2` and not to `vector<2xf32>`. This change makes it more clear by separating `(f32)` from `vector<...>`. ```mlir %0 = spirv.ImageSampleImplicitLod %arg0, %arg1 ["Lod"](%arg2) : !spirv.sampled_image<...>, vector<2xf32>(f32) -> vector<4xf32> ```
1 parent 8bea511 commit cb3ae1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/include/mlir/Dialect/SPIRV/IR/SPIRVImageOps.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def SPIRV_ImageDrefGatherOp : SPIRV_Op<"ImageDrefGather",
115115

116116
let assemblyFormat = [{
117117
$sampled_image `,` $coordinate `,` $dref custom<ImageOperands>($image_operands) ( `(` $operand_arguments^ `)` )? attr-dict
118-
`:` type($sampled_image) `,` type($coordinate) `,` type($dref) ( `(` type($operand_arguments)^ `)` )?
118+
`:` type($sampled_image) `,` type($coordinate) `,` type($dref) ` ` ( `(` type($operand_arguments)^ `)` )?
119119
`->` type($result)
120120
}];
121121

@@ -227,7 +227,7 @@ def SPIRV_ImageWriteOp : SPIRV_Op<"ImageWrite",
227227

228228
let assemblyFormat = [{
229229
$image `,` $coordinate `,` $texel custom<ImageOperands>($image_operands) ( `(` $operand_arguments^ `)`)? attr-dict
230-
`:` type($image) `,` type($coordinate) `,` type($texel) ( `(` type($operand_arguments)^ `)`)?
230+
`:` type($image) `,` type($coordinate) `,` type($texel) ` ` ( `(` type($operand_arguments)^ `)`)?
231231
}];
232232
}
233233

0 commit comments

Comments
 (0)