SWDEV-465204 - Fix Unit_hipModuleLaunchKernel_Negative_Parameters
Change-Id: I754d1835366f131f44d56da05ac24bc152cbfa47
[ROCm/hip-tests commit: ad5b55a2c4]
This commit is contained in:
committed by
Rakesh Roy
parent
5cc4ae3555
commit
0f5eb7e1f1
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -65,8 +65,8 @@ template <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> void ModuleLaunchKernelPositiveParamet
|
||||
template <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> 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 <ExtModuleLaunchKernelSig* func> 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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user