From 8531cd3bbea1678321fe291443cdaaca84ee86f3 Mon Sep 17 00:00:00 2001 From: "Patel, Jaydeepkumar" Date: Thu, 10 Apr 2025 02:46:16 -0700 Subject: [PATCH] SWDEV-508973 - If total # of threads/block is more than HW capacity, it's invalid config issue and should return invalid config error. (#25) --- hipamd/src/hip_module.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hipamd/src/hip_module.cpp b/hipamd/src/hip_module.cpp index cc355a131a..ebc1bd09a0 100644 --- a/hipamd/src/hip_module.cpp +++ b/hipamd/src/hip_module.cpp @@ -285,7 +285,9 @@ hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWorkSizeX, } // Make sure dispatch doesn't exceed max workgroup size limit if (blockDimX * blockDimY * blockDimZ > info.maxWorkGroupSize_) { - return hipErrorInvalidValue; + return (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_LAUNCH_KERNEL) ? + hipErrorInvalidConfiguration : + hipErrorInvalidValue; } hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f); amd::Kernel* kernel = function->kernel();