|
Legion Runtime
|
#include <mapping.h>
Public Attributes | |
| std::vector< std::vector< PhysicalInstance > > | src_instances |
| std::vector< std::vector< PhysicalInstance > > | dst_instances |
| std::vector< std::vector< PhysicalInstance > > | src_indirect_instances |
| std::vector< std::vector< PhysicalInstance > > | dst_indirect_instances |
| std::vector< std::vector< CollectiveView > > | src_collectives |
| std::vector< std::vector< CollectiveView > > | dst_collectives |
| std::vector< std::vector< CollectiveView > > | src_indirect_collectives |
| std::vector< std::vector< CollectiveView > > | dst_indirect_collectives |
When an application requests an explicit region-to-region copy, this mapper call is invoked to map both the source and destination instances for the copy. The mapper is provided with a set of valid instances to be used for both the source and destination region requirements in the 'src_instances' and 'dst_instances' fields. The mapper then picks the chosen instances for the source and destination region requirements and puts them in the corresponding vectors of the output structure. The mapper can specify multiple instances for different fields. For each field the runtime will select the instance that first has space for that field that it finds in the vector of instances. For source region requirements the mapper can optionally select to use a virtual mapping if the copy is not a reduction copy. If the copy is a gather or a scatter copy then the mapper must also create instances for the source and/or destination indirection region requirements as well. The mapper can specify the priority of any copies or fills required for executing this copy operation using the 'copy_fill_priority' field.
The mapper can optionally choose not to have the runtime track any of the instances made for the copy as valid for the source or indirection region requirements by specifying indexes of the valid region requirements in 'untracked_valid_srcs', 'untracked_valid_ind_srcs', or 'untracked_valid_ind_dsts' respectively.
The mapper can request profiling feedback on any copies performed by this copy operation by filling in the 'profiling_requests' data structure with the kind of measurements desired. The priority with which this information is sent back to the mapper can be set with 'profiling_priority'.
The mapper can say whether or not the runtime should compute preimages for any indirection fields in the copy operation. This will incur an additional latency in the copy operation, but can reduce the number of instances that must be investigated for performing the indirect copies which can improve overall performance and scalability. The default is not to compute the preimages.
If the mapper has opted to compute preimages, a further option is available to create shadow indirection instances in the same memory as the source/destination instances being gather/scattered to/from. This incurs some additional latency for the instance allocation but may result in better Realm gather/scatter performance for the copies. We recommend only enabling this mode when running with tracing. The default is for this to be disabled. Note that if there is not enough space in the memory where the source/destination instance is then this will silently fall back to using the original indirect instance.