|
|
@ -3596,7 +3596,7 @@ void parse_arg(int key, char *arg) |
|
|
|
char* pch = strtok(arg,","); |
|
|
|
char* pch = strtok(arg,","); |
|
|
|
opt_n_threads = 0; |
|
|
|
opt_n_threads = 0; |
|
|
|
while (pch != NULL && opt_n_threads < MAX_GPUS) { |
|
|
|
while (pch != NULL && opt_n_threads < MAX_GPUS) { |
|
|
|
if (pch[0] >= '0' && pch[0] <= '9' && pch[1] == '\0') |
|
|
|
if (pch[0] >= '0' && pch[0] <= '9' && strlen(pch) <= 2) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (atoi(pch) < ngpus) |
|
|
|
if (atoi(pch) < ngpus) |
|
|
|
device_map[opt_n_threads++] = atoi(pch); |
|
|
|
device_map[opt_n_threads++] = atoi(pch); |
|
|
|