Loading clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ void clang::CIRGen::setAMDGPUTargetFunctionAttributes(const Decl *decl, const bool isHIPKernel = cgm.getLangOpts().HIP && fd->hasAttr<CUDAGlobalAttr>(); // TODO(CIR): Set amdgpu_kernel calling convention for HIP kernels. if (isHIPKernel) func.setCallingConv(cir::CallingConv::AMDGPUKernel); handleAMDGPUFlatWorkGroupSizeAttr(fd, func, cgm, builder, isOpenCLKernel, isHIPKernel); Loading clang/test/CIR/CodeGenHIP/amdgpu-attrs.hip +2 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ // Test that AMDGPU-specific attributes are generated for HIP kernels // Test: Default attributes for simple kernel // CIR: cir.func{{.*}} @_Z13kernel_simplev(){{.*}}"cir.amdgpu-flat-work-group-size" = "1,1024" // LLVM: define{{.*}} void @_Z13kernel_simplev(){{.*}} #[[SIMPLE_ATTR:[0-9]+]] // CIR: cir.func{{.*}} @_Z13kernel_simplev() cc(amdgpu_kernel){{.*}}"cir.amdgpu-flat-work-group-size" = "1,1024" // LLVM: define{{.*}} amdgpu_kernel void @_Z13kernel_simplev(){{.*}} #[[SIMPLE_ATTR:[0-9]+]] __global__ void kernel_simple() {} // Test: Explicit flat work group size attribute Loading Loading
clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ void clang::CIRGen::setAMDGPUTargetFunctionAttributes(const Decl *decl, const bool isHIPKernel = cgm.getLangOpts().HIP && fd->hasAttr<CUDAGlobalAttr>(); // TODO(CIR): Set amdgpu_kernel calling convention for HIP kernels. if (isHIPKernel) func.setCallingConv(cir::CallingConv::AMDGPUKernel); handleAMDGPUFlatWorkGroupSizeAttr(fd, func, cgm, builder, isOpenCLKernel, isHIPKernel); Loading
clang/test/CIR/CodeGenHIP/amdgpu-attrs.hip +2 −2 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ // Test that AMDGPU-specific attributes are generated for HIP kernels // Test: Default attributes for simple kernel // CIR: cir.func{{.*}} @_Z13kernel_simplev(){{.*}}"cir.amdgpu-flat-work-group-size" = "1,1024" // LLVM: define{{.*}} void @_Z13kernel_simplev(){{.*}} #[[SIMPLE_ATTR:[0-9]+]] // CIR: cir.func{{.*}} @_Z13kernel_simplev() cc(amdgpu_kernel){{.*}}"cir.amdgpu-flat-work-group-size" = "1,1024" // LLVM: define{{.*}} amdgpu_kernel void @_Z13kernel_simplev(){{.*}} #[[SIMPLE_ATTR:[0-9]+]] __global__ void kernel_simple() {} // Test: Explicit flat work group size attribute Loading