Expand description
Device abstraction and shared error types for the tenferro workspace.
This crate provides:
LogicalMemorySpaceenum representing where tensor data residesComputeDeviceenum representing hardware compute devicesOpKindenum classifying tensor operations for device selectionpreferred_compute_devicesfor querying compatible devicesErrorandResulttypes used across all tenferro crates
§Examples
use tenferro_device::{LogicalMemorySpace, ComputeDevice};
let space = LogicalMemorySpace::MainMemory;
let dev = ComputeDevice::Cpu { device_id: 0 };
assert_eq!(format!("{dev}"), "cpu:0");Enums§
- Compute
Device - Compute device that can execute tensor operations.
- Error
- Error type used across the tenferro workspace.
- Logical
Memory Space - Logical memory space where tensor data resides.
- OpKind
- Classification of tensor operations, used to query preferred compute devices for a given operation on a given memory space.
Functions§
- preferred_
compute_ devices - Return the preferred compute devices for a given operation on a memory space.