EXSWCPHIPT-50 - Testing HipMalloc3D / HipMallocPitch / HipMemAllocPitch (#2613)

This commit is contained in:
Fábio
2022-07-01 09:54:17 +01:00
committed by GitHub
parent 5628a7c009
commit 79b8653128
3 changed files with 273 additions and 31 deletions
-20
View File
@@ -64,26 +64,6 @@ static void Malloc3DThreadFunc(int gpu) {
MemoryAlloc3DDiffSizes(gpu);
}
/*
* This verifies the negative scenarios of hipMalloc3D API
*/
TEST_CASE("Unit_hipMalloc3D_Negative") {
size_t width = SMALL_SIZE * sizeof(char);
size_t height{SMALL_SIZE}, depth{SMALL_SIZE};
hipPitchedPtr devPitchedPtr;
SECTION("Passing nullptr to device pitched pointer") {
hipExtent extent = make_hipExtent(width, height, depth);
REQUIRE(hipMalloc3D(nullptr, extent) != hipSuccess);
}
SECTION("Passing Max values to extent") {
hipExtent extent = make_hipExtent(std::numeric_limits<size_t>::max(),
std::numeric_limits<size_t>::max(),
std::numeric_limits<size_t>::max());
REQUIRE(hipMalloc3D(&devPitchedPtr, extent) != hipSuccess);
}
}
/*
* This verifies the hipMalloc3D API by
* assigning width,height and depth as 10