From e71067a7ecf90d3f864fce30459dcc06a5717f9c Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Thu, 10 Sep 2020 10:35:02 -0400 Subject: [PATCH] SWDEV-251884 - Add Coop Launch Dev Property Checks in Co-operative Groups test cases. Change-Id: I7b54a559d8abe0d5d5c77e48868b1332477a39f8 --- tests/src/cg/hipCGGridGroupType.cpp | 6 ++++++ tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp | 6 ++++++ tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/tests/src/cg/hipCGGridGroupType.cpp b/tests/src/cg/hipCGGridGroupType.cpp index 99fe5d88a2..db45c10512 100644 --- a/tests/src/cg/hipCGGridGroupType.cpp +++ b/tests/src/cg/hipCGGridGroupType.cpp @@ -137,6 +137,12 @@ int main() ASSERT_EQUAL(hipGetDeviceProperties(&deviceProperties, deviceId), hipSuccess); int maxThreadsPerBlock = deviceProperties.maxThreadsPerBlock; + if (!deviceProperties.cooperativeLaunch) { + std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n"; + passed(); + return 0; + } + // Test block sizes which are powers of 2 int i = 0; while (true) { diff --git a/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp b/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp index c1d3a66106..11562dfff6 100644 --- a/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp +++ b/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp @@ -137,6 +137,12 @@ int main() ASSERT_EQUAL(hipGetDeviceProperties(&deviceProperties, deviceId), hipSuccess); int maxThreadsPerBlock = deviceProperties.maxThreadsPerBlock; + if (!deviceProperties.cooperativeLaunch) { + std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n"; + passed(); + return 0; + } + // Test block sizes which are powers of 2 int i = 0; while (true) { diff --git a/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp b/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp index 50a2c2fd2e..21f0348aec 100644 --- a/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp +++ b/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp @@ -137,6 +137,12 @@ int main() ASSERT_EQUAL(hipGetDeviceProperties(&deviceProperties, deviceId), hipSuccess); int maxThreadsPerBlock = deviceProperties.maxThreadsPerBlock; + if (!deviceProperties.cooperativeLaunch) { + std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n"; + passed(); + return 0; + } + // Test block sizes which are powers of 2 int i = 0; while (true) {