SWDEV-253349 - Add a SKIP state for hip directed tests when HIP_BRINGUP_SKIP macro is used.
Change-Id: If176cf775e568d4b32982127731223fe96a38f0d
[ROCm/hip commit: d1f82881f6]
This commit is contained in:
committed by
Karthik Jayaprakash
vanhempi
7fde2122aa
commit
722bfd0a5d
Regular → Executable
@@ -303,6 +303,7 @@ macro(MAKE_TEST _config exe)
|
||||
add_test(NAME ${testname} CONFIGURATIONS ${_config} COMMAND ${PROJECT_BINARY_DIR}/${exe} ${ARGN})
|
||||
endif()
|
||||
set_tests_properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "PASSED" ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
|
||||
set_tests_properties(${testname} PROPERTIES SKIP_RETURN_CODE 127 ENVIRONMENT HIP_PATH=${HIP_ROOT_DIR})
|
||||
endmacro()
|
||||
|
||||
macro(MAKE_NAMED_TEST _config exe testname)
|
||||
|
||||
Regular → Executable
+5
-1
@@ -139,7 +139,11 @@ int main()
|
||||
|
||||
if (!deviceProperties.cooperativeLaunch) {
|
||||
std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n";
|
||||
passed();
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Regular → Executable
+5
-1
@@ -139,7 +139,11 @@ int main()
|
||||
|
||||
if (!deviceProperties.cooperativeLaunch) {
|
||||
std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n";
|
||||
passed();
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Regular → Executable
+5
-1
@@ -139,7 +139,11 @@ int main()
|
||||
|
||||
if (!deviceProperties.cooperativeLaunch) {
|
||||
std::cout << "info: Device doesn't support cooperative launch! skipping the test!\n";
|
||||
passed();
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Regular → Executable
Regular → Executable
+10
@@ -166,6 +166,16 @@ 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";
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Test block sizes which are powers of 2
|
||||
int i = 0;
|
||||
while (true) {
|
||||
|
||||
Regular → Executable
+10
@@ -135,6 +135,16 @@ 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";
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Test block sizes which are powers of 2
|
||||
int i = 0;
|
||||
while (true) {
|
||||
|
||||
Regular → Executable
+10
@@ -135,6 +135,16 @@ 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";
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
} else {
|
||||
passed();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Test block sizes which are powers of 2
|
||||
int i = 0;
|
||||
while (true) {
|
||||
|
||||
Regular → Executable
@@ -395,6 +395,9 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
if (gpuCount < 2) {
|
||||
printf("P2P application requires atleast 2 gpu devices\n");
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
}
|
||||
} else {
|
||||
if (p_tests & 0x100) {
|
||||
testPeerHostToDevice(false /*useAsyncCopy*/);
|
||||
|
||||
@@ -75,6 +75,9 @@ int main() {
|
||||
HIPCHECK(hipFree(Z_d));
|
||||
} else {
|
||||
std::cout<<"Machine does not seem to have P2P Capabilities, Empty Pass"<<std::endl;
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,9 @@ int main() {
|
||||
HIPCHECK(hipFree(Z_d));
|
||||
} else {
|
||||
std::cout<<"Machine does not seem to have P2P Capabilities, Empty Pass"<<std::endl;
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ int main() {
|
||||
HIPCHECK(hipFree(Z_d));
|
||||
} else {
|
||||
std::cout<<"Machine does not seem to have P2P Capabilities, Empty Pass"<<std::endl;
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
}
|
||||
}
|
||||
}
|
||||
passed();
|
||||
|
||||
@@ -83,6 +83,9 @@ int main() {
|
||||
HIPCHECK(hipFree(Z_d));
|
||||
} else {
|
||||
std::cout<<"Machine does not seem to have P2P Capabilities, Empty Pass"<<std::endl;
|
||||
if (hip_skip_tests_enabled()) {
|
||||
return hip_skip_retcode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Regular → Executable
+13
-1
@@ -41,7 +41,6 @@ THE SOFTWARE.
|
||||
|
||||
#define HC __attribute__((hc))
|
||||
|
||||
|
||||
#define KNRM "\x1B[0m"
|
||||
#define KRED "\x1B[31m"
|
||||
#define KGRN "\x1B[32m"
|
||||
@@ -51,6 +50,19 @@ THE SOFTWARE.
|
||||
#define KCYN "\x1B[36m"
|
||||
#define KWHT "\x1B[37m"
|
||||
|
||||
// HIP Skip Return code set at cmake
|
||||
#define HIP_SKIP_RETURN_CODE 127
|
||||
#define HIP_ENABLE_SKIP_TESTS 0
|
||||
|
||||
inline bool hip_skip_tests_enabled() {
|
||||
return HIP_ENABLE_SKIP_TESTS;
|
||||
}
|
||||
|
||||
inline int hip_skip_retcode() {
|
||||
// HIP Skip Return code set at cmake
|
||||
return HIP_SKIP_RETURN_CODE;
|
||||
}
|
||||
|
||||
#define passed() \
|
||||
printf("%sPASSED!%s\n", KGRN, KNRM); \
|
||||
exit(0);
|
||||
|
||||
Regular → Executable
@@ -41,7 +41,6 @@ THE SOFTWARE.
|
||||
|
||||
#define HC __attribute__((hc))
|
||||
|
||||
|
||||
#define KNRM "\x1B[0m"
|
||||
#define KRED "\x1B[31m"
|
||||
#define KGRN "\x1B[32m"
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user