From 8e0e373f69b33dd1d9f4b0ef8e4bf974d3e08188 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Fri, 17 Aug 2018 12:14:42 -0700 Subject: [PATCH 1/3] Check for hipEnvVar at the same level if directed_tests location fails --- tests/src/hipEnvVarDriver.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/src/hipEnvVarDriver.cpp b/tests/src/hipEnvVarDriver.cpp index 599b138565..e52aa46063 100644 --- a/tests/src/hipEnvVarDriver.cpp +++ b/tests/src/hipEnvVarDriver.cpp @@ -38,7 +38,10 @@ int getDeviceNumber() { string str; std::this_thread::sleep_for(std::chrono::milliseconds(10)); if (!(in = popen("./directed_tests/hipEnvVar -c", "r"))) { - return 1; + // Check at same level + if (!(in = popen("./hipEnvVar -c", "r"))) { + return 1; + } } while (fgets(buff, 512, in) != NULL) { cout << buff; @@ -54,7 +57,11 @@ void getDevicePCIBusNumRemote(int deviceID, char* pciBusID) { str += std::to_string(deviceID); std::this_thread::sleep_for(std::chrono::milliseconds(10)); if (!(in = popen(str.c_str(), "r"))) { - exit(1); + // Check at same level + if (!(in = popen("./hipEnvVar -d ", "r"))) { + exit(1); + } + } while (fgets(pciBusID, 100, in) != NULL) { cout << pciBusID; From 1daee67eb682c6962013109f679a65d20a5615b3 Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Fri, 31 Aug 2018 12:54:23 -0700 Subject: [PATCH 2/3] Fix record_event and hipStreamSync2 tests. The test should expect null stream to complete if synchrionize is called as per the spec --- tests/src/runtimeApi/event/record_event.cpp | 4 ++-- tests/src/runtimeApi/stream/hipStreamSync2.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/runtimeApi/event/record_event.cpp b/tests/src/runtimeApi/event/record_event.cpp index afd6bef2ef..3eb54e1735 100644 --- a/tests/src/runtimeApi/event/record_event.cpp +++ b/tests/src/runtimeApi/event/record_event.cpp @@ -170,8 +170,8 @@ void runTests(int64_t numElements) { // for (int waitStart=0; waitStart<2; waitStart++) { for (int waitStart = 1; waitStart >= 0; waitStart--) { unsigned W = waitStart ? 0x1000 : 0; - test(W | 0x01, C_d, C_h, numElements, 0, waitStart, syncNone); - test(W | 0x02, C_d, C_h, numElements, stream, waitStart, syncNone); + test(W | 0x01, C_d, C_h, numElements, 0, 0, syncNone); + test(W | 0x02, C_d, C_h, numElements, stream, 0, syncNone); test(W | 0x04, C_d, C_h, numElements, 0, waitStart, syncStream); test(W | 0x08, C_d, C_h, numElements, stream, waitStart, syncStream); test(W | 0x10, C_d, C_h, numElements, 0, waitStart, syncStopEvent); diff --git a/tests/src/runtimeApi/stream/hipStreamSync2.cpp b/tests/src/runtimeApi/stream/hipStreamSync2.cpp index cf25d0bd2b..652c799792 100644 --- a/tests/src/runtimeApi/stream/hipStreamSync2.cpp +++ b/tests/src/runtimeApi/stream/hipStreamSync2.cpp @@ -178,7 +178,7 @@ void runTests(int64_t numElements) { { test(0x01, C_d, C_h, numElements, syncNone, true /*expectMismatch*/); test(0x02, C_d, C_h, numElements, syncNullStream, false /*expectMismatch*/); - test(0x04, C_d, C_h, numElements, syncOtherStream, true /*expectMismatch*/); + test(0x04, C_d, C_h, numElements, syncOtherStream, false /*expectMismatch*/); test(0x08, C_d, C_h, numElements, syncDevice, false /*expectMismatch*/); // Sending a marker to to null stream may synchronize the otherStream From 9b2107749cd31c34434be03388a136fd17aee69e Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Sat, 15 Sep 2018 13:23:38 +0530 Subject: [PATCH 3/3] Revert changes to runtime/stream/hipStreamSync2 --- tests/src/runtimeApi/stream/hipStreamSync2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/runtimeApi/stream/hipStreamSync2.cpp b/tests/src/runtimeApi/stream/hipStreamSync2.cpp index 652c799792..cf25d0bd2b 100644 --- a/tests/src/runtimeApi/stream/hipStreamSync2.cpp +++ b/tests/src/runtimeApi/stream/hipStreamSync2.cpp @@ -178,7 +178,7 @@ void runTests(int64_t numElements) { { test(0x01, C_d, C_h, numElements, syncNone, true /*expectMismatch*/); test(0x02, C_d, C_h, numElements, syncNullStream, false /*expectMismatch*/); - test(0x04, C_d, C_h, numElements, syncOtherStream, false /*expectMismatch*/); + test(0x04, C_d, C_h, numElements, syncOtherStream, true /*expectMismatch*/); test(0x08, C_d, C_h, numElements, syncDevice, false /*expectMismatch*/); // Sending a marker to to null stream may synchronize the otherStream