HSACodeProps.mWavefrontSize = STM.getWavefrontSize();
HSACodeProps.mNumSGPRs = CurrentProgramInfo.NumSGPR;
HSACodeProps.mNumVGPRs = CurrentProgramInfo.NumVGPR;
- // TODO: Emit HSACodeProps.mMaxFlatWorkgroupSize.
+ HSACodeProps.mMaxFlatWorkgroupSize = MFI.getMaxFlatWorkGroupSize();
HSACodeProps.mIsDynamicCallStack = ProgramInfo.DynamicCallStack;
HSACodeProps.mIsXNACKEnabled = STM.isXNACKEnabled();
-; RUN: llc -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < %s | FileCheck --check-prefix=CHECK %s
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -filetype=obj -o - < %s | llvm-readobj -elf-output-style=GNU -notes | FileCheck --check-prefix=HSAMD %s
; CHECK-LABEL: {{^}}min_64_max_64:
; CHECK: SGPRBlocks: 0
ret void
}
attributes #3 = {"amdgpu-flat-work-group-size"="1024,2048"}
+
+; HSAMD: NT_AMD_AMDGPU_HSA_METADATA (HSA Metadata)
+; HSAMD: Version: [ 1, 0 ]
+; HSAMD: Kernels:
+; HSAMD: - Name: min_64_max_64
+; HSAMD: MaxFlatWorkgroupSize: 64
+; HSAMD: - Name: min_64_max_128
+; HSAMD: MaxFlatWorkgroupSize: 128
+; HSAMD: - Name: min_128_max_128
+; HSAMD: MaxFlatWorkgroupSize: 128
+; HSAMD: - Name: min_1024_max_2048
+; HSAMD: MaxFlatWorkgroupSize: 2048
; CHECK: - Name: test
; CHECK: SymbolName: 'test@kd'
; CHECK: CodeProps:
-; CHECK: KernargSegmentSize: 24
-; CHECK: GroupSegmentFixedSize: 0
+; CHECK: KernargSegmentSize: 24
+; CHECK: GroupSegmentFixedSize: 0
; CHECK: PrivateSegmentFixedSize: 0
-; CHECK: KernargSegmentAlign: 8
-; CHECK: WavefrontSize: 64
-; GFX700: NumSGPRs: 6
-; GFX800: NumSGPRs: 96
-; GFX900: NumSGPRs: 6
-; GFX700: NumVGPRs: 4
-; GFX800: NumVGPRs: 6
-; GFX900: NumVGPRs: 6
+; CHECK: KernargSegmentAlign: 8
+; CHECK: WavefrontSize: 64
+; GFX700: NumSGPRs: 6
+; GFX800: NumSGPRs: 96
+; GFX900: NumSGPRs: 6
+; GFX700: NumVGPRs: 4
+; GFX800: NumVGPRs: 6
+; GFX900: NumVGPRs: 6
+; CHECK: MaxFlatWorkgroupSize: 256
define amdgpu_kernel void @test(
half addrspace(1)* %r,
half addrspace(1)* %a,
// CHECK: PrivateSegmentFixedSize: 16
// CHECK: KernargSegmentAlign: 16
// CHECK: WavefrontSize: 64
+// CHECK: MaxFlatWorkgroupSize: 256
.amd_amdgpu_hsa_metadata
Version: [ 1, 0 ]
Printf: [ '1:1:4:%d\n', '2:1:8:%g\n' ]
PrivateSegmentFixedSize: 16
KernargSegmentAlign: 16
WavefrontSize: 64
+ MaxFlatWorkgroupSize: 256
.end_amd_amdgpu_hsa_metadata