Mila
Deep Neural Network Library
|
Utility functions for device context validation. More...
#include <memory>
#include <stdexcept>
#include <type_traits>
import Compute.DeviceType;
import Compute.DeviceContext;
import Compute.CudaDevice;
import Compute.ComputeDevice;
Namespaces | |
namespace | Mila |
namespace | Mila::Dnn |
namespace | Mila::Dnn::Compute |
Functions | |
template<DeviceType TDeviceType> | |
std::shared_ptr< DeviceContext > | Mila::Dnn::Compute::CreateCompatibleContext () |
Creates a device context compatible with the specified device type. | |
template<DeviceType TDeviceType> | |
std::shared_ptr< DeviceContext > | Mila::Dnn::Compute::ValidateContext (std::shared_ptr< DeviceContext > context) |
Validates that the provided context is compatible with the specified device type. | |
Utility functions for device context validation.
This file defines utility functions for creating and validating device contexts that can be shared across different operation types.