From 834d770ca49be16aefb39d785c1eff1f75626f62 Mon Sep 17 00:00:00 2001 From: "Brzak, Branislav" Date: Wed, 21 May 2025 18:29:11 +0200 Subject: [PATCH] SWDEV-508964 - Match hip launch kernel retuns with cuda (#357) [ROCm/clr commit: 88f15877f671c1bdbea707794d065f76fae5c102] --- projects/clr/hipamd/src/hip_module.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index b747ac14d8..7213b315f0 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -266,12 +266,12 @@ hipError_t ihipLaunchKernel_validate(hipFunction_t f, const amd::LaunchParams& l if ((kernelParams != nullptr) && (extra != nullptr)) { LogPrintfError("%s", "Both, kernelParams and extra Params are provided, only one should be provided"); - return hipErrorInvalidValue; + return hipErrorInvalidConfiguration; } if (launch_params.global_[0] == 0 || launch_params.global_[1] == 0 || launch_params.global_[2] == 0) { - return hipErrorInvalidValue; + return hipErrorInvalidConfiguration; } if (launch_params.local_[0] == 0 || launch_params.local_[1] == 0 @@ -286,9 +286,7 @@ hipError_t ihipLaunchKernel_validate(hipFunction_t f, const amd::LaunchParams& l } // Make sure dispatch doesn't exceed max workgroup size limit if (launch_params.local_.product() > info.maxWorkGroupSize_) { - return (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_LAUNCH_KERNEL) ? - hipErrorInvalidConfiguration : - hipErrorInvalidValue; + return hipErrorInvalidConfiguration; } hip::DeviceFunc* function = hip::DeviceFunc::asFunction(f); amd::Kernel* kernel = function->kernel();