hanhanW wrote:
> > I think they will become something like:
> > ```c++
> > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[0]));
> > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[1]));
> > llvmFunc->addFnAttr("nvvm.maxntid", llvm::utostr(workgroupSize[2]));
> > ```
>
> Not quite, this would successively overwrite the "nvvm.maxntid" attribute
> three times. I think something like this should work:
>
> ```c++
> std::string maxntid = llvm::formatv("{0},{1},{2}", workgroupSize[0],
> workgroupSize[1], workgroupSize[2]);
> llvmFunc->addFnAttr("nvvm.maxntid", maxntid)
> ```
I see, thanks!
https://github.com/llvm/llvm-project/pull/127736
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits