File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -129,14 +129,15 @@ struct AddLaunchBounds : public OpRewritePattern<gpu::LaunchFuncOp> {
129
129
// to only set idx to the total num
130
130
// TODO grab the attr name from the NVVM dialect after bumping llvm
131
131
int blockSize = *bx * *by * *bz;
132
- if (!gpuFuncOp->hasAttr (" maxntidx" )) {
133
- gpuFuncOp->setAttr (" maxntidx" , rewriter.getIntegerAttr (
134
- rewriter.getIndexType (), blockSize));
132
+ if (!gpuFuncOp->hasAttr (" nvvm.maxntidx" )) {
133
+ gpuFuncOp->setAttr (
134
+ " nvvm.maxntidx" ,
135
+ rewriter.getIntegerAttr (rewriter.getIndexType (), blockSize));
135
136
return success ();
136
137
} else {
137
- assert (blockSize ==
138
- gpuFuncOp-> getAttr ( " maxntidx " ). dyn_cast <IntegerAttr>(). getInt ());
139
- // TODO assert it is the same
138
+ assert (
139
+ blockSize ==
140
+ gpuFuncOp-> getAttr ( " nvvm.maxntidx " ). dyn_cast <IntegerAttr>(). getInt ());
140
141
return failure ();
141
142
}
142
143
}
You can’t perform that action at this time.
0 commit comments