|
Legion Runtime
|
#include <mapping.h>
Public Types | |
| enum | MapperSyncModel { CONCURRENT_MAPPER_MODEL , SERIALIZED_REENTRANT_MAPPER_MODEL , SERIALIZED_NON_REENTRANT_MAPPER_MODEL } |
Public Member Functions | |
| Mapper (MapperRuntime *rt) | |
| virtual const char * | get_mapper_name (void) const =0 |
| virtual MapperSyncModel | get_mapper_sync_model (void) const =0 |
| virtual bool | request_valid_instances (void) const |
| virtual void | select_task_options (MapperContext ctx, const Task &task, TaskOptions &output)=0 |
| virtual void | premap_task (MapperContext ctx, const Task &task, const PremapTaskInput &input, PremapTaskOutput &output)=0 |
| virtual void | slice_task (MapperContext ctx, const Task &task, const SliceTaskInput &input, SliceTaskOutput &output)=0 |
| virtual void | map_task (MapperContext ctx, const Task &task, const MapTaskInput &input, MapTaskOutput &output)=0 |
| virtual void | replicate_task (MapperContext ctx, const Task &task, const ReplicateTaskInput &input, ReplicateTaskOutput &output)=0 |
| virtual void | select_task_variant (MapperContext ctx, const Task &task, const SelectVariantInput &input, SelectVariantOutput &output)=0 |
| virtual void | postmap_task (MapperContext ctx, const Task &task, const PostMapInput &input, PostMapOutput &output)=0 |
| virtual void | select_task_sources (MapperContext ctx, const Task &task, const SelectTaskSrcInput &input, SelectTaskSrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Task &task, const TaskProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Task &task, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | map_inline (MapperContext ctx, const InlineMapping &inline_op, const MapInlineInput &input, MapInlineOutput &output)=0 |
| virtual void | select_inline_sources (MapperContext ctx, const InlineMapping &inline_op, const SelectInlineSrcInput &input, SelectInlineSrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const InlineMapping &inline_op, const InlineProfilingInfo &input)=0 |
| virtual void | map_copy (MapperContext ctx, const Copy ©, const MapCopyInput &input, MapCopyOutput &output)=0 |
| virtual void | select_copy_sources (MapperContext ctx, const Copy ©, const SelectCopySrcInput &input, SelectCopySrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Copy ©, const CopyProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Copy ©, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | select_close_sources (MapperContext ctx, const Close &close, const SelectCloseSrcInput &input, SelectCloseSrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Close &close, const CloseProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Close &close, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | map_acquire (MapperContext ctx, const Acquire &acquire, const MapAcquireInput &input, MapAcquireOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Acquire &acquire, const AcquireProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Acquire &acquire, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | map_release (MapperContext ctx, const Release &release, const MapReleaseInput &input, MapReleaseOutput &output)=0 |
| virtual void | select_release_sources (MapperContext ctx, const Release &release, const SelectReleaseSrcInput &input, SelectReleaseSrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Release &release, const ReleaseProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Release &release, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | select_partition_projection (MapperContext ctx, const Partition &partition, const SelectPartitionProjectionInput &input, SelectPartitionProjectionOutput &output)=0 |
| virtual void | map_partition (MapperContext ctx, const Partition &partition, const MapPartitionInput &input, MapPartitionOutput &output)=0 |
| virtual void | select_partition_sources (MapperContext ctx, const Partition &partition, const SelectPartitionSrcInput &input, SelectPartitionSrcOutput &output)=0 |
| virtual void | report_profiling (MapperContext ctx, const Partition &partition, const PartitionProfilingInfo &input)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Partition &partition, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const Fill &fill, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output)=0 |
| virtual void | map_future_map_reduction (MapperContext ctx, const FutureMapReductionInput &input, FutureMapReductionOutput &output) |
| virtual void | configure_context (MapperContext ctx, const Task &task, ContextConfigOutput &output)=0 |
| virtual void | select_tunable_value (MapperContext ctx, const Task &task, const SelectTunableInput &input, SelectTunableOutput &output)=0 |
| virtual void | select_sharding_functor (MapperContext ctx, const MustEpoch &epoch, const SelectShardingFunctorInput &input, MustEpochShardingFunctorOutput &output)=0 |
| virtual void | map_must_epoch (MapperContext ctx, const MapMustEpochInput &input, MapMustEpochOutput &output)=0 |
| virtual void | map_dataflow_graph (MapperContext ctx, const MapDataflowGraphInput &input, MapDataflowGraphOutput &output)=0 |
| virtual void | memoize_operation (MapperContext ctx, const Mappable &mappable, const MemoizeInput &input, MemoizeOutput &output)=0 |
| virtual void | select_tasks_to_map (MapperContext ctx, const SelectMappingInput &input, SelectMappingOutput &output)=0 |
| virtual void | select_steal_targets (MapperContext ctx, const SelectStealingInput &input, SelectStealingOutput &output)=0 |
| virtual void | permit_steal_request (MapperContext ctx, const StealRequestInput &input, StealRequestOutput &output)=0 |
| virtual void | handle_message (MapperContext ctx, const MapperMessage &message)=0 |
| virtual void | handle_task_result (MapperContext ctx, const MapperTaskResult &result)=0 |
| virtual void | handle_instance_collection (const MapperContext ctx, const PhysicalInstance &inst) |
Public Attributes | |
| MapperRuntime *const | runtime |
This class is a pure virtual class that defines the mapper interface. Every mapper must be derived from this class and implement all of the virtual methods declared in this class.
Specify the mapper synchronization model. The concurrent mapper model will alternatively allow mapper calls to be performed at the same time and will rely on the mapper to lock itself to protect access to shared data. If the mapper is locked when performing a utility call, it may be automatically unlocked and locked around the utility call. The serialized model will guarantee that all mapper calls are performed atomically with respect to each other unless they perform a utility call when the mapper has indicated that it is safe to permit re-entrant mapper call(s) in the process of performing the utility call. The reentrant version of the serialized mapper model will default to allowing reentrant calls to the mapper context. The non-reentrant version will default to not allowing reentrant calls.
|
pure virtual |
Specify a name that the runtime can use for referring to this mapper. This will primarily be used for providing helpful error messages so semantically meaningful names are encouraged. This mapper call must be immutable as it may be made before the synchronization model has been chosen.
Implemented in Legion::Mapping::ForwardingMapper, Legion::Mapping::DefaultMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, Legion::Mapping::ReplayMapper, and Legion::Mapping::WrapperMapper.
|
inlinevirtual |
If a mapper successfully subscribed to an instance then it will receive this callback from the runtime when the instance has been collected by the garbage collector.
Reimplemented in Legion::Mapping::NullMapper.
|
inlinevirtual |
Indicate whether the runtime should populate the valid instances as inputs for mapping operations. This will control the setting for all operations that are not tasks. For tasks, this will just set the initial value of 'valid_instances' in the select_task_options struct as we give mappers more control over needing valid inputs for tasks than generic operations at the moment. We provide a default implementation of this method because older versions of the runtime would always fill in this data structure, however, we now allow mappers to disable this in order to reduce the cost of physical analysis done for mapping operations.
Reimplemented in Legion::Mapping::ForwardingMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the acquire being launched has been control replicated and it's up to the mapper for this task to pick a sharding functor to determine which shard will own the point(s) of the acquire . The mapper must return the same sharding functor for all instances of the acquire. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the close being launched has been control replicated and it's up to the mapper for this task to pick a sharding functor to determine which shard will own the point(s) of the close. The mapper must return the same sharding functor for all instances of the close. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the copy being launched has been control replicated and it's up to the mapper for this copy to pick a sharding functor to determine which shard will own the point(s) of the copy. The mapper must return the same sharding functor for all instances of the copy. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the fill being launched has been control replicated and it's up to the mapper for this task to pick a sharding functor to determine which shard will own the points of the fill. The mapper must return the same sharding functor for all instances of the fill. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the partition being launched has been control replicated and it's up to the mapper for this task to pick a sharding functor to determine which shard will own the point(s) of the partition. The mapper must return the same sharding functor for all instances of the partition. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.
|
pure virtual |
This mapper call is invoked whenever the enclosing parent task for the release being launched has been control replicated and it's up to the mapper for this task to pick a sharding functor to determine which shard will own the point(s) of the release. The mapper must return the same sharding functor for all instances of the release. The runtime will verify this in debug mode but not in release mode.
Implemented in Legion::Mapping::DefaultMapper, Legion::Mapping::ForwardingMapper, Legion::Mapping::LoggingWrapper, Legion::Mapping::NullMapper, and Legion::Mapping::ReplayMapper.