pub struct TensorReadUtils;Expand description
Utility functions for tensor reading
Implementations§
Source§impl TensorReadUtils
impl TensorReadUtils
Sourcepub fn optimal_buffer_size(tensor_info: &TensorInfo) -> usize
pub fn optimal_buffer_size(tensor_info: &TensorInfo) -> usize
Calculate optimal buffer size for reading a tensor
Sourcepub fn should_read_chunked(
tensor_info: &TensorInfo,
chunk_threshold: usize,
) -> bool
pub fn should_read_chunked( tensor_info: &TensorInfo, chunk_threshold: usize, ) -> bool
Check if a tensor should be read in chunks
Sourcepub fn calculate_memory_requirements(
tensor_infos: &[&TensorInfo],
) -> TensorMemoryRequirements
pub fn calculate_memory_requirements( tensor_infos: &[&TensorInfo], ) -> TensorMemoryRequirements
Calculate memory requirements for reading tensors
Auto Trait Implementations§
impl Freeze for TensorReadUtils
impl RefUnwindSafe for TensorReadUtils
impl Send for TensorReadUtils
impl Sync for TensorReadUtils
impl Unpin for TensorReadUtils
impl UnsafeUnpin for TensorReadUtils
impl UnwindSafe for TensorReadUtils
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