pub struct ESPCompatibility;Expand description
Utility for checking and optimizing tensors for ESP device constraints
Implementations§
Source§impl ESPCompatibility
impl ESPCompatibility
pub fn get_recommended_config(device_type: ESPDeviceType) -> ESPMiningConfig
Sourcepub fn fits_device(tensor: &Tensor, device_type: ESPDeviceType) -> bool
pub fn fits_device(tensor: &Tensor, device_type: ESPDeviceType) -> bool
Check whether a tensor fits within a device’s memory constraints
Sourcepub fn optimize_for_esp(
tensor: &Tensor,
device_type: &ESPDeviceType,
) -> TribeResult<Tensor>
pub fn optimize_for_esp( tensor: &Tensor, device_type: &ESPDeviceType, ) -> TribeResult<Tensor>
Clamp a tensor to fit within ESP device limits
Sourcepub fn most_restrictive_dim(devices: &[ESPDeviceType]) -> usize
pub fn most_restrictive_dim(devices: &[ESPDeviceType]) -> usize
Return the most restrictive tensor dimension across a set of device types
Auto Trait Implementations§
impl Freeze for ESPCompatibility
impl RefUnwindSafe for ESPCompatibility
impl Send for ESPCompatibility
impl Sync for ESPCompatibility
impl Unpin for ESPCompatibility
impl UnsafeUnpin for ESPCompatibility
impl UnwindSafe for ESPCompatibility
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more