@@ -2614,33 +2614,39 @@ Error AMDGPUKernelTy::printLaunchInfoDetails(GenericDeviceTy &GenericDevice,
2614
2614
return Plugin::success ();
2615
2615
2616
2616
// General Info
2617
- auto ConstWGSize = getDefaultNumThreads (GenericDevice);
2618
2617
auto NumGroups = NumBlocks;
2619
- auto ThreadsPerGroup = getDefaultNumThreads (GenericDevice);
2620
- auto NumTeams = KernelArgs.NumTeams [0 ]; // Only first dimension
2621
- auto ThreadLimit = KernelArgs.ThreadLimit [0 ]; // Only first dimension
2618
+ auto ThreadsPerGroup = NumThreads;
2622
2619
2623
2620
// Kernel Arguments Info
2624
2621
auto ArgNum = KernelArgs.NumArgs ;
2625
2622
auto LoopTripCount = KernelArgs.Tripcount ;
2626
2623
2627
- // Details for AMDGPU kernels
2624
+ // Details for AMDGPU kernels (read from image)
2625
+ // https://www.llvm.org/docs/AMDGPUUsage.html#code-object-v4-metadata
2628
2626
auto GroupSegmentSize = (*KernelInfo).GroupSegmentList ;
2629
2627
auto SGPRCount = (*KernelInfo).SGPRCount ;
2630
2628
auto VGPRCount = (*KernelInfo).VGPRCount ;
2631
2629
auto SGPRSpillCount = (*KernelInfo).SGPRSpillCount ;
2632
2630
auto VGPRSpillCount = (*KernelInfo).VGPRSpillCount ;
2633
-
2634
- // TODO set correctly once host services available
2635
- auto HostCallRequired = false ;
2631
+ auto MaxFlatWorkgroupSize = (*KernelInfo).MaxFlatWorkgroupSize ;
2632
+
2633
+ // Prints additional launch info that contains the following.
2634
+ // Num Args: The number of kernel arguments
2635
+ // Teams x Thrds: The number of teams and the number of threads actually
2636
+ // running.
2637
+ // MaxFlatWorkgroupSize: Maximum flat work-group size supported by the
2638
+ // kernel in work-items
2639
+ // LDS Usage: Amount of bytes used in LDS storage
2640
+ // S/VGPR Count: the number of S/V GPRs occupied by the kernel
2641
+ // S/VGPR Spill Count: how many S/VGPRs are spilled by the kernel
2642
+ // Tripcount: loop tripcount for the kernel
2636
2643
INFO (OMP_INFOTYPE_PLUGIN_KERNEL, GenericDevice.getDeviceId (),
2637
- " SGN:%s ConstWGSize:%d args:%d teamsXthrds:(%4luX%4d) "
2638
- " reqd:(%4dX%4d) lds_usage:%uB sgpr_count:%u vgpr_count:%u "
2639
- " sgpr_spill_count:%u vgpr_spill_count:%u tripcount:%lu rpc:%d n:%s\n " ,
2640
- getExecutionModeName (), ConstWGSize, ArgNum, NumGroups, ThreadsPerGroup,
2641
- NumTeams, ThreadLimit, GroupSegmentSize, SGPRCount, VGPRCount,
2642
- SGPRSpillCount, VGPRSpillCount, LoopTripCount, HostCallRequired,
2643
- getName ());
2644
+ " #Args: %d Teams x Thrds: %4lux%4u (MaxFlatWorkGroupSize: %u) LDS "
2645
+ " Usage: %uB #SGPRs/VGPRs: %u/%u #SGPR/VGPR Spills: %u/%u Tripcount: "
2646
+ " %lu\n " ,
2647
+ ArgNum, NumGroups, ThreadsPerGroup, MaxFlatWorkgroupSize,
2648
+ GroupSegmentSize, SGPRCount, VGPRCount, SGPRSpillCount, VGPRSpillCount,
2649
+ LoopTripCount);
2644
2650
2645
2651
return Plugin::success ();
2646
2652
}
0 commit comments