File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
lib/Dialect/TritonGPU/Transforms Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -301,9 +301,17 @@ void LoopPipeliner::emitPrologue() {
301301 }
302302
303303 // If this is a load/async_copy, we need to update the mask
304- if (llvm::isa<triton::LoadOp, triton::gpu::InsertSliceAsyncOp>(newOp)) {
305- Value mask = llvm::isa<triton::LoadOp>(newOp) ? newOp->getOperand (1 )
306- : newOp->getOperand (3 );
304+ if (Value mask = [&]() {
305+ if (auto loadOp = llvm::dyn_cast<triton::LoadOp>(newOp)) {
306+ return loadOp.mask ();
307+ } else if (auto insertSliceAsyncOp =
308+ llvm::dyn_cast<triton::gpu::InsertSliceAsyncOp>(
309+ newOp)) {
310+ return insertSliceAsyncOp.mask ();
311+ } else {
312+ return mlir::Value ();
313+ }
314+ }()) {
307315 // assert(I1 or TensorOf<[I1]>);
308316 OpBuilder::InsertionGuard g (builder);
309317 // TODO: move this out of the loop
You can’t perform that action at this time.
0 commit comments