From f9c415a7c7815c764e0f528a95a1ea2c022dcd7a Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Tue, 26 Jul 2022 12:14:26 +0530 Subject: [PATCH] SWDEV-344691 - hipMalloc3DArray fails if width is more than capacity. (#2819) Change-Id: I3eeaa9ef2b3197b3e5c5f03ccc1ba069dfb64fb7 [ROCm/hip commit: 7db8bde590d4465d68f884109cf317a5e6fd194a] --- .../catch/hipTestMain/config/config_amd_windows.json | 8 ++++++++ projects/hip/tests/catch/unit/memory/hipMemcpy3D.cc | 8 ++++++-- projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/projects/hip/tests/catch/hipTestMain/config/config_amd_windows.json b/projects/hip/tests/catch/hipTestMain/config/config_amd_windows.json index ac7afac6c5..6c129f8778 100644 --- a/projects/hip/tests/catch/hipTestMain/config/config_amd_windows.json +++ b/projects/hip/tests/catch/hipTestMain/config/config_amd_windows.json @@ -34,5 +34,13 @@ "Unit_hipArrayCreate_happy - float4", "Unit_hipMemVmm_Basic", "Unit_hipGraphExecMemcpyNodeSetParamsToSymbol_Functional" + "Unit_hipMallocManaged_MultiChunkMultiDevice", + "Unit_hipMallocManaged_TwoPointers - int", + "Unit_hipMallocManaged_TwoPointers - float", + "Unit_hipMallocManaged_TwoPointers - double", + "Unit_hipMallocManaged_DeviceContextChange - unsigned char", + "Unit_hipMallocManaged_DeviceContextChange - int", + "Unit_hipMallocManaged_DeviceContextChange - float", + "Unit_hipMallocManaged_DeviceContextChange - double" ] } diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy3D.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy3D.cc index 75fc8efe0c..4af0883639 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy3D.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy3D.cc @@ -552,9 +552,13 @@ void Memcpy3D::simple_Memcpy3D() { */ TEMPLATE_TEST_CASE("Unit_hipMemcpy3D_Basic", "[hipMemcpy3D]", int, unsigned int, float) { - int numDevices = 0; - auto i = GENERATE(10, 100, 1024, 10*1024); + int device = -1; + HIP_CHECK(hipGetDevice(&device)); + hipDeviceProp_t prop; + HIP_CHECK(hipGetDeviceProperties(&prop,device)); + auto i = GENERATE_COPY(10, 100, 1024, prop.maxTexture3D[0]); auto j = GENERATE(10, 100); + int numDevices = 0; HIP_CHECK(hipGetDeviceCount(&numDevices)); if (numDevices > 1) { if (std::is_same::value) { diff --git a/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc b/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc index 5918a287c9..1f690fa410 100644 --- a/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc +++ b/projects/hip/tests/catch/unit/memory/hipMemcpy3DAsync.cc @@ -662,7 +662,11 @@ TEMPLATE_TEST_CASE("Unit_hipMemcpy3DAsync_Basic", int, unsigned int, float) { int numDevices = 0; HIP_CHECK(hipGetDeviceCount(&numDevices)); - auto i = GENERATE(10, 100, 1024, 10*1024); + int device = -1; + HIP_CHECK(hipGetDevice(&device)); + hipDeviceProp_t prop; + HIP_CHECK(hipGetDeviceProperties(&prop,device)); + auto i = GENERATE_COPY(10, 100, 1024, prop.maxTexture3D[0]); auto j = GENERATE(10, 100); if (numDevices > 1) { if (std::is_same::value) {