|
Mila
Deep Neural Network Library
|
Execution context framework for compute operations and stream management. More...
#include <cassert>#include <string>#include <stdexcept>#include <format>import Compute.DeviceType;import Compute.CpuExecutionContext;import Compute.DeviceId;import Compute.ExecutionContextTraits.Cpu;import Compute.ExecutionContextTraits;import Compute.IExecutionContext;Namespaces | |
| namespace | Mila |
| Mila main API namespace. | |
Typedefs | |
| template<DeviceType TDeviceType> | |
| using | Mila::Dnn::Compute::ExecutionContext = typename ExecutionContextTraits<TDeviceType>::type |
| The execution context for a device type. | |
Functions | |
| template<DeviceType TDeviceType> | |
| const ExecutionContext< TDeviceType > * | Mila::Dnn::Compute::cast_context_ (const IExecutionContext *ctx) noexcept |
| template<DeviceType TDeviceType> | |
| ExecutionContext< TDeviceType > * | Mila::Dnn::Compute::cast_context_ (IExecutionContext *ctx) noexcept |
| template<DeviceType TDeviceType> | |
| ExecutionContext< TDeviceType > * | Mila::Dnn::Compute::validateExecutionContext_ (IExecutionContext *context, const std::string &op_name) |
Execution context framework for compute operations and stream management.
ExecutionContext manages execution streams, synchronization, and compute library handles across hardware platforms. Selecting the backend by device type at compile time gives type safety and eliminates runtime dispatch overhead.
|
export |
The execution context for a device type.
Resolves to the backend's concrete context class – CpuExecutionContext, CudaExecutionContext – each of which implements IExecutionContext and adds the stream and library handles its backend needs.
| TDeviceType | The device type (Cpu, Cuda, ...). |