瀏覽代碼

fix variable name to disable asynchronous OpenCL and CUDA copy

Nathalie Furmento 12 年之前
父節點
當前提交
2455e3a7b1
共有 3 個文件被更改,包括 16 次插入16 次删除
  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
 This can also be specified at compilation time by giving to the
 configure script the option @code{--disable-asynchronous-copy}.
 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
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and CUDA accelerators. This can also be specified with the
 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
 This can also be specified at compilation time by giving to the
 configure script the option @code{--disable-asynchronous-cuda-copy}.
 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
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and OpenCL accelerators. This can also be specified with the
 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
 The AMD implementation of OpenCL is known to
 fail when copying data asynchronously. When using this implementation,
 fail when copying data asynchronously. When using this implementation,
 it is therefore necessary to disable asynchronous data transfers.
 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;
 	int disable_asynchronous_copy;
 
 
         /* indicate if asynchronous copies to CUDA devices should be disabled */
         /* 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 */
         /* 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 */
 	/* Enable CUDA/OpenGL interoperation on these CUDA devices */
 	unsigned *cuda_opengl_interoperability;
 	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)
 #if defined(STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY)
 	conf->disable_asynchronous_cuda_copy = 1;
 	conf->disable_asynchronous_cuda_copy = 1;
 #else
 #else
-	conf->disable_cuda_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_CUDA_ASYNCHRONOUS_COPY");
+	conf->disable_asynchronous_cuda_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY");
-	if (conf->disable_cuda_asynchronous_copy == -1)
+	if (conf->disable_asynchronous_cuda_copy == -1)
-		conf->disable_cuda_asynchronous_copy = 0;
+		conf->disable_asynchronous_cuda_copy = 0;
 #endif
 #endif
 
 
 #if defined(STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY)
 #if defined(STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY)
 	conf->disable_asynchronous_opencl_copy = 1;
 	conf->disable_asynchronous_opencl_copy = 1;
 #else
 #else
-	conf->disable_opencl_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_OPENCL_ASYNCHRONOUS_COPY");
+	conf->disable_asynchronous_opencl_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY");
-	if (conf->disable_opencl_asynchronous_copy == -1)
+	if (conf->disable_asynchronous_opencl_copy == -1)
-		conf->disable_opencl_asynchronous_copy = 0;
+		conf->disable_asynchronous_opencl_copy = 0;
 #endif
 #endif
 
 
 	return 0;
 	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_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_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_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_ASYNCHRONOUS_CUDA_COPY", &conf->disable_asynchronous_cuda_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_OPENCL_COPY", &conf->disable_asynchronous_opencl_copy);
 }
 }
 
 
 int starpu_init(struct starpu_conf *user_conf)
 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)
 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)
 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
 /* When analyzing performance, it is useful to see what is the processing unit