SWDEV-465220 - Update Kernel Launch negative cases to match with current CLR code.

Change-Id: I891544cdfdc1092467454189ea348f986fc12818
Tá an tiomantas seo le fáil i:
Jaydeep Patel
2024-06-03 11:00:55 +00:00
tiomanta ag Rakesh Roy
tuismitheoir 5007b3f5e4
tiomantas 192528c7f2
D'athraigh 6 comhad le 266 breiseanna agus 25 scriosta
+5 -5
Féach ar an gComhad
@@ -113,21 +113,21 @@ TEST_CASE("Unit_hipLaunchKernel_Negative_Parameters") {
const unsigned int x = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimX, 0) + 1u;
HIP_CHECK_ERROR(hipLaunchKernel(reinterpret_cast<void*>(kernel), dim3{1, 1, 1}, dim3{x, 1, 1},
nullptr, 0, nullptr),
hipErrorInvalidConfiguration);
hipErrorInvalidValue);
}
SECTION("blockDim.y > maxBlockDimY") {
const unsigned int y = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimY, 0) + 1u;
HIP_CHECK_ERROR(hipLaunchKernel(reinterpret_cast<void*>(kernel), dim3{1, 1, 1}, dim3{1, y, 1},
nullptr, 0, nullptr),
hipErrorInvalidConfiguration);
hipErrorInvalidValue);
}
SECTION("blockDim.z > maxBlockDimZ") {
const unsigned int z = GetDeviceAttribute(hipDeviceAttributeMaxBlockDimZ, 0) + 1u;
HIP_CHECK_ERROR(hipLaunchKernel(reinterpret_cast<void*>(kernel), dim3{1, 1, 1}, dim3{1, 1, z},
nullptr, 0, nullptr),
hipErrorInvalidConfiguration);
hipErrorInvalidValue);
}
SECTION("blockDim.x * blockDim.y * blockDim.z > maxThreadsPerBlock") {
@@ -135,14 +135,14 @@ TEST_CASE("Unit_hipLaunchKernel_Negative_Parameters") {
const unsigned int dim = std::ceil(std::cbrt(max));
HIP_CHECK_ERROR(hipLaunchKernel(reinterpret_cast<void*>(kernel), dim3{1, 1, 1},
dim3{dim, dim, dim}, nullptr, 0, nullptr),
hipErrorInvalidConfiguration);
hipErrorInvalidValue);
}
SECTION("sharedMemBytes > maxSharedMemoryPerBlock") {
const unsigned int max = GetDeviceAttribute(hipDeviceAttributeMaxSharedMemoryPerBlock, 0) + 1u;
HIP_CHECK_ERROR(hipLaunchKernel(reinterpret_cast<void*>(kernel), dim3{1, 1, 1}, dim3{1, 1, 1},
nullptr, max, nullptr),
hipErrorOutOfMemory);
hipErrorInvalidValue);
}
SECTION("Invalid stream") {