|
@@ -145,14 +145,7 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
|
|
* cpus. */
|
|
* cpus. */
|
|
|
|
|
|
/* what do we use, explicit value, env. variable, or round-robin ? */
|
|
/* what do we use, explicit value, env. variable, or round-robin ? */
|
|
- if (use_explicit_workers_gpuid)
|
|
|
|
- {
|
|
|
|
- /* we use the explicit value from the user */
|
|
|
|
- memcpy(workers_gpuid,
|
|
|
|
- explicit_workers_gpuid,
|
|
|
|
- STARPU_NMAXWORKERS*sizeof(unsigned));
|
|
|
|
- }
|
|
|
|
- else if ((strval = getenv(varname)))
|
|
|
|
|
|
+ if ((strval = getenv(varname)))
|
|
{
|
|
{
|
|
/* STARPU_WORKERS_CUDAID certainly contains less entries than
|
|
/* STARPU_WORKERS_CUDAID certainly contains less entries than
|
|
* STARPU_NMAXWORKERS, so we reuse its entries in a round robin
|
|
* STARPU_NMAXWORKERS, so we reuse its entries in a round robin
|
|
@@ -191,6 +184,13 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ else if (use_explicit_workers_gpuid)
|
|
|
|
+ {
|
|
|
|
+ /* we use the explicit value from the user */
|
|
|
|
+ memcpy(workers_gpuid,
|
|
|
|
+ explicit_workers_gpuid,
|
|
|
|
+ STARPU_NMAXWORKERS*sizeof(unsigned));
|
|
|
|
+ }
|
|
else
|
|
else
|
|
{
|
|
{
|
|
/* by default, we take a round robin policy */
|
|
/* by default, we take a round robin policy */
|