From a7dd22f97fe971c0d64474a114854978e2a52df6 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Tue, 17 Dec 2024 06:58:45 +0000 Subject: [PATCH] SWDEV-504960 - Check image support. Change-Id: Ieda106374eb066cd20ddd1194a9f9b1352c26d05 --- catch/unit/memory/hipMemcpyHtoAAsync.cc | 2 ++ catch/unit/texture/hipTexRefGetArray.cc | 2 ++ catch/unit/texture/hipTexRefSetArray.cc | 3 +++ 3 files changed, 7 insertions(+) diff --git a/catch/unit/memory/hipMemcpyHtoAAsync.cc b/catch/unit/memory/hipMemcpyHtoAAsync.cc index 1ceceb63d6..190b1f7c4c 100644 --- a/catch/unit/memory/hipMemcpyHtoAAsync.cc +++ b/catch/unit/memory/hipMemcpyHtoAAsync.cc @@ -109,6 +109,7 @@ TEST_CASE("Unit_hipMemcpyHtoAAsync_BasicTstsWithDiffStreams") { HipTest::HIP_SKIP_TEST("API currently unsupported on nvidia, skipping..."); return; #else + CHECK_IMAGE_SUPPORT HIP_CHECK(hipSetDevice(0)); int row, col; row = 1; @@ -174,6 +175,7 @@ TEST_CASE("Unit_hipMemcpyHtoAAsync_MultiDevice") { HipTest::HIP_SKIP_TEST("API currently unsupported on nvidia, skipping..."); return; #else + CHECK_IMAGE_SUPPORT int devCount = 0; HIP_CHECK(hipGetDeviceCount(&devCount)); for (int i=0; i < devCount; i++) { diff --git a/catch/unit/texture/hipTexRefGetArray.cc b/catch/unit/texture/hipTexRefGetArray.cc index 2edd180279..d07c8af12a 100644 --- a/catch/unit/texture/hipTexRefGetArray.cc +++ b/catch/unit/texture/hipTexRefGetArray.cc @@ -24,6 +24,7 @@ THE SOFTWARE. texture tex; TEST_CASE("Unit_hipTexRefGetArray_Positive") { + CHECK_IMAGE_SUPPORT hipArray_t array_set = nullptr; hipArray_t array_get = nullptr; hipModule_t module = nullptr; @@ -47,6 +48,7 @@ TEST_CASE("Unit_hipTexRefGetArray_Positive") { } TEST_CASE("Unit_hipTexRefGetArray_Negative") { + CHECK_IMAGE_SUPPORT hipArray_t array_set = nullptr; hipArray_t array_get = nullptr; hipModule_t module = nullptr; diff --git a/catch/unit/texture/hipTexRefSetArray.cc b/catch/unit/texture/hipTexRefSetArray.cc index 719b9531d6..9fcbdb7d61 100644 --- a/catch/unit/texture/hipTexRefSetArray.cc +++ b/catch/unit/texture/hipTexRefSetArray.cc @@ -24,6 +24,7 @@ THE SOFTWARE. texture tex; TEST_CASE("Unit_hipTexRefSetArray_Positive") { + CHECK_IMAGE_SUPPORT hipArray_t array_set = nullptr; hipArray_t array_get = nullptr; hipModule_t module = nullptr; @@ -47,6 +48,7 @@ TEST_CASE("Unit_hipTexRefSetArray_Positive") { } TEST_CASE("Unit_hipTexRefSetArray_CheckData") { + CHECK_IMAGE_SUPPORT hipModule_t module = nullptr; hipTexRef tex_ref = nullptr; int num_channels = 0; @@ -75,6 +77,7 @@ TEST_CASE("Unit_hipTexRefSetArray_CheckData") { } TEST_CASE("Unit_hipTexRefSetArray_Negative") { + CHECK_IMAGE_SUPPORT hipArray_t array_set = nullptr; hipModule_t module = nullptr; hipTexRef tex_ref = nullptr;