|
Legion Runtime
|
#include <mapping.h>
Public Attributes | |
| unsigned | max_window_size = LEGION_DEFAULT_MAX_TASK_WINDOW |
| unsigned | hysteresis_percentage = LEGION_DEFAULT_TASK_WINDOW_HYSTERESIS |
| unsigned | max_outstanding_frames = 0 |
| unsigned | min_tasks_to_schedule = LEGION_DEFAULT_MIN_TASKS_TO_SCHEDULE |
| unsigned | min_frames_to_schedule = 0 |
| unsigned | meta_task_vector_width = LEGION_DEFAULT_META_TASK_VECTOR_WIDTH |
| unsigned | max_templates_per_trace |
| bool | mutable_priority = false |
| bool | auto_tracing_enabled = true |
| unsigned | auto_tracing_window_size = 1000 |
| unsigned | auto_tracing_ruler_function = 100 |
| unsigned | auto_tracing_min_trace_length = 5 |
| unsigned | auto_tracing_max_trace_length |
| unsigned | auto_tracing_visit_threshold = 10 |
| unsigned | auto_tracing_turbo_lag = 16 |
The configure_context mapping call is performed once for every non-leaf task before it starts running. It allows the mapper control over important aspects of the task's execution. First, the mapper can control how far the task runs ahead before it starts stalling due to resource constraints. The mapper can specify either a maximum number of outstanding sub operations by specifying 'max_window_size' or if the task issues frame operations (see 'complete_frame') it can set the maximum number of outstanding frames with 'max_outstanding_frames.' For the task-based run ahead measure, the mapper can also apply a hysteresis factor by setting 'hysteresis_percentage' to reduce jitter. The hysteresis factor specifies what percentage of 'max_window_size' tasks have to finish executing before execution can begin again after a stall.
The mapper can also control how many outstanding sub-tasks need to be mapped before the mapping process is considered to be far enough ahead that it can be halted for this context by setting the 'min_tasks_to_schedule' parameter.
The mapper can control the granularity of Legion meta-tasks for this context with the 'meta_task_vector_width' parameter which control how many meta-tasks get batched together for certain stages of the execution pipeline. This is useful to avoid the overheads of Realm tasks which often do not deal with very small meta-tasks (e.g. those that take 20us or less).
The 'max_templates_per_trace' parameter specifies the maximum number of templates that should be kept around per captured physical trace before discarding them. The runtime will use a least-recently used policy when discarding templates.
The 'mutable_priority' parameter allows the mapper to specify whether child operations launched in this context are permitted to alter the priority of parent task. See the 'update_parent_priority' field of the 'select_task_options' mapper call. If this is set to false then the child mappers cannot change the priority of the parent task.
The 'auto_tracing_enabled' parameter allows the mapper to direct Legion whether it should attempt to automatically identify traces in the sequence of operations and sub-tasks launched by this task. This defaults to true and can be disabled by setting the flag to 'false'.
The auto_tracing_window_size parameter specifies the size of the window for the Legion's automatic tracing functionality to consider when looking for repeated sequences of tasks/operations. Note that this can be (but doesn't have to be) larger than the window size for the context to look for traces that span more than one window's worth of sub-tasks/operations.
The 'auto_tracing_ruler_function' specifies the ruler function ( https://en.wikipedia.org/wiki/Ruler_function ) that should be used for looking for traces that occur in a subset of the auto tracing window of operations/tasks. There is a trade-off with this parameter. The smaller you make it the more rapidly you will discover small traces and be able to replay them quickly, but the longer it will take to identify larger traces that might be more efficient at replaying. Making the multi-scale factor smaller will also result in higher overhead for checking for automatic traces in the window when traces are not being replayed.
The 'auto_tracing_min_trace_length' specifies the minimum length trace that can be found by automatic tracing.
The 'auto_tracing_max_trace_length' specifies the maximum length trace that can be found by automatic tracing. This value is always bounded above by the auto_tracing_window_size since we cannot find any traces larger than the window size. If this value is less than the auto tracing window size and a sequence of repeated tasks/ops is found larger than this value, then Legion will break the sequence into traces of this size and replay them consecutively.
The 'auto_tracing_visit_threshold' specifies how many times a trace needs to be observed before it becomes eligible for replay. The tradeoff here is that a smaller value may lead to finding and replaying traces sooner, but those traces might be local maximas, while a larger value will cause you to wait longer to start replaying traces but could lead to finding more robust traces that are going to be replayed for the duration of the application.
The 'auto_tracing_tubro_lag' parameter trades-off how quickly the auto tracing infrastructure will recognize traces at the cost of potentially blocking task issue rate from the task context. The larger the parameter the larger the lag in recognizing traces but the smaller the overhead incurred by the parent task when launching sub-tasks. The smaller the parameter, the faster traces will be recognized, but at the cost of potentially large task issue latencies even when traces cannot be found. Setting the parameter to zero will guarantee that traces are found as fast as possible, but will run all the auto-tracing analysis inline during task launches and not in the background. The naming for this parameter is based on the analogy with internal combustion engines that are outfitted with turbo-chargers: the larger the turbo-charger, the less responsive the throttle usually is to acceleration.
| unsigned Legion::Mapping::Mapper::ContextConfigOutput::auto_tracing_max_trace_length |
| unsigned Legion::Mapping::Mapper::ContextConfigOutput::max_templates_per_trace |