================ @@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr<AMDGPUNumWorkGroupsAttr>()) { + uint32_t X = Attr->getNumWorkGroupsX(); + uint32_t Y = Attr->getNumWorkGroupsY(); + uint32_t Z = Attr->getNumWorkGroupsZ(); + + if (X != 0 && Y != 0 && Z != 0) { ---------------- jwanggit86 wrote:
My understanding is that <X, 1, 1> would mean all workgroups are in the x-dimension only. Similarly <X, Y, 1> would mean only the x- and y-dimensions are involved. https://github.com/llvm/llvm-project/pull/79035 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits