Changes: 24.11#
General
Rename the Python package from
legate.core
tolegate
. Note that the layout of the package itself, and the names of modules have not changed. This only affects the install command. Where previously a user would write$ conda install legate-core
They now should write
$ conda install legate
Add
LEGATE_INLINE_TASK_LAUNCH
environment variable to request inline task launch. When enabled, this instructs Legate to forgo the usual Legion task calling convention in favor of launching the task immediately on the submitting thread. This feature is currently considered experimental.Rename
bind.sh
tolegate-bind.sh
.Add
LEGATE_CUDA_DRIVER
environment variable to optionally override the location of the CUDA driver shared library. If not set, defaults to the system-default name of the library (usually “libcuda.so.1”).
C++#
General
Remove
legate_c.h
and all macros defined therein.Remove
legate_preamble.h
.Deprecate
LEGATE_NO_VARIANT
,LEGATE_CPU_VARIANT
,LEGATE_GPU_VARIANT
, andLEGATE_OMP_VARIANT
. Users should use the correspondinglegate::VariantCode
instead.Deprecate
LegateVariantCode
. Users should uselegate::VariantCode
instead.Deprecate
legate::destroy()
. Users should calllegate::finish()
instead.Add
legate::has_finished()
.Add
LocalTaskID
andGlobalTaskID
, to describe local and global Task ID’s. Use these across the public and private API whenever local or global Task ID’s are requested. Unfortunately, this change could not be made in a backwards-compatible way, and users are therefore required to make the following changes. Users that previously didstruct MyTask : LegateTask<MyTask> { static constexpr auto TASK_ID = 0; }; runtime->create_task(..., MyTask::TASK_ID);
Must now either
struct MyTask : LegateTask<MyTask> { static constexpr auto TASK_ID = legate::LocalTaskID{0};
or
runtime->create_task(..., legate::LocalTaskID{MyTask::TASK_ID});
Add
LocalRedopID
andGlobalRedopID
, to describe local and global reduction operator ID’s.Remove
partition.h
andrestriction.h
from the public APIAdd
LEGATE_MPI_WRAPPER
environment variable.
Data
Improve
ScopedAllocator::ScopeAllocator()
alignment validation. The alignment is now required to be a strictly positive power of 2. This was technically always the case, but previous versions did not check this, leading to silent failures down the line. The constructor will now validate the alignment and throw an exception if it is improper.Change passing
nullptr
toScopedAllocator::deallocate()
. This is now a no-op (previously this threw astd::invalid_argument
exception).Clarify that
ScopedAllocator::allocate(0)
will return anullptr
. It always did this, but this behavior is now explicitly documented. Coupled with the change above, it means that all pointers returned fromallocate()
are safe to pass todeallocate()
.
Mapping
Add
NodeRange::hash()
.Remove
mapping::Mapper::set_machine()
.Add
mapping::InstanceMappingPolicy::redundant
that forces eager collection of freshly created redundant copies. Addmapping::InstanceMappingPolicy::with_redundant()
andmapping::InstanceMappingPolicy::set_redundant()
to allow mappers to set new values to the flag.Change enum values for
mapping::TaskTarget
,mapping::StoreTarget
,mapping::AllocPolicy
,mapping::InstLayout
, andmapping::DimOrdering::Kind
. Users should only consider the names of enums (and their members) to be stable, and should not depend on the values themselves.
Partitioning
Tasks
Add
VariantOptions::elide_device_ctx_sync
andVariantOptions::with_elide_device_ctx_sync()
to allow specifying that a particular task variant need not perform device context synchronization after task completion.Add
TaskContext::get_task_stream()
to retrieve the current tasks’ active CUDA stream.Deprecate
TaskRegistrar::record_task(std::int64_t std::unique_ptr<TaskInfo>)
. Users should useLegateTask::Registrar
combined withTaskRegistrar::record_all_task()
instead.Change
TaskRegistrar::register_all_tasks()
to take a mutable reference to thelibrary
argument instead of by value.Deprecate
TaskInfo::has_variant()
. Users should useTaskInfo::find_variant()
directly instead.Change
TaskInfo::find_variant()
to return astd::optional
. If the optional has a value, the find succeeded and the contained value is theVariantInfo
. Otherwise the optional does not contain a value.Add
TaskContext::num_scalars()
to query the number ofScalar
arguments for a task.Move the implementation detail of the CPU communicator (i.e.,
legate::comm::coll::BackenedNetwork
,legate::comm::coll::LocalNetwork
, andlegate::comm::coll::MPINetwork
) to the detail namespace. As a consequence, the following headers are removed from the public interface:backend_network.h
,thread_comm.h
,local_network.h
, andmpi_network.h
.Add
TaskContext::concurrent_task_barrier()
to perform a blocking barrier across all the leaf tasks in a concurrent task launch.
Types
Remove
ReductionOpKind::DIV
andReductionOpKind::SUB
. Partial reduction results are combined in an arbitrary order; since division and subtraction are neither commutative nor associative, it is impossible to use these reliably as reduction operators.Change the return type of
legate::array_type
fromlegate::Type
tolegate::FixedArrayType
.Change the return type of
legate::struct_type
fromlegate::Type
tolegate::StructType
.Change the return type of
legate::list_type
fromlegate::Type
tolegate::ListType
.Change the return type of
legate::point_type
fromlegate::Type
tolegate::FixedArrayType
.legate.core.types.point_type
now returnslegate.core.types.FixedArrayType
instead oflegate.core.types.Type
.Change the return type of
legate::rect_type
fromlegate::Type
tolegate::StructType
.legate.core.types.rect_type
now returnslegate.core.types.StructType
instead oflegate.core.types.Type
.
Runtime
Add optional
default_options
argument toRuntime::create_library()
to specify the library-default task variant options.Add optional
default_options
argument toRuntime::find_or_create_library()
to specify the library-default task variant options.Add
Library::get_default_variant_options()
to retrieve the library-default task variant options.Add
Runtime::issue_mapping_fence()
to issue a mapping fence that prevents all the downstream tasks from being mapped ahead of the fence.Remove
Library::get_mapper_id()
. All libraries share the same (internal) underlying Legion mapper, so this method is pointless.Remove
Library::register_mapper()
. The mapper should be passed when the library is created, and can no longer be changed after the fact.Remove restriction on stores with zero-sized types. It is now possible to create a
LogicalStore
of typeType::Code::NIL
and, for example, empty binary types.Add
Runtime::prefetch_bloated_instances()
to prefetch instances bloated by a certain amount for a given logical store.
Utilities
Deprecate
legate::cuda::StreamPool
. Users should useTaskContext::get_task_stream()
instead within tasks.Deprecate
legate::cuda::StreamView
. Users should implement their own version of this class.
Python#
General
Data
Mapping
Partitioning
Tasks
Add support for default values on scalar arguments in Python tasks.
Add support for
= None
as a default argument for store-type arguments in Python tasks.None
is currently the only allowed default value for stores. Users may use any of the supported “optional” type hint variants (x | None
,Union[x, None]
,Optional[x]
) to inform the runtime that a store argument may beNone
.Add support for passing simple Legate Data Interface objects with a single, non-nullable store, as arguments to Python tasks.
Types
Add
Type.from_python_object()
to allow automatic type deduction at runtime. Maketype
parameters more optional in several cases as a result.
Runtime
Add
Runtime.prefetch_bloated_instances()
to prefetch instances bloated by a certain amount for a given logical store.
Utilities