legate::mapping::Mapper#
-
class Mapper#
An abstract class that defines Legate mapping APIs.
The APIs give Legate libraries high-level control on task and store mappings
Subclassed by legate::experimental::io::detail::Mapper, legate::mapping::detail::CoreMapper, legate::mapping::detail::DefaultMapper
Public Functions
- virtual std::vector<StoreMapping> store_mappings(
- const Task &task,
- const std::vector<StoreTarget> &options
Chooses mapping policies for the task’s stores.
Store mappings can be underspecified; any store of the task that doesn’t have a mapping policy will fall back to the default one.
- Parameters:
task – Task to map
options – Types of memories to which the stores can be mapped
- Returns:
A vector of store mappings
- virtual std::optional<std::size_t> allocation_pool_size(
- const Task &task,
- StoreTarget memory_kind
Returns an upper bound for the amount of memory (in bytes), of a particular memory type, allocated by a task via Legate allocators.
All buffers created by
create_buffer
orcreate_output_buffer
calls are drawn from this allocation pool, and their aggregate size cannot exceed the upper bound returned from this call (the program will crash otherwise). Any out-of-band memory allocations (e.g., those created bymalloc
orcudaMalloc
) invisible to Legate are not subject to this pool bound.This callback is invoked only for task variants that are registered with
has_allocations
beingtrue
.