Explorar el Código

fix variable name to disable asynchronous OpenCL and CUDA copy

Nathalie Furmento hace 12 años
padre
commit
2455e3a7b1
Se han modificado 3 ficheros con 16 adiciones y 16 borrados
  1. 4 4
      doc/chapters/basic-api.texi
  2. 2 2
      include/starpu.h
  3. 10 10
      src/core/workers.c

+ 4 - 4
doc/chapters/basic-api.texi

@@ -161,17 +161,17 @@ it is therefore necessary to disable asynchronous data transfers.
 This can also be specified at compilation time by giving to the
 configure script the option @code{--disable-asynchronous-copy}.
 
-@item @code{int disable_cuda_asynchronous_copy} (default = 0)
+@item @code{int disable_asynchronous_cuda_copy} (default = 0)
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and CUDA accelerators. This can also be specified with the
-@code{STARPU_DISABLE_CUDA_ASYNCHRONOUS_COPY} environment variable.
+@code{STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY} environment variable.
 This can also be specified at compilation time by giving to the
 configure script the option @code{--disable-asynchronous-cuda-copy}.
 
-@item @code{int disable_opencl_asynchronous_copy} (default = 0)
+@item @code{int disable_asynchronous_opencl_copy} (default = 0)
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and OpenCL accelerators. This can also be specified with the
-@code{STARPU_DISABLE_OPENCL_ASYNCHRONOUS_COPY} environment variable.
+@code{STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY} environment variable.
 The AMD implementation of OpenCL is known to
 fail when copying data asynchronously. When using this implementation,
 it is therefore necessary to disable asynchronous data transfers.

+ 2 - 2
include/starpu.h

@@ -137,10 +137,10 @@ struct starpu_conf
 	int disable_asynchronous_copy;
 
         /* indicate if asynchronous copies to CUDA devices should be disabled */
-	int disable_cuda_asynchronous_copy;
+	int disable_asynchronous_cuda_copy;
 
         /* indicate if asynchronous copies to OpenCL devices should be disabled */
-	int disable_opencl_asynchronous_copy;
+	int disable_asynchronous_opencl_copy;
 
 	/* Enable CUDA/OpenGL interoperation on these CUDA devices */
 	unsigned *cuda_opengl_interoperability;

+ 10 - 10
src/core/workers.c

@@ -589,17 +589,17 @@ int starpu_conf_init(struct starpu_conf *conf)
 #if defined(STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY)
 	conf->disable_asynchronous_cuda_copy = 1;
 #else
-	conf->disable_cuda_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_CUDA_ASYNCHRONOUS_COPY");
-	if (conf->disable_cuda_asynchronous_copy == -1)
-		conf->disable_cuda_asynchronous_copy = 0;
+	conf->disable_asynchronous_cuda_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY");
+	if (conf->disable_asynchronous_cuda_copy == -1)
+		conf->disable_asynchronous_cuda_copy = 0;
 #endif
 
 #if defined(STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY)
 	conf->disable_asynchronous_opencl_copy = 1;
 #else
-	conf->disable_opencl_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_OPENCL_ASYNCHRONOUS_COPY");
-	if (conf->disable_opencl_asynchronous_copy == -1)
-		conf->disable_opencl_asynchronous_copy = 0;
+	conf->disable_asynchronous_opencl_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY");
+	if (conf->disable_asynchronous_opencl_copy == -1)
+		conf->disable_asynchronous_opencl_copy = 0;
 #endif
 
 	return 0;
@@ -632,8 +632,8 @@ static void _starpu_conf_check_environment(struct starpu_conf *conf)
 	_starpu_conf_set_value_against_environment("STARPU_BUS_CALIBRATE", &conf->bus_calibrate);
 	_starpu_conf_set_value_against_environment("STARPU_SINGLE_COMBINED_WORKER", &conf->single_combined_worker);
 	_starpu_conf_set_value_against_environment("STARPU_DISABLE_ASYNCHRONOUS_COPY", &conf->disable_asynchronous_copy);
-	_starpu_conf_set_value_against_environment("STARPU_DISABLE_CUDA_ASYNCHRONOUS_COPY", &conf->disable_cuda_asynchronous_copy);
-	_starpu_conf_set_value_against_environment("STARPU_DISABLE_OPENCL_ASYNCHRONOUS_COPY", &conf->disable_opencl_asynchronous_copy);
+	_starpu_conf_set_value_against_environment("STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY", &conf->disable_asynchronous_cuda_copy);
+	_starpu_conf_set_value_against_environment("STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY", &conf->disable_asynchronous_opencl_copy);
 }
 
 int starpu_init(struct starpu_conf *user_conf)
@@ -989,12 +989,12 @@ int starpu_asynchronous_copy_disabled(void)
 
 int starpu_asynchronous_cuda_copy_disabled(void)
 {
-	return config.conf->disable_cuda_asynchronous_copy;
+	return config.conf->disable_asynchronous_cuda_copy;
 }
 
 int starpu_asynchronous_opencl_copy_disabled(void)
 {
-	return config.conf->disable_opencl_asynchronous_copy;
+	return config.conf->disable_asynchronous_opencl_copy;
 }
 
 /* When analyzing performance, it is useful to see what is the processing unit