pub trait TensorDeviceTransfer {
// Provided methods
fn download_to_host(&mut self, tensor: &Tensor) -> Result<Tensor> { ... }
fn upload_host_tensor(&mut self, tensor: &Tensor) -> Result<Tensor> { ... }
}Expand description
Device transfer operations on backend boundaries.
§Examples
use tenferro_tensor::TensorDeviceTransfer;
fn accepts_transfer<B: TensorDeviceTransfer>(_backend: &mut B) {}Provided Methods§
Sourcefn download_to_host(&mut self, tensor: &Tensor) -> Result<Tensor>
fn download_to_host(&mut self, tensor: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.
Sourcefn upload_host_tensor(&mut self, tensor: &Tensor) -> Result<Tensor>
fn upload_host_tensor(&mut self, tensor: &Tensor) -> Result<Tensor>
§Errors
Returns crate::Error::Validation with a typed ValidationError source
for invalid shapes, ranks, axes, dtypes, or output metadata. It returns
crate::Error::BackendFailure or crate::Error::BackendSource when
backend execution or storage access cannot provide the requested result.