[PATCH] drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards

Rajneesh Bhardwaj rajneesh.bhardwaj at amd.com
Thu Feb 1 18:54:45 UTC 2024


In certain cooperative group dispatch scenarios the default SPI resource
allocation may cause reduced per-CU workgroup occupancy. Set
COMPUTE_RESOURCE_LIMITS.FORCE_SIMD_DIST=1 to mitigate soft hang
scenarions.

Suggested-by: Joseph Greathouse <Joseph.Greathouse at amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
index 42d881809dc7..4b28e7dcb62f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
@@ -303,6 +303,10 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,
 		update_cu_mask(mm, mqd, minfo, 0);
 	set_priority(m, q);
 
+	if (KFD_GC_VERSION(mm->dev) >= IP_VERSION(9, 4, 2))
+		m->compute_resource_limits = q->is_gws ?
+			COMPUTE_RESOURCE_LIMITS__FORCE_SIMD_DIST_MASK : 0;
+
 	q->is_active = QUEUE_IS_ACTIVE(*q);
 }
 
-- 
2.34.1



More information about the amd-gfx mailing list