SWDEV-508964 - Match hip launch kernel retuns with cuda (#357)

Этот коммит содержится в:
Brzak, Branislav authored and GitHub committed 2025-05-21 21:59:11 +05:30
1 родитель 3cd3b3ffc5
Коммит 88f15877f6
1 file changed
+3 -5
+3 -5
Просмотреть файл
@@ -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();