DocsNavigationUser login |
Setting TunablesEach task instance will have its own "versions" of the task variant's tunable parameters, and the programmer must specify a compile-time constant for every tunable in every instance when mapping the program to a machine. The tunables in the matrix multiplication running example are used to set the submatrix sizes that are passed to subtask calls. They will be set as follows:
These numbers were chosen to arrive at arrays in each level that are as large as possible, by the following method.
The selection of tunable values is illustrated in the updated task instance call graph below:
Note that the most common use of tunable values in Sequoia is to set array block sizes, and in particular, the "max" field of array blocks may only refer to tunable and array size parameters. The amount of freedom that a programmer has to choose tunables depends upon the particular Sequoia application and the particular machine being mapped to. For example, a program may be written assuming that a tunable value will evenly divide some other application parameter, and on a machine such as Cell, hardware alignment constraints require that the start addresses of array blocks be aligned on 16-byte boundaries; each of these can constrain the space of "valid" values that the tunables can be set to. In general, the heuristic that a programmer should use when setting tunable values is to try to make the arrays that reside in fixed size, local memories as large as possible without exceeding their capacity. Also, it's common for a programmer to try out a handful of choices for their program's tunable values before choosing the ones that yield the highest program performance. |