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

#include <logging_wrapper.h>

Inheritance diagram for Legion::Mapping::LoggingWrapper:
Legion::Mapping::ForwardingMapper Legion::Mapping::Mapper

Public Member Functions

 LoggingWrapper (Mapper *mapper, Logger *logger=NULL)
 
void replicate_task (MapperContext ctx, const Task &task, const ReplicateTaskInput &input, ReplicateTaskOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Task &task, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Copy &copy, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
const char * get_mapper_name (void) const override
 
void select_task_options (const MapperContext ctx, const Task &task, TaskOptions &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 select_task_sources (const MapperContext ctx, const Task &task, const SelectTaskSrcInput &input, SelectTaskSrcOutput &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 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 select_sharding_functor (const MapperContext ctx, const Task &task, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Copy &copy, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Close &close, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Acquire &acquire, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
 
void select_sharding_functor (const MapperContext ctx, const Release &release, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) 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 select_sharding_functor (const MapperContext ctx, const MustEpoch &epoch, const SelectShardingFunctorInput &input, MustEpochShardingFunctorOutput &output) override
 
- Public Member Functions inherited from Legion::Mapping::ForwardingMapper
 ForwardingMapper (Mapper *mapper)
 
MapperSyncModel get_mapper_sync_model () const override
 
bool request_valid_instances () const override
 
void premap_task (const MapperContext ctx, const Task &task, const PremapTaskInput &input, PremapTaskOutput &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 report_profiling (const MapperContext ctx, const Task &task, const TaskProfilingInfo &input) override
 
void report_profiling (const MapperContext ctx, const InlineMapping &inline_op, const InlineProfilingInfo &input) override
 
void report_profiling (const MapperContext ctx, const Copy &copy, const CopyProfilingInfo &input) 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 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 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_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 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 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 void map_future_map_reduction (MapperContext ctx, const FutureMapReductionInput &input, FutureMapReductionOutput &output)
 
virtual void handle_instance_collection (const MapperContext ctx, const PhysicalInstance &inst)
 

Additional Inherited Members

- Public Types inherited from Legion::Mapping::Mapper
enum  MapperSyncModel { CONCURRENT_MAPPER_MODEL , SERIALIZED_REENTRANT_MAPPER_MODEL , SERIALIZED_NON_REENTRANT_MAPPER_MODEL }
 
- Public Attributes inherited from Legion::Mapping::Mapper
MapperRuntime *const runtime
 
- Protected Attributes inherited from Legion::Mapping::ForwardingMapper
Mapper *const mapper
 

Detailed Description

Logs the inputs and outputs of callbacks invoked on the wrapped mapper.

To use with your own mapper, replace any use of new MyMapper(...) in your code with new LoggingWrapper(new MyMapper(...)) and run with -level mapper=2. Enabling Realm-level instance reporting might also be useful (-level inst=1).

If you are not already using a custom mapper, you can define something like the following:

static void update_mappers(Machine machine, Runtime* rt,
const std::set<Processor>& local_procs) {
rt->replace_default_mapper(new LoggingWrapper(new DefaultMapper(
rt->get_mapper_runtime(), machine, *(local_procs.begin()))));
}
Definition default_mapper.h:45
Definition logging_wrapper.h:59
Definition runtime.h:108

and invoke Runtime::add_registration_callback(update_mappers) at some point before the runtime is started, e.g. in main right before calling Runtime::start(...).

Assumes that sharding functors are pure, and calls them an additional number of times compared to normal execution.

Currently only supports task, inline mapping and copy API calls.

Member Function Documentation

◆ get_mapper_name()

const char * Legion::Mapping::LoggingWrapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ map_copy()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ map_inline()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ map_task()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ replicate_task()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_copy_sources()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_inline_sources()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [1/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [2/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [3/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [4/10]

void Legion::Mapping::LoggingWrapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [5/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [6/10]

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [7/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [8/10]

void Legion::Mapping::ForwardingMapper::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.

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [9/10]

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_sharding_functor() [10/10]

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_task_options()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ select_task_sources()

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

Reimplemented from Legion::Mapping::ForwardingMapper.

◆ slice_task()

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

Reimplemented from Legion::Mapping::ForwardingMapper.


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