Legion Runtime
Loading...
Searching...
No Matches
null_mapper.h
Go to the documentation of this file.
1/* Copyright 2026 Stanford University, NVIDIA Corporation
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16
17#ifndef __NULL_MAPPER_H__
18#define __NULL_MAPPER_H__
19
25#include "legion.h"
26
27#include <stdlib.h>
28#include <assert.h>
29
30namespace Legion {
31 namespace Mapping {
32
41 class NullMapper : public Mapper {
42 public:
43 NullMapper(MapperRuntime *rt, Machine machine);
44 NullMapper(const NullMapper &rhs);
45 virtual ~NullMapper(void);
46 public:
47 NullMapper& operator=(const NullMapper &rhs);
48 private:
49 void report_unimplemented(const char *func_name, unsigned line) const;
50 public:
51 const char* get_mapper_name(void) const override;
52 MapperSyncModel get_mapper_sync_model(void) const override;
53 public: // Task mapping calls
54 void select_task_options(const MapperContext ctx,
55 const Task& task,
56 TaskOptions& output) override;
57 void premap_task(const MapperContext ctx,
58 const Task& task,
59 const PremapTaskInput& input,
60 PremapTaskOutput& output) override;
61 void slice_task(const MapperContext ctx,
62 const Task& task,
63 const SliceTaskInput& input,
64 SliceTaskOutput& output) override;
65 void map_task(const MapperContext ctx,
66 const Task& task,
67 const MapTaskInput& input,
68 MapTaskOutput& output) override;
69 void replicate_task(MapperContext ctx,
70 const Task& task,
71 const ReplicateTaskInput& input,
72 ReplicateTaskOutput& output) override;
73 void select_task_variant(const MapperContext ctx,
74 const Task& task,
75 const SelectVariantInput& input,
76 SelectVariantOutput& output) override;
77 void postmap_task(const MapperContext ctx,
78 const Task& task,
79 const PostMapInput& input,
80 PostMapOutput& output) override;
81 void select_task_sources(const MapperContext ctx,
82 const Task& task,
83 const SelectTaskSrcInput& input,
84 SelectTaskSrcOutput& output) override;
85 void report_profiling(const MapperContext ctx,
86 const Task& task,
87 const TaskProfilingInfo& input) override;
88 void select_sharding_functor(
89 const MapperContext ctx,
90 const Task& task,
91 const SelectShardingFunctorInput& input,
92 SelectShardingFunctorOutput& output) override;
93 public: // Inline mapping calls
94 void map_inline(const MapperContext ctx,
95 const InlineMapping& inline_op,
96 const MapInlineInput& input,
97 MapInlineOutput& output) override;
98 void select_inline_sources(const MapperContext ctx,
99 const InlineMapping& inline_op,
100 const SelectInlineSrcInput& input,
101 SelectInlineSrcOutput& output) override;
102 void report_profiling(const MapperContext ctx,
103 const InlineMapping& inline_op,
104 const InlineProfilingInfo& input) override;
105 public: // Copy mapping calls
106 void map_copy(const MapperContext ctx,
107 const Copy& copy,
108 const MapCopyInput& input,
109 MapCopyOutput& output) override;
110 void select_copy_sources(const MapperContext ctx,
111 const Copy& copy,
112 const SelectCopySrcInput& input,
113 SelectCopySrcOutput& output) override;
114 void report_profiling(const MapperContext ctx,
115 const Copy& copy,
116 const CopyProfilingInfo& input) override;
118 const MapperContext ctx,
119 const Copy& copy,
120 const SelectShardingFunctorInput& input,
121 SelectShardingFunctorOutput& output) override;
122 public: // Close mapping calls
123 void select_close_sources(const MapperContext ctx,
124 const Close& close,
125 const SelectCloseSrcInput& input,
126 SelectCloseSrcOutput& output) override;
127 void report_profiling(const MapperContext ctx,
128 const Close& close,
129 const CloseProfilingInfo& input) override;
131 const MapperContext ctx,
132 const Close& close,
133 const SelectShardingFunctorInput& input,
134 SelectShardingFunctorOutput& output) override;
135 public: // Acquire mapping calls
136 void map_acquire(const MapperContext ctx,
137 const Acquire& acquire,
138 const MapAcquireInput& input,
139 MapAcquireOutput& output) override;
140 void report_profiling(const MapperContext ctx,
141 const Acquire& acquire,
142 const AcquireProfilingInfo& input) override;
144 const MapperContext ctx,
145 const Acquire& acquire,
146 const SelectShardingFunctorInput& input,
147 SelectShardingFunctorOutput& output) override;
148 public: // Release mapping calls
149 void map_release(const MapperContext ctx,
150 const Release& release,
151 const MapReleaseInput& input,
152 MapReleaseOutput& output) override;
153 void select_release_sources(const MapperContext ctx,
154 const Release& release,
155 const SelectReleaseSrcInput& input,
156 SelectReleaseSrcOutput& output) override;
157 void report_profiling(const MapperContext ctx,
158 const Release& release,
159 const ReleaseProfilingInfo& input) override;
161 const MapperContext ctx,
162 const Release& release,
163 const SelectShardingFunctorInput& input,
164 SelectShardingFunctorOutput& output) override;
165 public: // Partition mapping calls
166 void select_partition_projection(const MapperContext ctx,
167 const Partition& partition,
169 SelectPartitionProjectionOutput& output) override;
170 void map_partition(const MapperContext ctx,
171 const Partition& partition,
172 const MapPartitionInput& input,
173 MapPartitionOutput& output) override;
174 void select_partition_sources(
175 const MapperContext ctx,
176 const Partition& partition,
177 const SelectPartitionSrcInput& input,
178 SelectPartitionSrcOutput& output) override;
179 void report_profiling(const MapperContext ctx,
180 const Partition& partition,
181 const PartitionProfilingInfo& input) override;
183 const MapperContext ctx,
184 const Partition& partition,
185 const SelectShardingFunctorInput& input,
186 SelectShardingFunctorOutput& output) override;
187 public: // Fill mapper calls
189 const MapperContext ctx,
190 const Fill& fill,
191 const SelectShardingFunctorInput& input,
192 SelectShardingFunctorOutput& output) override;
193 public:
194 void map_future_map_reduction(const MapperContext ctx,
195 const FutureMapReductionInput& input,
196 FutureMapReductionOutput& output) override;
197 public: // Task execution mapping calls
198 void configure_context(const MapperContext ctx,
199 const Task& task,
200 ContextConfigOutput& output) override;
201 void select_tunable_value(const MapperContext ctx,
202 const Task& task,
203 const SelectTunableInput& input,
204 SelectTunableOutput& output) override;
205 public: // Must epoch mapping
206 void select_sharding_functor(
207 const MapperContext ctx,
208 const MustEpoch& epoch,
209 const SelectShardingFunctorInput& input,
210 MustEpochShardingFunctorOutput& output) override;
211 void map_must_epoch(const MapperContext ctx,
212 const MapMustEpochInput& input,
213 MapMustEpochOutput& output) override;
214 public: // Dataflow graph mapping
215 void map_dataflow_graph(const MapperContext ctx,
216 const MapDataflowGraphInput& input,
217 MapDataflowGraphOutput& output) override;
218 public: // Memoization control
219 void memoize_operation(const MapperContext ctx,
220 const Mappable& mappable,
221 const MemoizeInput& input,
222 MemoizeOutput& output) override;
223 public: // Mapping control and stealing
224 void select_tasks_to_map(const MapperContext ctx,
225 const SelectMappingInput& input,
226 SelectMappingOutput& output) override;
227 void select_steal_targets(const MapperContext ctx,
228 const SelectStealingInput& input,
229 SelectStealingOutput& output) override;
230 void permit_steal_request(const MapperContext ctx,
231 const StealRequestInput& intput,
232 StealRequestOutput& output) override;
233 public: // handling
234 void handle_message(const MapperContext ctx,
235 const MapperMessage& message) override;
236 void handle_task_result(const MapperContext ctx,
237 const MapperTaskResult& result) override;
238 void handle_instance_collection(const MapperContext ctx,
239 const PhysicalInstance& inst) override;
240 protected:
241 const Machine machine;
242 };
243
244 }; // namespace Mapping
245}; // namespace Legion
246
247#endif // __NULL_MAPPER_H___
248
Definition mapping.h:240
Definition mapping.h:292
Definition mapping.h:185
Definition mapping.h:312
Definition mapping.h:216
Definition mapping.h:42
Definition mapping.h:642
MapperSyncModel
Definition mapping.h:678
Definition mapping.h:2458
Definition null_mapper.h:41
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 Close &close, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
const char * get_mapper_name(void) const override
void handle_instance_collection(const MapperContext ctx, const PhysicalInstance &inst) 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 Fill &fill, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
void select_sharding_functor(const MapperContext ctx, const Copy &copy, const SelectShardingFunctorInput &input, SelectShardingFunctorOutput &output) override
Definition mapping.h:414
Definition mapping.h:377
Definition mapping.h:342
Definition mapping.h:264
Definition mapping.h:112
Definition accessors.h:29
Definition mapping.h:1403
Definition mapping.h:2283
Definition mapping.h:1131
Definition mapping.h:1136
Definition mapping.h:783