Legion Runtime
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Legion::Mapping::Mapper Class Referenceabstract

#include <mapping.h>

Classes

struct  AcquireProfilingInfo
 
struct  CloseProfilingInfo
 
struct  ContextConfigOutput
 
struct  CopyProfilingInfo
 
struct  CreateCloseTemporaryInput
 
struct  CreateCloseTemporaryOutput
 
struct  CreateCopyTemporaryInput
 
struct  CreateCopyTemporaryOutput
 
struct  CreateInlineTemporaryInput
 
struct  CreateInlineTemporaryOutput
 
struct  CreatePartitionTemporaryInput
 
struct  CreatePartitionTemporaryOutput
 
struct  CreateReleaseTemporaryInput
 
struct  CreateReleaseTemporaryOutput
 
struct  CreateTaskTemporaryInput
 
struct  CreateTaskTemporaryOutput
 
struct  FutureMapReductionInput
 
struct  FutureMapReductionOutput
 
struct  InlineProfilingInfo
 
struct  MapAcquireInput
 
struct  MapAcquireOutput
 
struct  MapCloseInput
 
struct  MapCloseOutput
 
struct  MapCopyInput
 
struct  MapCopyOutput
 
struct  MapDataflowGraphInput
 
struct  MapDataflowGraphOutput
 
struct  MapInlineInput
 
struct  MapInlineOutput
 
struct  MapMustEpochInput
 
struct  MapMustEpochOutput
 
struct  MapPartitionInput
 
struct  MapPartitionOutput
 
struct  MapperMessage
 
struct  MapperTaskResult
 
struct  MappingConstraint
 
struct  MapReleaseInput
 
struct  MapReleaseOutput
 
struct  MapReplicateTaskOutput
 
struct  MapTaskInput
 
struct  MapTaskOutput
 
struct  MemoizeInput
 
struct  MemoizeOutput
 
struct  MustEpochShardingFunctorOutput
 
struct  PartitionProfilingInfo
 
struct  PostMapInput
 
struct  PostMapOutput
 
struct  PremapTaskInput
 
struct  PremapTaskOutput
 
struct  ReleaseProfilingInfo
 
struct  ReplicateTaskInput
 
struct  ReplicateTaskOutput
 
struct  SelectCloseSrcInput
 
struct  SelectCloseSrcOutput
 
struct  SelectCopySrcInput
 
struct  SelectCopySrcOutput
 
struct  SelectInlineSrcInput
 
struct  SelectInlineSrcOutput
 
struct  SelectMappingInput
 
struct  SelectMappingOutput
 
struct  SelectPartitionProjectionInput
 
struct  SelectPartitionProjectionOutput
 
struct  SelectPartitionSrcInput
 
struct  SelectPartitionSrcOutput
 
struct  SelectReleaseSrcInput
 
struct  SelectReleaseSrcOutput
 
struct  SelectShardingFunctorInput
 
struct  SelectShardingFunctorOutput
 
struct  SelectStealingInput
 
struct  SelectStealingOutput
 
struct  SelectTaskSrcInput
 
struct  SelectTaskSrcOutput
 
struct  SelectTunableInput
 
struct  SelectTunableOutput
 
struct  SelectVariantInput
 
struct  SelectVariantOutput
 
struct  SliceTaskInput
 
struct  SliceTaskOutput
 
struct  SpeculativeOutput
 
struct  StealRequestInput
 
struct  StealRequestOutput
 
struct  TaskOptions
 
struct  TaskProfilingInfo
 
struct  TaskSlice
 

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 &copy, const MapCopyInput &input, MapCopyOutput &output)=0
 
virtual void select_copy_sources (MapperContext ctx, const Copy &copy, const SelectCopySrcInput &input, SelectCopySrcOutput &output)=0
 
virtual void report_profiling (MapperContext ctx, const Copy &copy, const CopyProfilingInfo &input)=0
 
virtual void select_sharding_functor (MapperContext ctx, const Copy &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
 

Detailed Description

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.

Member Enumeration Documentation

◆ MapperSyncModel


Get Mapper Synchronization Model

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.

Member Function Documentation

◆ get_mapper_name()

virtual const char * Legion::Mapping::Mapper::get_mapper_name ( void  ) const
pure virtual

Get Mapper Name

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.

◆ handle_instance_collection()

virtual void Legion::Mapping::Mapper::handle_instance_collection ( const MapperContext  ctx,
const PhysicalInstance &  inst 
)
inlinevirtual

Handle Instance Collection

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.

◆ request_valid_instances()

virtual bool Legion::Mapping::Mapper::request_valid_instances ( void  ) const
inlinevirtual

Request Valid Instances

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.

◆ select_sharding_functor() [1/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Acquire &  acquire,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.

◆ select_sharding_functor() [2/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Close &  close,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.

◆ select_sharding_functor() [3/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Copy &  copy,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.

◆ select_sharding_functor() [4/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Fill &  fill,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.

◆ select_sharding_functor() [5/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Partition &  partition,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.

◆ select_sharding_functor() [6/6]

virtual void Legion::Mapping::Mapper::select_sharding_functor ( MapperContext  ctx,
const Release &  release,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
pure virtual

Select Sharding Functor

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.


The documentation for this class was generated from the following file: