瀏覽代碼

rename STARPU_ONE_THREAD_PER_STREAM to STARPU_CUDA_THREAD_PER_WORKER

Samuel Thibault 8 年之前
父節點
當前提交
3ade010051

+ 2 - 2
doc/doxygen/chapters/501_environment_variables.doxy

@@ -54,8 +54,8 @@ which will be concurrently running on the devices. The default value is 1.
 
 <dt>STARPU_NWORKER_PER_CUDA</dt>
 <dd>
-\anchor STARPU_ONE_THREAD_PER_STREAM
-\addindex __env__STARPU_ONE_THREAD_PER_STREAM
+\anchor STARPU_CUDA_THREAD_PER_WORKER
+\addindex __env__STARPU_CUDA_THREAD_PER_WORKER
 Specify if the cuda driver should provide a thread per stream or a single thread 
 dealing with all the streams. 0 if one thread per stream, 1 otherwise. The default 
 value is 1.

+ 1 - 1
examples/sched_ctx/gpu_partition.c

@@ -116,7 +116,7 @@ int main(int argc, char **argv)
 	return 77;
 #else
 	/* Have separate threads for streams */
-	setenv("STARPU_ONE_THREAD_PER_STREAM", "1", 1);
+	setenv("STARPU_CUDA_THREAD_PER_WORKER", "1", 1);
 	setenv("STARPU_NWORKER_PER_CUDA", "2", 1);
 #endif
 

+ 2 - 2
src/core/topology.c

@@ -1045,7 +1045,7 @@ _starpu_init_machine_config(struct _starpu_machine_config *config, int no_mp_con
 	_starpu_initialize_workers_cuda_gpuid(config);
 
 	/* allow having one worker per stream */
-	unsigned th_per_stream = starpu_get_env_number_default("STARPU_ONE_THREAD_PER_STREAM", 0);
+	unsigned th_per_stream = starpu_get_env_number_default("STARPU_CUDA_THREAD_PER_WORKER", 0);
 
 	unsigned cudagpu;
 	for (cudagpu = 0; cudagpu < topology->ncudagpus; cudagpu++)
@@ -1543,7 +1543,7 @@ _starpu_init_workers_binding (struct _starpu_machine_config *config, int no_mp_c
 	unsigned cuda_init[STARPU_MAXCUDADEVS] = { };
 	unsigned cuda_memory_nodes[STARPU_MAXCUDADEVS];
 	unsigned cuda_bindid[STARPU_MAXCUDADEVS];
-	unsigned th_per_stream = starpu_get_env_number_default("STARPU_ONE_THREAD_PER_STREAM", 0);
+	unsigned th_per_stream = starpu_get_env_number_default("STARPU_CUDA_THREAD_PER_WORKER", 0);
 #endif
 #if defined(STARPU_USE_OPENCL) || defined(STARPU_SIMGRID)
 	unsigned opencl_init[STARPU_MAXOPENCLDEVS] = { };

+ 1 - 1
src/core/workers.c

@@ -629,7 +629,7 @@ static void _starpu_launch_drivers(struct _starpu_machine_config *pconfig)
 	STARPU_AYU_INIT();
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_SIMGRID)
-	unsigned th_per_stream = starpu_get_env_number_default("STARPU_ONE_THREAD_PER_STREAM", 0);
+	unsigned th_per_stream = starpu_get_env_number_default("STARPU_CUDA_THREAD_PER_WORKER", 0);
 #endif
 
 	for (worker = 0; worker < nworkers; worker++)