Future-proof ncclstringtotype

Ensure that ncclstringtotype iterates only over data types known to
nccl-tests (as indicated by test_typenum), not over a potentially larger
set of all NCCL types.
Dieser Commit ist enthalten in:
Kamil Iskra committed 2024-10-24 09:21:37 -07:00
1 Ursprung 9d26b8422b
Commit 34d6d53910
1 Datei geändert
+1 -1
+1 -1
Datei anzeigen
@@ -254,7 +254,7 @@ extern ncclRedOp_t test_ops[];
extern const char *test_opnames[];
static int ncclstringtotype(char *str) {
for (int t=0; t<ncclNumTypes; t++) {
for (int t=0; t<test_typenum; t++) {
if (strcmp(str, test_typenames[t]) == 0) {
return t;
}