Mila
Deep Neural Network Library
|
Utility functions for compute device discovery and management. More...
#include <vector>
#include <string>
import Cuda.Helpers;
import Compute.DeviceType;
import Compute.DeviceRegistry;
import Compute.DeviceContext;
Namespaces | |
namespace | Mila |
namespace | Mila::Dnn |
namespace | Mila::Dnn::Compute |
Functions | |
std::string | Mila::Dnn::Compute::getBestDevice (DeviceType type, bool preferMemory=false) |
Gets the best device of a specific type based on performance characteristics. | |
bool | Mila::Dnn::Compute::isDeviceAvailable (const std::string &device_name) |
Checks if a specific device is available. | |
std::vector< std::string > | Mila::Dnn::Compute::listDevices () |
Lists all available compute devices. | |
std::vector< std::string > | Mila::Dnn::Compute::listDevicesByType (DeviceType type) |
Lists compute devices of a specific type. | |
Utility functions for compute device discovery and management.
This module provides a set of helper functions for working with compute devices in the Mila framework. It abstracts device management operations such as:
These utilities help applications interact with heterogeneous compute environments in a device-agnostic way, making it easier to write code that can run across different device types (CPU, CUDA, etc.) without device-specific logic.
The module depends on the DeviceRegistry to enumerate devices and DeviceContext to validate device availability.