Merge pull request #590 from ROCm-Developer-Tools/fix-ballot-anyall-return

Fix return EXIT_FAILURE if ballot or anyall fails
This commit is contained in:
Maneesh Gupta
2018-07-26 06:16:23 +05:30
committed by GitHub
2 changed files with 9 additions and 3 deletions
+6 -2
View File
@@ -96,13 +96,17 @@ int main(int argc, char* argv[]) {
#if defined(__HIP_PLATFORM_HCC__) && !defined(NVCC_COMPAT)
if (anycount == 1 && allcount == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
#else
if (anycount == 0 && allcount == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
#endif
return EXIT_SUCCESS;
+3 -1
View File
@@ -89,7 +89,9 @@ int main(int argc, char* argv[]) {
if (divergent_count == 1)
printf("PASSED\n");
else
else {
printf("FAILED\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}