pub enum EagerBackend {
Cpu(CpuBackend),
}Variants§
Cpu(CpuBackend)
Trait Implementations§
Source§impl BackendSessionHost for EagerBackend
impl BackendSessionHost for EagerBackend
fn with_backend_session<R: Send>( &mut self, f: impl FnOnce(&mut dyn BackendSession) -> R + Send, ) -> R
Source§impl Debug for EagerBackend
impl Debug for EagerBackend
Source§impl TensorAnalytic for EagerBackend
impl TensorAnalytic for EagerBackend
fn exp(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn exp_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn log(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn log_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn sin(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn sin_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn cos(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn cos_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn tanh(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn tanh_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn sqrt(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn sqrt_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn rsqrt(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn rsqrt_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn pow(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
fn pow_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
fn expm1(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn expm1_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn log1p(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn log1p_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
Source§impl TensorBuffer for EagerBackend
impl TensorBuffer for EagerBackend
fn reclaim_buffer(&mut self, tensor: Tensor)
Source§impl TensorDeviceTransfer for EagerBackend
impl TensorDeviceTransfer for EagerBackend
fn download_to_host(&mut self, tensor: &Tensor) -> TensorResult<Tensor>
fn upload_host_tensor(&mut self, tensor: &Tensor) -> TensorResult<Tensor>
Source§impl TensorDot for EagerBackend
impl TensorDot for EagerBackend
fn dot_general( &mut self, lhs: &Tensor, rhs: &Tensor, config: &DotGeneralConfig, ) -> TensorResult<Tensor>
Source§impl TensorElementwise for EagerBackend
impl TensorElementwise for EagerBackend
fn add(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
Source§fn add_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> TensorResult<Tensor>
fn add_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
Elementwise addition accepting either owned tensors or borrowed views. Read more
fn mul(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
fn mul_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
fn neg(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn neg_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn conj(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn conj_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn div(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
fn div_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
fn abs(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn abs_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn sign(&mut self, input: &Tensor) -> TensorResult<Tensor>
fn sign_read(&mut self, input: TensorRead<'_>) -> TensorResult<Tensor>
fn maximum(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
fn maximum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
fn minimum(&mut self, lhs: &Tensor, rhs: &Tensor) -> TensorResult<Tensor>
fn minimum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> TensorResult<Tensor>
fn compare( &mut self, lhs: &Tensor, rhs: &Tensor, dir: &CompareDir, ) -> TensorResult<Tensor>
fn compare_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, dir: &CompareDir, ) -> TensorResult<Tensor>
fn select( &mut self, pred: &Tensor, on_true: &Tensor, on_false: &Tensor, ) -> TensorResult<Tensor>
fn select_read( &mut self, pred: TensorRead<'_>, on_true: TensorRead<'_>, on_false: TensorRead<'_>, ) -> TensorResult<Tensor>
fn clamp( &mut self, input: &Tensor, lower: &Tensor, upper: &Tensor, ) -> TensorResult<Tensor>
fn clamp_read( &mut self, input: TensorRead<'_>, lower: TensorRead<'_>, upper: TensorRead<'_>, ) -> TensorResult<Tensor>
Source§impl TensorIndexing for EagerBackend
impl TensorIndexing for EagerBackend
fn gather( &mut self, operand: &Tensor, start_indices: &Tensor, config: &GatherConfig, ) -> TensorResult<Tensor>
fn scatter( &mut self, operand: &Tensor, scatter_indices: &Tensor, updates: &Tensor, config: &ScatterConfig, ) -> TensorResult<Tensor>
fn slice( &mut self, input: &Tensor, config: &SliceConfig, ) -> TensorResult<Tensor>
fn dynamic_slice( &mut self, input: &Tensor, starts: &Tensor, slice_sizes: &[usize], ) -> TensorResult<Tensor>
fn dynamic_update_slice( &mut self, operand: &Tensor, update: &Tensor, starts: &Tensor, ) -> TensorResult<Tensor>
fn pad(&mut self, input: &Tensor, config: &PadConfig) -> TensorResult<Tensor>
fn concatenate( &mut self, inputs: &[&Tensor], axis: usize, ) -> TensorResult<Tensor>
fn reverse(&mut self, input: &Tensor, axes: &[usize]) -> TensorResult<Tensor>
Source§impl TensorReduction for EagerBackend
impl TensorReduction for EagerBackend
fn reduce_sum(&mut self, input: &Tensor, axes: &[usize]) -> TensorResult<Tensor>
fn reduce_prod( &mut self, input: &Tensor, axes: &[usize], ) -> TensorResult<Tensor>
fn reduce_max(&mut self, input: &Tensor, axes: &[usize]) -> TensorResult<Tensor>
fn reduce_min(&mut self, input: &Tensor, axes: &[usize]) -> TensorResult<Tensor>
Source§fn reduce_sum_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_sum_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Sum elements across axes from an owned tensor or borrowed view. Read more
Source§fn reduce_prod_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_prod_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Multiply elements across axes from an owned tensor or borrowed view. Read more
Source§fn reduce_max_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_max_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Take maximum values across axes from an owned tensor or borrowed view. Read more
Source§fn reduce_min_read(
&mut self,
input: TensorRead<'_>,
axes: &[usize],
) -> Result<Tensor, Error>
fn reduce_min_read( &mut self, input: TensorRead<'_>, axes: &[usize], ) -> Result<Tensor, Error>
Take minimum values across axes from an owned tensor or borrowed view. Read more
Source§impl TensorStructural for EagerBackend
impl TensorStructural for EagerBackend
fn transpose(&mut self, input: &Tensor, perm: &[usize]) -> TensorResult<Tensor>
fn reshape(&mut self, input: &Tensor, shape: &[usize]) -> TensorResult<Tensor>
fn reshape_read( &mut self, input: TensorRead<'_>, shape: &[usize], ) -> TensorResult<Tensor>
fn broadcast_in_dim( &mut self, input: &Tensor, shape: &[usize], dims: &[usize], ) -> TensorResult<Tensor>
fn broadcast_in_dim_read( &mut self, input: TensorRead<'_>, shape: &[usize], dims: &[usize], ) -> TensorResult<Tensor>
Source§fn cast(&mut self, input: &Tensor, to: DType) -> TensorResult<Tensor>
fn cast(&mut self, input: &Tensor, to: DType) -> TensorResult<Tensor>
Cast a tensor to another dtype using explicit dtype projection. Read more
fn extract_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> TensorResult<Tensor>
fn embed_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> TensorResult<Tensor>
fn tril(&mut self, input: &Tensor, k: i64) -> TensorResult<Tensor>
fn triu(&mut self, input: &Tensor, k: i64) -> TensorResult<Tensor>
fn transpose_read( &mut self, input: TensorRead<'_>, perm: &[usize], ) -> Result<Tensor, Error>
impl BackendCachedDot for EagerBackend
impl BackendRuntimeCache for EagerBackend
impl TensorBackend for EagerBackend
impl TensorFusion for EagerBackend
Auto Trait Implementations§
impl Freeze for EagerBackend
impl !RefUnwindSafe for EagerBackend
impl Send for EagerBackend
impl Sync for EagerBackend
impl Unpin for EagerBackend
impl UnsafeUnpin for EagerBackend
impl !UnwindSafe for EagerBackend
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
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more