diff --git a/tools/rccl-prim-test/rccl_prim_test.cpp b/tools/rccl-prim-test/rccl_prim_test.cpp index b050cdf981..8c566275cc 100644 --- a/tools/rccl-prim-test/rccl_prim_test.cpp +++ b/tools/rccl-prim-test/rccl_prim_test.cpp @@ -33,7 +33,7 @@ THE SOFTWARE. #include #include "copy_kernel.h" -#define MAX_GPU 8 +#define MAX_GPU 16 #define MAX_WORKGROUPS 32 #define THREADS 256 #define NGPUS 2 @@ -241,7 +241,9 @@ static void setupPeers(uint32_t *info, bool* is_xgmi) { } HIPCHECK(hipDeviceEnablePeerAccess(j, 0)); uint32_t linktype; - HIPCHECK(hipExtGetLinkTypeAndHopCount(i, j, &linktype, &info[i*deviceCnt+j])); + hipError_t error = hipExtGetLinkTypeAndHopCount(i, j, &linktype, &info[i*deviceCnt+j]); + if (error != hipSuccess) + *is_xgmi = 0; if (linktype != 4 || info[i*deviceCnt+j] != 1) *is_xgmi = 0; } else @@ -268,7 +270,9 @@ static void parseChordalRing(char **str) { int count = 0; for (int n = 0; n= 0 && digit <= 9) { + if (state) + ring[num_rings][j] = ring[num_rings][j]*10 + digit; + else { + ring[num_rings][j] = digit; + state = 1; + } + } + else { + state = 0; + j++; + if (r[n] == ' ') continue; + if (r[n] == '|') { + num_rings ++; + j = 0; + continue; + } } - ring[num_rings][j++] = r[n] - '0'; } while (r[n++] != 0x0); num_rings ++; } else {