Selaa lähdekoodia

Introduce a variable to specify the minimum number of calibration measurements

Samuel Thibault 11 vuotta sitten
vanhempi
commit
38ddafc107

+ 2 - 2
doc/doxygen/chapters/12online_performance_tools.doxy

@@ -389,11 +389,11 @@ parameters through starpu_hash_crc32c_be for instance.
 StarPU will automatically determine when the performance model is calibrated,
 StarPU will automatically determine when the performance model is calibrated,
 or rather, it will assume the performance model is calibrated until the
 or rather, it will assume the performance model is calibrated until the
 application submits a task for which the performance can not be predicted. For
 application submits a task for which the performance can not be predicted. For
-::STARPU_HISTORY_BASED, StarPU will require 10 (_STARPU_CALIBRATION_MINIMUM)
+::STARPU_HISTORY_BASED, StarPU will require 10 (STARPU_CALIBRATE_MINIMUM)
 measurements for a given size before estimating that an average can be taken as
 measurements for a given size before estimating that an average can be taken as
 estimation for further executions with the same size. For
 estimation for further executions with the same size. For
 ::STARPU_REGRESSION_BASED and ::STARPU_NL_REGRESSION_BASED, StarPU will require
 ::STARPU_REGRESSION_BASED and ::STARPU_NL_REGRESSION_BASED, StarPU will require
-10 (_STARPU_CALIBRATION_MINIMUM) measurements, and that the minimum measured
+10 (STARPU_CALIBRATE_MINIMUM) measurements, and that the minimum measured
 data size is smaller than 90% of the maximum measured data size (i.e. the
 data size is smaller than 90% of the maximum measured data size (i.e. the
 measurement interval is large enough for a regression to have a meaning).
 measurement interval is large enough for a regression to have a meaning).
 Calibration can also be forced by setting the \ref STARPU_CALIBRATE environment
 Calibration can also be forced by setting the \ref STARPU_CALIBRATE environment

+ 8 - 0
doc/doxygen/chapters/40environment_variables.doxy

@@ -314,6 +314,14 @@ is the default behaviour.
 Note: this currently only applies to <c>dm</c> and <c>dmda</c> scheduling policies.
 Note: this currently only applies to <c>dm</c> and <c>dmda</c> scheduling policies.
 </dd>
 </dd>
 
 
+<dt>STARPU_CALIBRATE_MINIMUM</dt>
+<dd>
+\anchor STARPU_CALIBRATE_MINIMUM
+\addindex __env__STARPU_CALIBRATE_MINIMUM
+This defines the minimum number of calibration measurements that will be made
+before considering that the performance model is calibrated. The default value is 10.
+</dd>
+
 <dt>STARPU_BUS_CALIBRATE</dt>
 <dt>STARPU_BUS_CALIBRATE</dt>
 <dd>
 <dd>
 \anchor STARPU_BUS_CALIBRATE
 \anchor STARPU_BUS_CALIBRATE

+ 2 - 2
src/starpu_parameters.h

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011  Université de Bordeaux 1
+ * Copyright (C) 2011, 2014  Université de Bordeaux 1
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
  * it under the terms of the GNU Lesser General Public License as published by
@@ -22,7 +22,7 @@
 
 
 /* How many executions a codelet will have to be measured before we
 /* How many executions a codelet will have to be measured before we
  * consider that calibration will provide a value good enough for scheduling */
  * consider that calibration will provide a value good enough for scheduling */
-#define _STARPU_CALIBRATION_MINIMUM 10
+#define _STARPU_CALIBRATION_MINIMUM ((unsigned) starpu_get_env_number_default("STARPU_CALIBRATE_MINIMUM", 10))
 
 
 /* Assumed relative performance ratios */
 /* Assumed relative performance ratios */
 /* TODO: benchmark a bit instead */
 /* TODO: benchmark a bit instead */