83 lines · plain
1; Check info on launch bounds for AMD GPU.2 3; REQUIRES: amdgpu-registered-target4 5; RUN: opt -pass-remarks=kernel-info -passes=kernel-info \6; RUN: -disable-output %s 2>&1 | \7; RUN: FileCheck -match-full-lines %s8 9target triple = "amdgcn-amd-amdhsa"10 11; CHECK: remark: test.c:10:0: in artificial function 'all', omp_target_num_teams = 10012; CHECK: remark: test.c:10:0: in artificial function 'all', omp_target_thread_limit = 10113; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-max-num-workgroups[0] = 20014; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-max-num-workgroups[1] = 20115; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-max-num-workgroups[2] = 20216; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-flat-work-group-size[0] = 21017; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-flat-work-group-size[1] = 21118; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-waves-per-eu[0] = 219; CHECK: remark: test.c:10:0: in artificial function 'all', amdgpu-waves-per-eu[1] = 920define void @all() #0 !dbg !5 {21entry:22 ret void23}24 25; CHECK-NOT: remark: test.c:11:0: in function 'none', omp_target_num_teams = {{.*}}26; CHECK-NOT: remark: test.c:11:0: in function 'none', omp_target_thread_limit = {{.*}}27; CHECK: remark: test.c:11:0: in function 'none', amdgpu-max-num-workgroups[0] = 429496729528; CHECK: remark: test.c:11:0: in function 'none', amdgpu-max-num-workgroups[1] = 429496729529; CHECK: remark: test.c:11:0: in function 'none', amdgpu-max-num-workgroups[2] = 429496729530; CHECK: remark: test.c:11:0: in function 'none', amdgpu-flat-work-group-size[0] = 131; CHECK: remark: test.c:11:0: in function 'none', amdgpu-flat-work-group-size[1] = 102432; CHECK: remark: test.c:11:0: in function 'none', amdgpu-waves-per-eu[0] = 433; CHECK: remark: test.c:11:0: in function 'none', amdgpu-waves-per-eu[1] = 1034define void @none() !dbg !6 {35entry:36 ret void37}38 39; CHECK: remark: test.c:12:0: in function 'bogus', omp_target_num_teams = 98765432140; CHECK: remark: test.c:12:0: in function 'bogus', omp_target_thread_limit = 98765432141; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-max-num-workgroups[0] = 98765432142; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-max-num-workgroups[1] = 98765432143; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-max-num-workgroups[2] = 98765432144; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-flat-work-group-size[0] = 145; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-flat-work-group-size[1] = 102446; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-waves-per-eu[0] = 447; CHECK: remark: test.c:12:0: in function 'bogus', amdgpu-waves-per-eu[1] = 1048define void @bogus() #1 !dbg !7 {49entry:50 ret void51}52 53attributes #0 = {54 "omp_target_num_teams"="100"55 "omp_target_thread_limit"="101"56 "amdgpu-max-num-workgroups"="200,201,202"57 "amdgpu-flat-work-group-size"="210,211"58 "amdgpu-waves-per-eu"="2,9"59}60 61; We choose values that are small enough to parse successfully but that are62; impossibly large. For values that are validated, we check that they are63; overridden with realistic values.64attributes #1 = {65 "omp_target_num_teams"="987654321"66 "omp_target_thread_limit"="987654321"67 "amdgpu-max-num-workgroups"="987654321,987654321,987654321"68 "amdgpu-flat-work-group-size"="987654321,987654321"69 "amdgpu-waves-per-eu"="987654321,987654321"70}71 72!llvm.module.flags = !{!0}73!llvm.dbg.cu = !{!1}74 75!0 = !{i32 2, !"Debug Info Version", i32 3}76!1 = distinct !DICompileUnit(language: DW_LANG_C11, file: !2, producer: "clang version 19.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)77!2 = !DIFile(filename: "test.c", directory: "/tmp")78!3 = !{}79!4 = !DISubroutineType(types: !3)80!5 = distinct !DISubprogram(name: "all", scope: !2, file: !2, line: 10, type: !4, scopeLine: 10, flags: DIFlagArtificial | DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)81!6 = distinct !DISubprogram(name: "none", scope: !2, file: !2, line: 11, type: !4, scopeLine: 11, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)82!7 = distinct !DISubprogram(name: "bogus", scope: !2, file: !2, line: 12, type: !4, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !1, retainedNodes: !3)83