Mila 0.13.48
Deep Neural Network Library
Loading...
Searching...
No Matches
Mila::Dnn::Compute::ExecutionContext< TDeviceType > Class Template Referenceexport

Templated execution context for device-specific operations. More...

Detailed Description

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
TDeviceTypeThe device type (Cpu, Cuda, Metal, Rocm etc.)
Examples
/__w/Mila/Mila/Mila/Src/Dnn/Core/ComponentFactory.ixx, and /__w/Mila/Mila/Mila/Src/Dnn/Core/NetworkFactory.ixx.

The documentation for this class was generated from the following file: