Templated execution context for device-specific operations.
More...
template<
DeviceType TDeviceType>
class Mila::Dnn::Compute::ExecutionContext< TDeviceType >
Templated execution context for device-specific operations.
ExecutionContext manages the resources needed for executing operations: streams for asynchronous execution, library handles (cuBLAS, cuDNN), and synchronization primitives. The template parameter provides compile-time device type checking and enables device-specific optimizations.
Design rationale:
- Template parameter eliminates runtime type checking overhead
- Each device type has a specialized implementation
- Components are templated on device type, ensuring type safety throughout
- No virtual function overhead for device-specific operations
- Template Parameters
-
| TDeviceType | The device type (Cpu, Cuda, Metal, Rocm etc.) |
- Examples
- /home/runner/work/Mila/Mila/Mila/Src/Dnn/Core/ComponentFactory.ixx, and /home/runner/work/Mila/Mila/Mila/Src/Dnn/Core/NetworkFactory.ixx.
The documentation for this class was generated from the following file:
- Mila/Src/Dnn/Compute/ExecutionContext.Template.ixx