From 0f5eb7e1f10bf8b2476e0647166de1f3aa098d3a Mon Sep 17 00:00:00 2001 From: Marko Arandjelovic Date: Wed, 5 Jun 2024 14:46:08 +0200 Subject: [PATCH] SWDEV-465204 - Fix Unit_hipModuleLaunchKernel_Negative_Parameters Change-Id: I754d1835366f131f44d56da05ac24bc152cbfa47 [ROCm/hip-tests commit: ad5b55a2c43736fc17c0d9bceb634ec2915f1555] --- .../catch/hipTestMain/config/config_amd_linux | 1 - .../hipTestMain/config/config_amd_windows | 1 - .../module/hip_module_launch_kernel_common.hh | 24 +++---------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux index cd4ef8d14f..0b0cdf4ebc 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_linux +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_linux @@ -234,7 +234,6 @@ "Unit_hipDrvGraphAddMemsetNode_hipMalloc3D_1D", "Unit_hipDrvGraphAddMemsetNode_hipMalloc_1D", "Unit_hipDrvGraphAddMemsetNode_hipMallocManaged", - "Unit_hipModuleLaunchKernel_Negative_Parameters", "Unit_hipModuleLaunchCooperativeKernel_Negative_Parameters", "Unit_hipExtModuleLaunchKernel_Negative_Parameters", "Unit_hipLaunchKernel_Negative_Parameters", diff --git a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows index 3ef3d1acea..933f91b6d0 100644 --- a/projects/hip-tests/catch/hipTestMain/config/config_amd_windows +++ b/projects/hip-tests/catch/hipTestMain/config/config_amd_windows @@ -615,7 +615,6 @@ "Unit_tex2DLayeredLod_Positive_ReadModeNormalizedFloat - unsigned char", "Unit_tex2DLayeredLod_Positive_ReadModeNormalizedFloat - short", "Unit_tex2DLayeredLod_Positive_ReadModeNormalizedFloat - unsigned short", - "Unit_hipModuleLaunchKernel_Negative_Parameters", "Unit_hipExtModuleLaunchKernel_Negative_Parameters", "Unit_hipLaunchKernel_Negative_Parameters", "Unit_Kernel_Launch_bounds_Negative_OutOfBounds", diff --git a/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh b/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh index e033a8eb88..94f1fd57a3 100644 --- a/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh +++ b/projects/hip-tests/catch/unit/module/hip_module_launch_kernel_common.hh @@ -65,8 +65,8 @@ template void ModuleLaunchKernelPositiveBasic() size_t size = sizeof(result_ptr); // clang-format off void *extra[] = { - HIP_LAUNCH_PARAM_BUFFER_POINTER, &result_ptr, - HIP_LAUNCH_PARAM_BUFFER_SIZE, &size, + HIP_LAUNCH_PARAM_BUFFER_POINTER, &result_ptr, + HIP_LAUNCH_PARAM_BUFFER_SIZE, &size, HIP_LAUNCH_PARAM_END }; // clang-format on @@ -121,14 +121,11 @@ template void ModuleLaunchKernelPositiveParamet template void ModuleLaunchKernelNegativeParameters() { hipFunction_t f = GetKernel(mg.module(), "NOPKernel"); -// Disabled on AMD due to defect - EXSWHTEC-157 -#if HT_NVIDIA SECTION("f == nullptr") { HIP_CHECK_ERROR( func(nullptr, 1, 1, 1, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), hipErrorInvalidResourceHandle); } -#endif SECTION("gridDimX == 0") { HIP_CHECK_ERROR(func(f, 0, 1, 1, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), @@ -160,8 +157,6 @@ template void ModuleLaunchKernelNegativeParamet hipErrorInvalidValue); } -// Disabled on AMD due to defect - EXSWHTEC-158 -#if HT_NVIDIA SECTION("gridDimX > maxGridDimX") { const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxGridDimX, 0) + 1u; HIP_CHECK_ERROR(func(f, x, 1, 1, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), @@ -179,10 +174,7 @@ template void ModuleLaunchKernelNegativeParamet HIP_CHECK_ERROR(func(f, 1, 1, z, 1, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), hipErrorInvalidValue); } -#endif -// Disabled on AMD due to defect - EXSWHTEC-156 -#if HT_NVIDIA SECTION("blockDimX > maxBlockDimX") { const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimX, 0) + 1u; HIP_CHECK_ERROR(func(f, 1, 1, 1, x, 1, 1, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), @@ -200,10 +192,7 @@ template void ModuleLaunchKernelNegativeParamet HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, z, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), hipErrorInvalidValue); } -#endif -// Disabled on AMD due to defect - EXSWHTEC-162 -#if HT_NVIDIA SECTION("blockDimX * blockDimY * blockDimZ > MaxThreadsPerBlock") { const unsigned int max = GetDeviceAttribute(hipDeviceAttributeMaxThreadsPerBlock, 0); const unsigned int dim = std::ceil(std::cbrt(max)) + 1; @@ -211,16 +200,12 @@ template void ModuleLaunchKernelNegativeParamet func(f, 1, 1, 1, dim, dim, dim, 0, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), hipErrorInvalidValue); } -#endif -// Disabled on AMD due to defect - EXSWHTEC-159 -#if HT_NVIDIA SECTION("sharedMemBytes > max shared memory per block") { const unsigned int max = GetDeviceAttribute(hipDeviceAttributeMaxSharedMemoryPerBlock, 0) + 1u; HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, 1, max, nullptr, nullptr, nullptr, nullptr, nullptr, 0u), hipErrorInvalidValue); } -#endif // Disabled on AMD due to defect - EXSWHTEC-160 #if HT_NVIDIA @@ -250,13 +235,10 @@ template void ModuleLaunchKernelNegativeParamet hipErrorInvalidValue); } -// Disabled on AMD due to defect - EXSWHTEC-161 -#if HT_NVIDIA SECTION("Invalid extra") { hipFunction_t f = GetKernel(mg.module(), "Kernel42"); void* extra[0] = {}; HIP_CHECK_ERROR(func(f, 1, 1, 1, 1, 1, 1, 0, nullptr, nullptr, extra, nullptr, nullptr, 0u), hipErrorInvalidValue); } -#endif -} \ No newline at end of file +}