From a2ea4a91c5273652347cf8e874d197fa55425358 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 [ROCm/clr commit: d2008f93f4c0a0b81e0499fd87b9da95b8db0175] --- projects/clr/hipamd/tests/src/cg/hipCGGridGroupType.cpp | 6 ++++++ .../hipamd/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp | 6 ++++++ .../hipamd/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/projects/clr/hipamd/tests/src/cg/hipCGGridGroupType.cpp b/projects/clr/hipamd/tests/src/cg/hipCGGridGroupType.cpp index 99fe5d88a2..db45c10512 100644 --- a/projects/clr/hipamd/tests/src/cg/hipCGGridGroupType.cpp +++ b/projects/clr/hipamd/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/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp b/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp index c1d3a66106..11562dfff6 100644 --- a/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaBaseType.cpp +++ b/projects/clr/hipamd/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/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp b/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp index 50a2c2fd2e..21f0348aec 100644 --- a/projects/clr/hipamd/tests/src/cg/hipCGGridGroupTypeViaPublicApi.cpp +++ b/projects/clr/hipamd/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) {