Browse Source

Activate data prefetching by default.

Cédric Augonnet 15 years ago
parent
commit
7a2cd1dde7
2 changed files with 7 additions and 5 deletions
  1. 5 4
      doc/starpu.texi
  2. 2 1
      src/core/policies/sched_policy.c

+ 5 - 4
doc/starpu.texi

@@ -802,10 +802,11 @@ Note: this currently only applies to dm and dmda scheduling policies.
 @table @asis
 @table @asis
 
 
 @item @emph{Description}:
 @item @emph{Description}:
-If this variable is set, data prefetching will be enabled, that is when a task is
-scheduled to be executed e.g. on a GPU, StarPU will request an asynchronous
-transfer in advance, so that data is already present on the GPU when the task
-starts. As a result, computation and data transfers are overlapped.
+This variable indicates whether data prefetching should be enabled (0 means
+that it is disabled). If prefetching is enabled, when a task is scheduled to be
+executed e.g. on a GPU, StarPU will request an asynchronous transfer in
+advance, so that data is already present on the GPU when the task starts. As a
+result, computation and data transfers are overlapped.
 
 
 @end table
 @end table
 
 

+ 2 - 1
src/core/policies/sched_policy.c

@@ -170,9 +170,10 @@ void _starpu_init_sched_policy(struct starpu_machine_config_s *config)
 	/* Perhaps we have to display some help */
 	/* Perhaps we have to display some help */
 	display_sched_help_message();
 	display_sched_help_message();
 
 
+	/* Prefetch is activated by default */
 	use_prefetch = starpu_get_env_number("STARPU_PREFETCH");
 	use_prefetch = starpu_get_env_number("STARPU_PREFETCH");
 	if (use_prefetch == -1)
 	if (use_prefetch == -1)
-		use_prefetch = 0;
+		use_prefetch = 1;
 
 
 	/* By default, we don't calibrate */
 	/* By default, we don't calibrate */
 	unsigned do_calibrate = 0;
 	unsigned do_calibrate = 0;