From 17ffa13035aef0f64019d596f4646bd9885e7938 Mon Sep 17 00:00:00 2001 From: Julia Jiang <56359287+jujiang-del@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:55:52 -0400 Subject: [PATCH] SWDEV-538999 - Make correction in porting guid for launch_bounds (#646) --- projects/hip/docs/how-to/hip_porting_guide.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/projects/hip/docs/how-to/hip_porting_guide.rst b/projects/hip/docs/how-to/hip_porting_guide.rst index 136084f66b..6f1fe20f04 100644 --- a/projects/hip/docs/how-to/hip_porting_guide.rst +++ b/projects/hip/docs/how-to/hip_porting_guide.rst @@ -623,14 +623,21 @@ implementation, however it uses different parameters: The first parameter is the same as HIP's implementation, but ``MIN_BLOCKS_PER_MULTIPROCESSOR`` must be converted to -``MIN_WARPS_PER_EXECUTION``, which uses warps and execution units rather than -blocks and multiprocessors. This conversion is performed automatically by -:doc:`HIPIFY `, or can be done manually with the following -equation. +``MIN_WARPS_PER_EXECUTION_UNIT``, which uses warps and execution units rather than +blocks and multiprocessors. This conversion can be done manually with the equation +considering the mode GPU works: + +* In Compute Unit (CU) mode, .. code-block:: cpp - MIN_WARPS_PER_EXECUTION_UNIT = (MIN_BLOCKS_PER_MULTIPROCESSOR * MAX_THREADS_PER_BLOCK) / warpSize + MIN_WARPS_PER_EXECUTION_UNIT = (MIN_BLOCKS_PER_MULTIPROCESSOR * MAX_THREADS_PER_BLOCK) / (warpSize * 2) + +* In Workgroup Processor (WGP) mode, + +.. code-block:: cpp + + MIN_WARPS_PER_EXECUTION_UNIT = (MIN_BLOCKS_PER_MULTIPROCESSOR * MAX_THREADS_PER_BLOCK) / (warpSize * 4) Directly controlling the warps per execution unit makes it easier to reason about the occupancy, unlike with blocks, where the occupancy depends on the