|
Legion Runtime
|
#include <mapping.h>
This mapper call happens immediately after the task is launched and before any other stages of the pipeline. This gives the mapper control over the execution of this task before the runtime puts it in the task pipeline. Below are the fields of the TaskOptions struct and their semantics.
target_proc default:local processor This field will only be obeyed by single task launches. It sets the initial processor where the task will be sent after dependence analysis if the task is to be eagerly evaluated. Index space tasks will invoke slice_domain to determine where its components should be sent.
inline_task default:false Specify whether this task should be inlined directly into the parent task using the parent task's regions. If the regions are not already mapped, they will be re-mapped and the task will be executed on the local processor. The mapper should select an alternative call to the select_inline_variant call to select the task variant to be used.
spawn_task default:false This field is inspired by Cilk and has equivalent semantics. If a task is spawned, then it becomes eligible for stealing, otherwise it will traverse the task pipeline as directed by the mapper. The one deviation from Cilk stealing is that stealing in Legion is managed by the mappers instead of implicitly by the Legion runtime.
map_locally default:false Tasks have the option of either being mapped on the processor on which they were created or being mapped on their ultimate destination processor. Mapping on the local processor where the task was created can be more efficient in some cases since it requires less meta-data movement by the runtime, but can also be subject to having an incomplete view of the destination memories during the mapping process. In general a task should only be mapped locally if it is a leaf task as the runtime will need to move the meta-data for a task anyway if it is going to launch sub-tasks. Note that deciding to map a task locally disqualifies that task from being stolen as it will have already been mapped once it enters the ready queue.
valid_instance default:result of request_valid_instances When calls to map_task are performed, it's often the case that the mapper will want to know the currently valid instances are for that region. There is some overhead to doing this and the mapper may want to avoid this overhead in cases where it knows it won't need the information such as when it is going to virtually map all the regions for an inner task. By setting this flag to false the mapper can opt-out of receiving the valid instance information for a task.
replicate default:false Enable replication of the individual tasks for this operation. This is useful for performing redundant computation to avoid communication. There are requirements on the properties of replicated tasks and how they are mapped. Replicated tasks are not allowed to have reduction-only privileges. Furthermore the mapper must map any regions with write privileges for different copies of the task to different instances.
parent_priority default:current If the mapper for the parent task permits child operations to mutate the priority of the parent task then the mapper can use this field to alter the priority of the parent task
check_collective_regions:empty For index space tasks, provide the indexes of any region requirements that the runtime should check for collective mappings between the point tasks.