@@ -47,7 +47,7 @@ def TTI_ExperimentalBufferPointersOp : TTI_Op<"experimental_buffer_pointers", [P
47
47
}
48
48
49
49
50
- def TTI_ExperimentalCheckOutstandingWritesOp : TTI_Op<"experimental_check_outstanding_writes ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
50
+ def TTI_ExperimentalCheckWriteStateOp : TTI_Op<"experimental_check_write_state ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
51
51
let summary = "check if there are outstanding writes to a buffer guarded by a mbar";
52
52
let description = [{
53
53
Check if the writeState tensor has non-zero value associated with the buffer.
@@ -76,7 +76,7 @@ def TTI_ExperimentalCheckOutstandingWritesOp : TTI_Op<"experimental_check_outsta
76
76
}
77
77
78
78
79
- def TTI_ExperimentalCheckOutstandingReadsOp : TTI_Op<"experimental_check_outstanding_reads ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
79
+ def TTI_ExperimentalCheckReadBarriersOp : TTI_Op<"experimental_check_read_barriers ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
80
80
let summary = "check if there are outstanding reads from a buffer guarded by a mbar";
81
81
let description = [{
82
82
Check if there are outstanding reads from a buffer guarded by a mbar.
@@ -95,8 +95,8 @@ def TTI_ExperimentalCheckOutstandingReadsOp : TTI_Op<"experimental_check_outstan
95
95
}
96
96
97
97
98
- def TTI_ExperimentalMarkAsWriteOp : TTI_Op<"experimental_mark_as_write ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
99
- let summary = "mark a buffer as being written to using mbar as a guard ";
98
+ def TTI_ExperimentalSetWriteStateOp : TTI_Op<"experimental_set_write_state ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
99
+ let summary = "mark a buffer as being written in writeState tensor ";
100
100
let description = [{
101
101
Mark a buffer as being written to. It is not yet tracked by a barrier, until
102
102
`commit_write_with_barrier` is called, at which point all the buffers being written
@@ -146,7 +146,7 @@ def TTI_ExperimentalCommitWriteWithBarrierOp : TTI_Op<"experimental_commit_write
146
146
}
147
147
148
148
149
- def TTI_ExperimentalMarkAsReadOp : TTI_Op<"experimental_mark_as_read ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
149
+ def TTI_ExperimentalSetReadBarrierOp : TTI_Op<"experimental_set_read_barrier ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
150
150
let summary = "mark a buffer as being read from using mbar as a guard";
151
151
let description = [{
152
152
Mark a buffer as being read from using mbar as a guard.
@@ -226,72 +226,70 @@ def TTI_ExperimentalCheckBarrierWritesClearedOp : TTI_Op<"experimental_check_bar
226
226
}
227
227
228
228
229
- // TODO: Potentially resolve the naming/functionality clash with commit_write_with_barrier
230
- def TTI_ExperimentalStageWriteForCommitOp : TTI_Op<"experimental_stage_write_for_commit", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
231
- let summary = "Preapre to an async copy of a buffer. Staged until commit_group is called.";
229
+ def TTI_ExperimentalStageAccessForCommitOp : TTI_Op<"experimental_stage_access_for_commit", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
230
+ let summary = "";
232
231
let description = [{
233
- Preapre to an async copy of a buffer. Staged until commit_group is called. The implementation will write `-1` to the
234
- `write_commits` tensor under the indices corresponding to the buffer .
232
+ For operations that use `outstanding` to track the number of outstanding commits (rather than mbarriers),
233
+ mark the buffer as being accessed, but not commited yet, by marking it with `-1` .
235
234
}];
236
235
let arguments = (ins
237
236
TTG_MemDescType:$buf,
238
237
TT_Tensor:$buffers,
239
- TT_PtrLike:$writeCommits ,
240
- TypeAttr:$writeCommitsType ,
238
+ TT_PtrLike:$outstandingCommits ,
239
+ TypeAttr:$outstandingCommitsType ,
241
240
Optional<I1>:$pred
242
241
);
243
242
let assemblyFormat = [{
244
- $buf `{` $buffers `,` $writeCommits `(` $writeCommitsType `)` `}` (`,` $pred^)? attr-dict `:` type($buf) `,` type($buffers) `,` type($writeCommits )
243
+ $buf `{` $buffers `,` $outstandingCommits `(` $outstandingCommitsType `)` `}` (`,` $pred^)? attr-dict `:` type($buf) `,` type($buffers) `,` type($outstandingCommits )
245
244
}];
246
- // let hasVerifier = 1;
245
+ let hasVerifier = 1;
247
246
}
248
247
249
- def TTI_ExperimentalCommitWritesOp : TTI_Op<"experimental_commit_writes ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
250
- let summary = "Commit all the staged writes for all the buffers.";
248
+ def TTI_ExperimentalCommitAccessesOp : TTI_Op<"experimental_commit_accesses ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
249
+ let summary = "Commit all the staged accesses for all the buffers.";
251
250
let description = [{
252
- Commit all the staged writes for all the buffers.
251
+ Commit all the staged accesses for all the buffers.
253
252
}];
254
253
let arguments = (ins
255
- TT_PtrLike:$writeCommits ,
256
- TypeAttr:$writeCommitsType ,
254
+ TT_PtrLike:$outstandingCommits ,
255
+ TypeAttr:$outstandingCommitsType ,
257
256
Optional<I1>:$pred);
258
257
let assemblyFormat = [{
259
- `{` $writeCommits `(` $writeCommitsType `)` `}` (`,` $pred^)? attr-dict `:` type($writeCommits )
258
+ `{` $outstandingCommits `(` $outstandingCommitsType `)` `}` (`,` $pred^)? attr-dict `:` type($outstandingCommits )
260
259
}];
261
- // let hasVerifier = 1;
262
260
}
263
261
264
- def TTI_ExperimentalClearWriteCommitsOp : TTI_Op<"experimental_clear_write_commits ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
265
- let summary = "Clear all the write commits more distant than `outstandingNum.";
262
+ def TTI_ExperimentalClearOutstandingCommitsOp : TTI_Op<"experimental_clear_outstanding_commits ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
263
+ let summary = "Clear all the outstanding commits more distant than `outstandingNum.";
266
264
let description = [{
267
- Clear all the write commits more distant than `outstandingNum` from the current thread.
265
+ Clear all the outstanding commits more distant than `outstandingNum` from the current thread.
268
266
}];
269
267
let arguments = (ins
270
- TT_PtrLike:$writeCommits ,
271
- TypeAttr:$writeCommitsType ,
268
+ TT_PtrLike:$outstandingCommits ,
269
+ TypeAttr:$outstandingCommitsType ,
272
270
I32Attr:$outstandingNum,
273
271
Optional<I1>:$pred);
274
272
let assemblyFormat = [{
275
- `{` $writeCommits `(` $writeCommitsType `)` `}` `,` $outstandingNum (`,` $pred^)? attr-dict `:` type($writeCommits )
273
+ `{` $outstandingCommits `(` $outstandingCommitsType `)` `}` `,` $outstandingNum (`,` $pred^)? attr-dict `:` type($outstandingCommits )
276
274
}];
277
- // let hasVerifier = 1;
278
275
}
279
276
280
- def TTI_ExperimentalCheckWriteCommitOp : TTI_Op<"experimental_check_write_commit ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
281
- let summary = "Check if the buffer has an outstanding write commit.";
277
+ def TTI_ExperimentalCheckOutstandingCommitsOp : TTI_Op<"experimental_check_outstanding_commits ", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
278
+ let summary = "Check if the buffer has an outstanding commit.";
282
279
let description = [{
283
- Check if the buffer has an outstanding write commit.
280
+ Check if the buffer has an outstanding commit.
284
281
}];
285
282
let arguments = (ins
286
283
TTG_MemDescType:$buf,
287
284
TT_Tensor:$buffers,
288
- TT_PtrLike:$writeCommits,
289
- TypeAttr:$writeCommitsType,
285
+ TT_PtrLike:$outstandingCommits,
286
+ TypeAttr:$outstandingCommitsType,
287
+ StrAttr:$pendingAccessType,
290
288
Optional<I1>:$pred);
291
289
let assemblyFormat = [{
292
- $buf `{` $buffers `,` $writeCommits `(` $writeCommitsType `)` `}` (`,` $pred^)? attr-dict `:` type($buf) `,` type($buffers) `,` type($writeCommits )
290
+ $buf `{` $buffers `,` $outstandingCommits `(` $outstandingCommitsType `)` `}` `,` $pendingAccessType (`,` $pred^)? attr-dict `:` type($buf) `,` type($buffers) `,` type($outstandingCommits )
293
291
}];
294
- // let hasVerifier = 1;
292
+ let hasVerifier = 1;
295
293
}
296
294
297
295
#endif // TRITONINSTRUMENT_OPS
0 commit comments