@@ -1240,58 +1240,60 @@ def ReturnOp : TT_Op<"return", [Pure, HasParent<"FuncOp">, /*MemRefsNormalizable
12401240
12411241
12421242def TT_ExperimentalDescriptorLoadOp : TT_Op<"experimental_descriptor_load", [MemoryEffects<[MemRead<GlobalMemory>]>]> {
1243- let summary = "Load from descriptor";
1244- let description = [{
1245- This operation will be lowered to Nvidia TMA load operation on targets supporting it.
1246- `desc` is a tensor descriptor object.
1247- The destination tensor type and shape must match the descriptor otherwise the result is undefined.
1243+ let summary = "Load from descriptor";
1244+ let description = [{
1245+ This operation will be lowered to Nvidia TMA load operation on targets supporting it.
1246+ `desc` is a tensor descriptor object.
1247+ The destination tensor type and shape must match the descriptor otherwise the result is undefined.
12481248
1249- This is an escape hatch and is only there for testing/experimenting.
1250- This op will be removed in the future.
1251- }];
1252- let arguments = (
1253- ins
1254- TT_TensorDescType:$desc,
1255- Variadic<I32>:$indices,
1256- DefaultValuedAttr<TT_CacheModifierAttr, "::mlir::triton::CacheModifier::NONE">:$cache,
1257- DefaultValuedAttr<TT_EvictionPolicyAttr, "::mlir::triton::EvictionPolicy::NORMAL">:$evict
1258- );
1249+ This is an escape hatch and is only there for testing/experimenting.
1250+ This op will be removed in the future.
1251+ }];
1252+ let arguments = (ins
1253+ TT_TensorDescType:$desc,
1254+ Variadic<I32>:$indices,
1255+ DefaultValuedAttr<TT_CacheModifierAttr, "::mlir::triton::CacheModifier::NONE">:$cache,
1256+ DefaultValuedAttr<TT_EvictionPolicyAttr, "::mlir::triton::EvictionPolicy::NORMAL">:$evict
1257+ );
12591258
1260- let results = (outs TT_Tensor:$result);
1259+ let results = (outs TT_Tensor:$result);
12611260
1262- let assemblyFormat = [{
1263- $desc `[` $indices `]`
1264- oilist(
1265- `cacheModifier` `=` $cache |
1266- `evictionPolicy` `=` $evict
1267- )
1268- attr-dict `:` qualified(type($desc)) `->` type($result)
1269- }];
1261+ let assemblyFormat = [{
1262+ $desc `[` $indices `]`
1263+ oilist(
1264+ `cacheModifier` `=` $cache |
1265+ `evictionPolicy` `=` $evict
1266+ )
1267+ attr-dict `:` qualified(type($desc)) `->` type($result)
1268+ }];
1269+
1270+ let hasVerifier = 1;
12701271}
12711272
12721273def TT_ExperimentalDescriptorStoreOp : TT_Op<"experimental_descriptor_store", [
12731274 MemoryEffects<[MemRead<GlobalMemory>, MemWrite<GlobalMemory>]>,
12741275]> {
1275- let summary = "store value based on descriptor";
1276- let description = [{
1277- This operation will be lowered to Nvidia TMA store operation on targets supporting it.
1278- `desc` is a tensor descriptor object.
1279- The shape and types of `src` must match the descriptor otherwise the result is undefined.
1276+ let summary = "store value based on descriptor";
1277+ let description = [{
1278+ This operation will be lowered to Nvidia TMA store operation on targets supporting it.
1279+ `desc` is a tensor descriptor object.
1280+ The shape and types of `src` must match the descriptor otherwise the result is undefined.
12801281
1281- This is an escape hatch and is only there for testing/experimenting.
1282- This op will be removed in the future.
1283- }];
1284- let arguments = (
1285- ins
1286- TT_TensorDescType:$desc,
1287- TT_Tensor:$src,
1288- Variadic<I32>:$indices
1289- );
1282+ This is an escape hatch and is only there for testing/experimenting.
1283+ This op will be removed in the future.
1284+ }];
1285+ let arguments = (ins
1286+ TT_TensorDescType:$desc,
1287+ TT_Tensor:$src,
1288+ Variadic<I32>:$indices
1289+ );
12901290
1291- let assemblyFormat = [{
1292- $desc `[` $indices `]` `,` $src
1293- attr-dict `:` qualified(type($desc)) `,` type($src)
1294- }];
1291+ let assemblyFormat = [{
1292+ $desc `[` $indices `]` `,` $src
1293+ attr-dict `:` qualified(type($desc)) `,` type($src)
1294+ }];
1295+
1296+ let hasVerifier = 1;
12951297}
12961298
12971299def TT_ExperimentalTensormapCreateOp: TT_Op<
@@ -1301,46 +1303,46 @@ def TT_ExperimentalTensormapCreateOp: TT_Op<
13011303 AttrSizedOperandSegments,
13021304 ]
13031305> {
1304- let summary = "Create a new TMA descriptor on device";
1305- let arguments = (
1306- ins
1307- TT_PtrType:$desc_ptr,
1308- TT_PtrType:$global_address,
1309- Variadic<I32>:$box_dim,
1310- Variadic<I32>:$global_dim,
1311- Variadic<I64>:$global_stride,
1312- Variadic<I32>:$element_stride,
1313- ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<12>]>:$elem_type,
1314- ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<2>]>:$interleave_layout,
1315- ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<3>]>:$swizzle_mode,
1316- ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<1>]>:$fill_mode
1317- );
1318- let extraClassDeclaration = [{
1319- int32_t getRank() {
1320- return getBoxDim().size();
1321- }
1322- }];
1323- let assemblyFormat = [{
1324- $desc_ptr `,` $global_address `,`
1325- `[` $box_dim `]` `,`
1326- `[` $global_dim `]` `,`
1327- `[` $global_stride `]` `,`
1328- `[` $element_stride `]`
1329- attr-dict `:` functional-type(operands, results)
1330- }];
1306+ let summary = "Create a new TMA descriptor on device";
1307+ let arguments = (
1308+ ins
1309+ TT_PtrType:$desc_ptr,
1310+ TT_PtrType:$global_address,
1311+ Variadic<I32>:$box_dim,
1312+ Variadic<I32>:$global_dim,
1313+ Variadic<I64>:$global_stride,
1314+ Variadic<I32>:$element_stride,
1315+ ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<12>]>:$elem_type,
1316+ ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<2>]>:$interleave_layout,
1317+ ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<3>]>:$swizzle_mode,
1318+ ConfinedAttr<I32Attr, [IntNonNegative, IntMaxValue<1>]>:$fill_mode
1319+ );
1320+ let extraClassDeclaration = [{
1321+ int32_t getRank() {
1322+ return getBoxDim().size();
1323+ }
1324+ }];
1325+ let assemblyFormat = [{
1326+ $desc_ptr `,` $global_address `,`
1327+ `[` $box_dim `]` `,`
1328+ `[` $global_dim `]` `,`
1329+ `[` $global_stride `]` `,`
1330+ `[` $element_stride `]`
1331+ attr-dict `:` functional-type(operands, results)
1332+ }];
13311333
1332- let hasVerifier = 1;
1334+ let hasVerifier = 1;
13331335}
13341336
13351337def TT_ExperimentalTensormapFenceproxyAcquireOp: TT_Op<
13361338 "experimental_tensormap_fenceproxy_acquire",
13371339 [MemoryEffects<[MemWrite<GlobalMemory>]>]
13381340> {
1339- let summary = "Acquire fence on a tensormap object";
1340- let arguments = (ins TT_PtrType:$desc_ptr);
1341- let assemblyFormat = [{
1342- $desc_ptr attr-dict `:` qualified(type($desc_ptr))
1343- }];
1341+ let summary = "Acquire fence on a tensormap object";
1342+ let arguments = (ins TT_PtrType:$desc_ptr);
1343+ let assemblyFormat = [{
1344+ $desc_ptr attr-dict `:` qualified(type($desc_ptr))
1345+ }];
13441346}
13451347
13461348
0 commit comments