From fed700823043659f0c4bfb74af8e6148ebdb62a2 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Tue, 5 Mar 2024 11:15:08 +0000 Subject: [PATCH] SWDEV-448989 - Check image support. Change-Id: Id245c3f348c6c7b4146224f93534443f93a01a9d [ROCm/hip-tests commit: bffc913f8c02051dd7c10c4fdc6bfb4315743be3] --- projects/hip-tests/catch/performance/memcpy/hipMemcpy2D.cc | 4 ++++ .../hip-tests/catch/performance/memcpy/hipMemcpy2DAsync.cc | 4 ++++ .../catch/performance/memcpy/hipMemcpy2DFromArray.cc | 3 +++ .../catch/performance/memcpy/hipMemcpy2DFromArrayAsync.cc | 3 +++ .../hip-tests/catch/performance/memcpy/hipMemcpy2DToArray.cc | 3 +++ .../catch/performance/memcpy/hipMemcpy2DToArrayAsync.cc | 3 +++ projects/hip-tests/catch/performance/memcpy/hipMemcpy3D.cc | 5 +++++ .../hip-tests/catch/performance/memcpy/hipMemcpy3DAsync.cc | 5 +++++ projects/hip-tests/catch/performance/memcpy/hipMemcpyAtoH.cc | 1 + projects/hip-tests/catch/performance/memcpy/hipMemcpyHtoA.cc | 1 + .../hip-tests/catch/performance/memcpy/hipMemcpyParam2D.cc | 3 +++ .../catch/performance/memcpy/hipMemcpyParam2DAsync.cc | 3 +++ projects/hip-tests/catch/performance/memset/hipMemset2D.cc | 1 + .../hip-tests/catch/performance/memset/hipMemset2DAsync.cc | 1 + projects/hip-tests/catch/performance/memset/hipMemset3D.cc | 1 + .../hip-tests/catch/performance/memset/hipMemset3DAsync.cc | 1 + .../hip-tests/catch/unit/cooperativeGrps/multi_grid_group.cc | 1 + projects/hip-tests/catch/unit/graph/hipGraphAddMemcpyNode.cc | 1 + .../catch/unit/graph/hipGraphMemcpyNodeGetParams.cc | 1 + .../catch/unit/graph/hipGraphMemcpyNodeSetParams.cc | 1 + .../hip-tests/catch/unit/memory/hipMemPoolSetGetAccess.cc | 1 + projects/hip-tests/catch/unit/memory/hipMemcpy2D.cc | 3 +++ projects/hip-tests/catch/unit/memory/hipMemcpy2DAsync.cc | 3 +++ projects/hip-tests/catch/unit/memory/hipMemcpyParam2D.cc | 3 +++ .../hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc | 3 +++ 25 files changed, 59 insertions(+) diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2D.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2D.cc index 187eed2d1c..1253cb038d 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2D.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2D.cc @@ -92,6 +92,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, bool e * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2D_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToHost); } @@ -112,6 +113,7 @@ TEST_CASE("Performance_hipMemcpy2D_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2D_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -152,6 +154,7 @@ TEST_CASE("Performance_hipMemcpy2D_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2D_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -174,6 +177,7 @@ TEST_CASE("Performance_hipMemcpy2D_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2D_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DAsync.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DAsync.cc index 313075d749..64d9b1eb84 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DAsync.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DAsync.cc @@ -97,6 +97,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, bool e * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DAsync_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToHost); } @@ -117,6 +118,7 @@ TEST_CASE("Performance_hipMemcpy2DAsync_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DAsync_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -157,6 +159,7 @@ TEST_CASE("Performance_hipMemcpy2DAsync_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DAsync_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -179,6 +182,7 @@ TEST_CASE("Performance_hipMemcpy2DAsync_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DAsync_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArray.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArray.cc index b86c52db55..e601ea9f26 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArray.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArray.cc @@ -76,6 +76,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArray_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToHost); } @@ -96,6 +97,7 @@ TEST_CASE("Performance_hipMemcpy2DFromArray_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArray_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -118,6 +120,7 @@ TEST_CASE("Performance_hipMemcpy2DFromArray_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArray_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArrayAsync.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArrayAsync.cc index 3f8f27d13e..cadb343e2e 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArrayAsync.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DFromArrayAsync.cc @@ -82,6 +82,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArrayAsync_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToHost); } @@ -102,6 +103,7 @@ TEST_CASE("Performance_hipMemcpy2DFromArrayAsync_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArrayAsync_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -124,6 +126,7 @@ TEST_CASE("Performance_hipMemcpy2DFromArrayAsync_DeviceToDevice_DisablePeerAcces * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DFromArrayAsync_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArray.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArray.cc index 858aa7e31b..d690a1b55a 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArray.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArray.cc @@ -76,6 +76,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArray_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -96,6 +97,7 @@ TEST_CASE("Performance_hipMemcpy2DToArray_HostToDevice") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArray_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -118,6 +120,7 @@ TEST_CASE("Performance_hipMemcpy2DToArray_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArray_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArrayAsync.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArrayAsync.cc index ae501a3a0f..0ef1514274 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArrayAsync.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy2DToArrayAsync.cc @@ -82,6 +82,7 @@ static void RunBenchmark(size_t width, size_t height, hipMemcpyKind kind, * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArrayAsync_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -102,6 +103,7 @@ TEST_CASE("Performance_hipMemcpy2DToArrayAsync_HostToDevice") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArrayAsync_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 8_KB, 16_KB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -124,6 +126,7 @@ TEST_CASE("Performance_hipMemcpy2DToArrayAsync_DeviceToDevice_DisablePeerAccess" * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy2DToArrayAsync_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy3D.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy3D.cc index 7452fb385a..933282de92 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy3D.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy3D.cc @@ -98,6 +98,7 @@ static void RunBenchmark(const hipExtent extent, hipMemcpyKind kind, bool enable * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3D_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyDeviceToHost); } @@ -118,6 +119,7 @@ TEST_CASE("Performance_hipMemcpy3D_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3D_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyHostToDevice); } @@ -138,6 +140,7 @@ TEST_CASE("Performance_hipMemcpy3D_HostToDevice") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3D_HostToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyHostToHost); } @@ -158,6 +161,7 @@ TEST_CASE("Performance_hipMemcpy3D_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3D_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyDeviceToDevice); } @@ -180,6 +184,7 @@ TEST_CASE("Performance_hipMemcpy3D_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3D_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpy3DAsync.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpy3DAsync.cc index 0b624db6f6..afc8257734 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpy3DAsync.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpy3DAsync.cc @@ -103,6 +103,7 @@ static void RunBenchmark(const hipExtent extent, hipMemcpyKind kind, bool enable * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3DAsync_DeviceToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyDeviceToHost); } @@ -123,6 +124,7 @@ TEST_CASE("Performance_hipMemcpy3DAsync_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3DAsync_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyHostToDevice); } @@ -143,6 +145,7 @@ TEST_CASE("Performance_hipMemcpy3DAsync_HostToDevice") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3DAsync_HostToHost") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyHostToHost); } @@ -163,6 +166,7 @@ TEST_CASE("Performance_hipMemcpy3DAsync_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3DAsync_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(make_hipExtent(width, 16, 4), hipMemcpyDeviceToDevice); } @@ -183,6 +187,7 @@ TEST_CASE("Performance_hipMemcpy3DAsync_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpy3DAsync_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpyAtoH.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpyAtoH.cc index 597a01bc81..7ded8116d7 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpyAtoH.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpyAtoH.cc @@ -63,6 +63,7 @@ static void RunBenchmark(LinearAllocs host_allocation_type, size_t width) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyAtoH") { + CHECK_IMAGE_SUPPORT const auto allocation_size = GENERATE(512, 1024, 4096); const auto host_allocation_type = GENERATE(LinearAllocs::malloc, LinearAllocs::hipHostMalloc); RunBenchmark(host_allocation_type, allocation_size); diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpyHtoA.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpyHtoA.cc index 153e16efc0..a260621d0d 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpyHtoA.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpyHtoA.cc @@ -63,6 +63,7 @@ static void RunBenchmark(LinearAllocs host_allocation_type, size_t width) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyHtoA") { + CHECK_IMAGE_SUPPORT const auto allocation_size = GENERATE(512, 1024, 4096); const auto host_allocation_type = GENERATE(LinearAllocs::malloc, LinearAllocs::hipHostMalloc); RunBenchmark(host_allocation_type, allocation_size); diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2D.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2D.cc index 2b794e6e30..cd8db7d353 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2D.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2D.cc @@ -115,6 +115,7 @@ TEST_CASE("Performance_hipMemcpyParam2D_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2D_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -157,6 +158,7 @@ TEST_CASE("Performance_hipMemcpyParam2D_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2D_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -179,6 +181,7 @@ TEST_CASE("Performance_hipMemcpyParam2D_DeviceToDevice_DisablePeerAccess") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2D_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2DAsync.cc b/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2DAsync.cc index ef8e5b2cd2..42221fca82 100644 --- a/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2DAsync.cc +++ b/projects/hip-tests/catch/performance/memcpy/hipMemcpyParam2DAsync.cc @@ -120,6 +120,7 @@ TEST_CASE("Performance_hipMemcpyParam2DAsync_DeviceToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2DAsync_HostToDevice") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyHostToDevice); } @@ -162,6 +163,7 @@ TEST_CASE("Performance_hipMemcpyParam2DAsync_HostToHost") { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2DAsync_DeviceToDevice_DisablePeerAccess") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32, hipMemcpyDeviceToDevice); } @@ -184,6 +186,7 @@ TEST_CASE("Performance_hipMemcpyParam2DAsync_DeviceToDevice_DisablePeerAccess") * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemcpyParam2DAsync_DeviceToDevice_EnablePeerAccess") { + CHECK_IMAGE_SUPPORT if (HipTest::getDeviceCount() < 2) { HipTest::HIP_SKIP_TEST("This test requires 2 GPUs. Skipping."); return; diff --git a/projects/hip-tests/catch/performance/memset/hipMemset2D.cc b/projects/hip-tests/catch/performance/memset/hipMemset2D.cc index 8384be095d..0bd3ffa6a4 100644 --- a/projects/hip-tests/catch/performance/memset/hipMemset2D.cc +++ b/projects/hip-tests/catch/performance/memset/hipMemset2D.cc @@ -66,6 +66,7 @@ static void RunBenchmark(size_t width, size_t height) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemset2D") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32); } diff --git a/projects/hip-tests/catch/performance/memset/hipMemset2DAsync.cc b/projects/hip-tests/catch/performance/memset/hipMemset2DAsync.cc index 4f6c68d418..79f0e72840 100644 --- a/projects/hip-tests/catch/performance/memset/hipMemset2DAsync.cc +++ b/projects/hip-tests/catch/performance/memset/hipMemset2DAsync.cc @@ -69,6 +69,7 @@ static void RunBenchmark(size_t width, size_t height) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemset2DAsync") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 32); } diff --git a/projects/hip-tests/catch/performance/memset/hipMemset3D.cc b/projects/hip-tests/catch/performance/memset/hipMemset3D.cc index 69acea51c6..696b0743ff 100644 --- a/projects/hip-tests/catch/performance/memset/hipMemset3D.cc +++ b/projects/hip-tests/catch/performance/memset/hipMemset3D.cc @@ -67,6 +67,7 @@ static void RunBenchmark(size_t width, size_t height, size_t depth) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemset3D") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 16, 4); } diff --git a/projects/hip-tests/catch/performance/memset/hipMemset3DAsync.cc b/projects/hip-tests/catch/performance/memset/hipMemset3DAsync.cc index 7efb344f9f..13dd1bc8be 100644 --- a/projects/hip-tests/catch/performance/memset/hipMemset3DAsync.cc +++ b/projects/hip-tests/catch/performance/memset/hipMemset3DAsync.cc @@ -69,6 +69,7 @@ static void RunBenchmark(size_t width, size_t height, size_t depth) { * - HIP_VERSION >= 5.2 */ TEST_CASE("Performance_hipMemset3DAsync") { + CHECK_IMAGE_SUPPORT const auto width = GENERATE(4_KB, 4_MB, 16_MB); RunBenchmark(width, 16, 4); } diff --git a/projects/hip-tests/catch/unit/cooperativeGrps/multi_grid_group.cc b/projects/hip-tests/catch/unit/cooperativeGrps/multi_grid_group.cc index a92af4e10a..3550185024 100644 --- a/projects/hip-tests/catch/unit/cooperativeGrps/multi_grid_group.cc +++ b/projects/hip-tests/catch/unit/cooperativeGrps/multi_grid_group.cc @@ -539,6 +539,7 @@ TEST_CASE("Unit_Multi_Grid_Group_Getters_Positive_Non_Member_Functions") { * - Devices support cooperative multi device launch */ TEST_CASE("Unit_Multi_Grid_Group_Positive_Sync") { + CHECK_IMAGE_SUPPORT int num_devices = 0; HIP_CHECK(hipGetDeviceCount(&num_devices)); num_devices = min(num_devices, kMaxGPUs); diff --git a/projects/hip-tests/catch/unit/graph/hipGraphAddMemcpyNode.cc b/projects/hip-tests/catch/unit/graph/hipGraphAddMemcpyNode.cc index 57b5d3f0b6..d15079346a 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphAddMemcpyNode.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphAddMemcpyNode.cc @@ -52,6 +52,7 @@ THE SOFTWARE. * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipGraphAddMemcpyNode_Positive_Basic") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; SECTION("Device to host") { Memcpy3DDeviceToHostShell(Memcpy3DWrapper); } diff --git a/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeGetParams.cc b/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeGetParams.cc index 752aae29c5..7e2b90249d 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeGetParams.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeGetParams.cc @@ -50,6 +50,7 @@ THE SOFTWARE. * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipGraphMemcpyNodeGetParams_Negative_Parameters") { + CHECK_IMAGE_SUPPORT constexpr hipExtent extent{128 * sizeof(int), 128, 8}; LinearAllocGuard3D src_alloc(extent); diff --git a/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeSetParams.cc b/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeSetParams.cc index d56596164f..e43f8eba31 100644 --- a/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeSetParams.cc +++ b/projects/hip-tests/catch/unit/graph/hipGraphMemcpyNodeSetParams.cc @@ -52,6 +52,7 @@ THE SOFTWARE. * - HIP_VERSION >= 5.2 */ TEST_CASE("Unit_hipGraphMemcpyNodeSetParams_Positive_Basic") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; SECTION("Device to host") { diff --git a/projects/hip-tests/catch/unit/memory/hipMemPoolSetGetAccess.cc b/projects/hip-tests/catch/unit/memory/hipMemPoolSetGetAccess.cc index ddb0f4e8fc..1727b5b8f6 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemPoolSetGetAccess.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemPoolSetGetAccess.cc @@ -249,6 +249,7 @@ TEST_CASE("Unit_hipMemPoolSetGetAccess_Positive_P2P") { * - HIP_VERSION >= 6.0 */ TEST_CASE("Unit_hipMemPoolSetAccess_Negative_Parameters") { + CHECK_IMAGE_SUPPORT int device_id = 0; HIP_CHECK(hipSetDevice(device_id)); diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpy2D.cc b/projects/hip-tests/catch/unit/memory/hipMemcpy2D.cc index 2ae89fc5cb..611cf13363 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpy2D.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpy2D.cc @@ -28,6 +28,7 @@ THE SOFTWARE. #include TEST_CASE("Unit_hipMemcpy2D_Positive_Basic") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; SECTION("Device to Host") { Memcpy2DDeviceToHostShell(hipMemcpy2D); } @@ -66,11 +67,13 @@ TEST_CASE("Unit_hipMemcpy2D_Positive_Synchronization_Behavior") { } TEST_CASE("Unit_hipMemcpy2D_Positive_Parameters") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; Memcpy2DZeroWidthHeight(hipMemcpy2D); } TEST_CASE("Unit_hipMemcpy2D_Negative_Parameters") { + CHECK_IMAGE_SUPPORT constexpr size_t cols = 128; constexpr size_t rows = 128; diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpy2DAsync.cc b/projects/hip-tests/catch/unit/memory/hipMemcpy2DAsync.cc index 4639993b9c..3dbadf36f7 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpy2DAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpy2DAsync.cc @@ -64,6 +64,7 @@ TEST_CASE("Unit_hipMemcpy2DAsync_Positive_Basic") { } TEST_CASE("Unit_hipMemcpy2DAsync_Positive_Synchronization_Behavior") { + CHECK_IMAGE_SUPPORT using namespace std::placeholders; HIP_CHECK(hipDeviceSynchronize()); @@ -99,12 +100,14 @@ TEST_CASE("Unit_hipMemcpy2DAsync_Positive_Synchronization_Behavior") { } TEST_CASE("Unit_hipMemcpy2DAsync_Positive_Parameters") { + CHECK_IMAGE_SUPPORT using namespace std::placeholders; constexpr bool async = true; Memcpy2DZeroWidthHeight(std::bind(hipMemcpy2DAsync, _1, _2, _3, _4, _5, _6, _7, nullptr)); } TEST_CASE("Unit_hipMemcpy2DAsync_Negative_Parameters") { + CHECK_IMAGE_SUPPORT constexpr size_t cols = 128; constexpr size_t rows = 128; diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2D.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2D.cc index f2b5b270ce..e1f7006626 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2D.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2D.cc @@ -28,6 +28,7 @@ THE SOFTWARE. #include TEST_CASE("Unit_hipMemcpyParam2D_Positive_Basic") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; #if HT_NVIDIA // Disabled on AMD due to defect - EXSWHTEC-236 @@ -79,6 +80,7 @@ TEST_CASE("Unit_hipMemcpyParam2D_Positive_Synchronization_Behavior") { } TEST_CASE("Unit_hipMemcpyParam2D_Positive_Parameters") { + CHECK_IMAGE_SUPPORT constexpr bool async = false; Memcpy2DZeroWidthHeight(MemcpyParam2DAdapter()); } @@ -94,6 +96,7 @@ TEST_CASE("Unit_hipMemcpyParam2D_Positive_Array") { } TEST_CASE("Unit_hipMemcpyParam2D_Negative_Parameters") { + CHECK_IMAGE_SUPPORT constexpr size_t cols = 128; constexpr size_t rows = 128; diff --git a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc index 44ec9b01cb..5240eb056c 100644 --- a/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc +++ b/projects/hip-tests/catch/unit/memory/hipMemcpyParam2DAsync.cc @@ -65,6 +65,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Positive_Basic") { } TEST_CASE("Unit_hipMemcpyParam2DAsync_Positive_Synchronization_Behavior") { + CHECK_IMAGE_SUPPORT using namespace std::placeholders; constexpr bool async = true; @@ -100,6 +101,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Positive_Synchronization_Behavior") { } TEST_CASE("Unit_hipMemcpyParam2DAsync_Positive_Parameters") { + CHECK_IMAGE_SUPPORT constexpr bool async = true; Memcpy2DZeroWidthHeight(MemcpyParam2DAdapter()); } @@ -115,6 +117,7 @@ TEST_CASE("Unit_hipMemcpyParam2DAsync_Positive_Array") { } TEST_CASE("Unit_hipMemcpyParam2DAsync_Negative_Parameters") { + CHECK_IMAGE_SUPPORT constexpr bool async = true; constexpr size_t cols = 128;