Legion Runtime
Loading...
Searching...
No Matches
Legion::Mapping::ReplayMapper Class Reference

#include <replay_mapper.h>

Inheritance diagram for Legion::Mapping::ReplayMapper:
Legion::Mapping::Mapper Legion::Mapping::DebugMapper

Classes

struct  CloseMappingInfo
 
struct  CopyMappingInfo
 
struct  InlineMappingInfo
 
struct  InstanceInfo
 
struct  ReleaseMappingInfo
 
struct  RequirementMapping
 
struct  TaskMappingInfo
 
struct  TunableMapping
 

Public Types

enum  ReplayMessageKind {
  ID_MAPPING_MESSAGE , INSTANCE_MAPPING_MESSAGE , CREATE_INSTANCE_MESSAGE , INSTANCE_CREATION_MESSAGE ,
  DECREMENT_USE_MESSAGE
}
 
- Public Types inherited from Legion::Mapping::Mapper
enum  MapperSyncModel { CONCURRENT_MAPPER_MODEL , SERIALIZED_REENTRANT_MAPPER_MODEL , SERIALIZED_NON_REENTRANT_MAPPER_MODEL }
 

Public Member Functions

 ReplayMapper (MapperRuntime *rt, Machine machine, Processor local, const char *replay_file, const char *mapper_name=NULL)
 
 ReplayMapper (const ReplayMapper &rhs)
 
ReplayMapper & operator= (const ReplayMapper &rhs)
 
const char * get_mapper_name (void) const override
 
MapperSyncModel get_mapper_sync_model (void) const override
 
void select_task_options (const MapperContext ctx, const Task &task, TaskOptions &output) override
 
void premap_task (const MapperContext ctx, const Task &task, const PremapTaskInput &input, PremapTaskOutput &output) override
 
void slice_task (const MapperContext ctx, const Task &task, const SliceTaskInput &input, SliceTaskOutput &output) override
 
void map_task (const MapperContext ctx, const Task &task, const MapTaskInput &input, MapTaskOutput &output) override
 
void replicate_task (MapperContext ctx, const Task &task, const ReplicateTaskInput &input, ReplicateTaskOutput &output) override
 
void select_task_variant (const MapperContext ctx, const Task &task, const SelectVariantInput &input, SelectVariantOutput &output) override
 
void postmap_task (const MapperContext ctx, const Task &task, const PostMapInput &input, PostMapOutput &output) override
 
void select_task_sources (const MapperContext ctx, const Task &task, const SelectTaskSrcInput &input, SelectTaskSrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const Task &task, const TaskProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Task &task, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void map_inline (const MapperContext ctx, const InlineMapping &inline_op, const MapInlineInput &input, MapInlineOutput &output) override
 
void select_inline_sources (const MapperContext ctx, const InlineMapping &inline_op, const SelectInlineSrcInput &input, SelectInlineSrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const InlineMapping &inline_op, const InlineProfilingInfo &input) override
 
void map_copy (const MapperContext ctx, const Copy &copy, const MapCopyInput &input, MapCopyOutput &output) override
 
void select_copy_sources (const MapperContext ctx, const Copy &copy, const SelectCopySrcInput &input, SelectCopySrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const Copy &copy, const CopyProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Copy &copy, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_close_sources (const MapperContext ctx, const Close &close, const SelectCloseSrcInput &input, SelectCloseSrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const Close &close, const CloseProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Close &close, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void map_acquire (const MapperContext ctx, const Acquire &acquire, const MapAcquireInput &input, MapAcquireOutput &output) override
 
void report_profiling (const MapperContext ctx, const Acquire &acquire, const AcquireProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Acquire &acquire, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void map_release (const MapperContext ctx, const Release &release, const MapReleaseInput &input, MapReleaseOutput &output) override
 
void select_release_sources (const MapperContext ctx, const Release &release, const SelectReleaseSrcInput &input, SelectReleaseSrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const Release &release, const ReleaseProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Release &release, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_partition_projection (const MapperContext ctx, const Partition &partition, const SelectPartitionProjectionInput &input, SelectPartitionProjectionOutput &output) override
 
void map_partition (const MapperContext ctx, const Partition &partition, const MapPartitionInput &input, MapPartitionOutput &output) override
 
void select_partition_sources (const MapperContext ctx, const Partition &partition, const SelectPartitionSrcInput &input, SelectPartitionSrcOutput &output) override
 
void report_profiling (const MapperContext ctx, const Partition &partition, const PartitionProfilingInfo &input) override
 
void select_sharding_functor (const MapperContext ctx, const Partition &partition, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Fill &fill, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void configure_context (const MapperContext ctx, const Task &task, ContextConfigOutput &output) override
 
void select_tunable_value (const MapperContext ctx, const Task &task, const SelectTunableInput &input, SelectTunableOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const MustEpoch &epoch, const SelectShardingFunctorInput &input, MustEpochShardingFunctorOutput &output) override
 
void map_must_epoch (const MapperContext ctx, const MapMustEpochInput &input, MapMustEpochOutput &output) override
 
void map_dataflow_graph (const MapperContext ctx, const MapDataflowGraphInput &input, MapDataflowGraphOutput &output) override
 
void memoize_operation (const MapperContext ctx, const Mappable &mappable, const MemoizeInput &input, MemoizeOutput &output) override
 
void select_tasks_to_map (const MapperContext ctx, const SelectMappingInput &input, SelectMappingOutput &output) override
 
void select_steal_targets (const MapperContext ctx, const SelectStealingInput &input, SelectStealingOutput &output) override
 
void permit_steal_request (const MapperContext ctx, const StealRequestInput &intput, StealRequestOutput &output) override
 
void handle_message (const MapperContext ctx, const MapperMessage &message) override
 
void handle_task_result (const MapperContext ctx, const MapperTaskResult &result) override
 
- Public Member Functions inherited from Legion::Mapping::Mapper
 Mapper (MapperRuntime *rt)
 
virtual bool request_valid_instances (void) const
 
virtual void map_future_map_reduction (MapperContext ctx, const FutureMapReductionInput &input, FutureMapReductionOutput &output)
 
virtual void handle_instance_collection (const MapperContext ctx, const PhysicalInstance &inst)
 

Static Public Member Functions

static const char * create_replay_name (Processor p)
 

Protected Member Functions

unsigned long find_original_instance_id (MapperContext ctx, unsigned long current_id)
 
void update_original_instance_id (MapperContext ctx, unsigned long current_id, unsigned long original_id)
 
InstanceInfo * unpack_instance (FILE *f) const
 
TaskMappingInfo * unpack_task_mapping (FILE *f) const
 
InlineMappingInfo * unpack_inline_mapping (FILE *f) const
 
CopyMappingInfo * unpack_copy_mapping (FILE *f) const
 
CloseMappingInfo * unpack_close_mapping (FILE *f) const
 
ReleaseMappingInfo * unpack_release_mapping (FILE *f) const
 
RequirementMapping * unpack_requirement (FILE *f) const
 
TunableMapping * unpack_tunable (FILE *f) const
 
TaskMappingInfo * find_task_mapping (MapperContext ctx, const Task &task, const DomainPoint &p, bool parent=false)
 
InlineMappingInfo * find_inline_mapping (MapperContext ctx, const InlineMapping &inline_op)
 
CopyMappingInfo * find_copy_mapping (MapperContext ctx, const Copy &copy)
 
CloseMappingInfo * find_close_mapping (MapperContext ctx, const Close &close)
 
ReleaseMappingInfo * find_release_mapping (MapperContext ctx, const Release &release)
 

Static Protected Member Functions

template<typename T >
static void ignore_result (T arg)
 

Protected Attributes

const Machine machine
 
const Processor local_proc
 
const char *const mapper_name
 
std::map< unsigned long, InstanceInfo * > instance_infos
 
std::map< std::pair< UniqueID, DomainPoint >, TaskMappingInfo * > task_mappings
 
std::map< UniqueID, InlineMappingInfo * > inline_mappings
 
std::map< UniqueID, CopyMappingInfo * > copy_mappings
 
std::map< UniqueID, CloseMappingInfo * > close_mappings
 
std::map< UniqueID, ReleaseMappingInfo * > release_mappings
 
UniqueID top_level_id
 
std::map< UniqueID, UniqueID > original_mappings
 
std::map< UniqueID, MapperEvent > pending_task_ids
 
std::map< unsigned long, unsigned long > original_instances
 
std::map< unsigned long, MapperEvent > pending_instance_ids
 

Additional Inherited Members

- Public Attributes inherited from Legion::Mapping::Mapper
MapperRuntime *const runtime
 

Detailed Description

The replay mapper can take as input a replay file generated LegionSpy and use it to replay all the mapping decisions made in a previous run. This is useful for debugging purposes where we want to replay the same execution of a program over and over to discover the source of a runtime bug.

Member Function Documentation

◆ configure_context()

void Legion::Mapping::ReplayMapper::configure_context ( const MapperContext  ctx,
const Task &  task,
ContextConfigOutput &  output 
)
overridevirtual

◆ get_mapper_name()

const char * Legion::Mapping::ReplayMapper::get_mapper_name ( void  ) const
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ get_mapper_sync_model()

MapperSyncModel Legion::Mapping::ReplayMapper::get_mapper_sync_model ( void  ) const
overridevirtual

◆ handle_message()

void Legion::Mapping::ReplayMapper::handle_message ( const MapperContext  ctx,
const MapperMessage &  message 
)
overridevirtual

◆ handle_task_result()

void Legion::Mapping::ReplayMapper::handle_task_result ( const MapperContext  ctx,
const MapperTaskResult &  result 
)
overridevirtual

◆ map_acquire()

void Legion::Mapping::ReplayMapper::map_acquire ( const MapperContext  ctx,
const Acquire &  acquire,
const MapAcquireInput &  input,
MapAcquireOutput &  output 
)
overridevirtual

◆ map_copy()

void Legion::Mapping::ReplayMapper::map_copy ( const MapperContext  ctx,
const Copy &  copy,
const MapCopyInput &  input,
MapCopyOutput &  output 
)
overridevirtual

◆ map_dataflow_graph()

void Legion::Mapping::ReplayMapper::map_dataflow_graph ( const MapperContext  ctx,
const MapDataflowGraphInput &  input,
MapDataflowGraphOutput &  output 
)
overridevirtual

◆ map_inline()

void Legion::Mapping::ReplayMapper::map_inline ( const MapperContext  ctx,
const InlineMapping &  inline_op,
const MapInlineInput &  input,
MapInlineOutput &  output 
)
overridevirtual

◆ map_must_epoch()

void Legion::Mapping::ReplayMapper::map_must_epoch ( const MapperContext  ctx,
const MapMustEpochInput &  input,
MapMustEpochOutput &  output 
)
overridevirtual

◆ map_partition()

void Legion::Mapping::ReplayMapper::map_partition ( const MapperContext  ctx,
const Partition &  partition,
const MapPartitionInput &  input,
MapPartitionOutput &  output 
)
overridevirtual

◆ map_release()

void Legion::Mapping::ReplayMapper::map_release ( const MapperContext  ctx,
const Release &  release,
const MapReleaseInput &  input,
MapReleaseOutput &  output 
)
overridevirtual

◆ map_task()

void Legion::Mapping::ReplayMapper::map_task ( const MapperContext  ctx,
const Task &  task,
const MapTaskInput &  input,
MapTaskOutput &  output 
)
overridevirtual

◆ memoize_operation()

void Legion::Mapping::ReplayMapper::memoize_operation ( const MapperContext  ctx,
const Mappable &  mappable,
const MemoizeInput &  input,
MemoizeOutput &  output 
)
overridevirtual

◆ permit_steal_request()

void Legion::Mapping::ReplayMapper::permit_steal_request ( const MapperContext  ctx,
const StealRequestInput &  intput,
StealRequestOutput &  output 
)
overridevirtual

◆ postmap_task()

void Legion::Mapping::ReplayMapper::postmap_task ( const MapperContext  ctx,
const Task &  task,
const PostMapInput &  input,
PostMapOutput &  output 
)
overridevirtual

◆ premap_task()

void Legion::Mapping::ReplayMapper::premap_task ( const MapperContext  ctx,
const Task &  task,
const PremapTaskInput &  input,
PremapTaskOutput &  output 
)
overridevirtual

◆ replicate_task()

void Legion::Mapping::ReplayMapper::replicate_task ( MapperContext  ctx,
const Task &  task,
const ReplicateTaskInput &  input,
ReplicateTaskOutput &  output 
)
overridevirtual

◆ report_profiling() [1/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Acquire &  acquire,
const AcquireProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [2/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Close &  close,
const CloseProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [3/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Copy &  copy,
const CopyProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [4/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const InlineMapping &  inline_op,
const InlineProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [5/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Partition &  partition,
const PartitionProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [6/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Release &  release,
const ReleaseProfilingInfo &  input 
)
overridevirtual

◆ report_profiling() [7/7]

void Legion::Mapping::ReplayMapper::report_profiling ( const MapperContext  ctx,
const Task &  task,
const TaskProfilingInfo &  input 
)
overridevirtual

◆ select_close_sources()

void Legion::Mapping::ReplayMapper::select_close_sources ( const MapperContext  ctx,
const Close &  close,
const SelectCloseSrcInput &  input,
SelectCloseSrcOutput &  output 
)
overridevirtual

◆ select_copy_sources()

void Legion::Mapping::ReplayMapper::select_copy_sources ( const MapperContext  ctx,
const Copy &  copy,
const SelectCopySrcInput &  input,
SelectCopySrcOutput &  output 
)
overridevirtual

◆ select_inline_sources()

void Legion::Mapping::ReplayMapper::select_inline_sources ( const MapperContext  ctx,
const InlineMapping &  inline_op,
const SelectInlineSrcInput &  input,
SelectInlineSrcOutput &  output 
)
overridevirtual

◆ select_partition_projection()

void Legion::Mapping::ReplayMapper::select_partition_projection ( const MapperContext  ctx,
const Partition &  partition,
const SelectPartitionProjectionInput &  input,
SelectPartitionProjectionOutput &  output 
)
overridevirtual

◆ select_partition_sources()

void Legion::Mapping::ReplayMapper::select_partition_sources ( const MapperContext  ctx,
const Partition &  partition,
const SelectPartitionSrcInput &  input,
SelectPartitionSrcOutput &  output 
)
overridevirtual

◆ select_release_sources()

void Legion::Mapping::ReplayMapper::select_release_sources ( const MapperContext  ctx,
const Release &  release,
const SelectReleaseSrcInput &  input,
SelectReleaseSrcOutput &  output 
)
overridevirtual

◆ select_sharding_functor() [1/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Acquire &  acquire,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [2/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Close &  close,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [3/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Copy &  copy,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [4/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Fill &  fill,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [5/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const MustEpoch &  epoch,
const SelectShardingFunctorInput &  input,
MustEpochShardingFunctorOutput &  output 
)
overridevirtual

◆ select_sharding_functor() [6/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Partition &  partition,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [7/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Release &  release,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

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.

Implements Legion::Mapping::Mapper.

◆ select_sharding_functor() [8/8]

void Legion::Mapping::ReplayMapper::select_sharding_functor ( const MapperContext  ctx,
const Task &  task,
const SelectShardingFunctorInput &  input,
SelectShardingFunctorOutput &  output 
)
overridevirtual

◆ select_steal_targets()

void Legion::Mapping::ReplayMapper::select_steal_targets ( const MapperContext  ctx,
const SelectStealingInput &  input,
SelectStealingOutput &  output 
)
overridevirtual

◆ select_task_options()

void Legion::Mapping::ReplayMapper::select_task_options ( const MapperContext  ctx,
const Task &  task,
TaskOptions &  output 
)
overridevirtual

◆ select_task_sources()

void Legion::Mapping::ReplayMapper::select_task_sources ( const MapperContext  ctx,
const Task &  task,
const SelectTaskSrcInput &  input,
SelectTaskSrcOutput &  output 
)
overridevirtual

◆ select_task_variant()

void Legion::Mapping::ReplayMapper::select_task_variant ( const MapperContext  ctx,
const Task &  task,
const SelectVariantInput &  input,
SelectVariantOutput &  output 
)
overridevirtual

◆ select_tasks_to_map()

void Legion::Mapping::ReplayMapper::select_tasks_to_map ( const MapperContext  ctx,
const SelectMappingInput &  input,
SelectMappingOutput &  output 
)
overridevirtual

◆ select_tunable_value()

void Legion::Mapping::ReplayMapper::select_tunable_value ( const MapperContext  ctx,
const Task &  task,
const SelectTunableInput &  input,
SelectTunableOutput &  output 
)
overridevirtual

◆ slice_task()

void Legion::Mapping::ReplayMapper::slice_task ( const MapperContext  ctx,
const Task &  task,
const SliceTaskInput &  input,
SliceTaskOutput &  output 
)
overridevirtual

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