Skip to main content

CudaBackend

Struct CudaBackend 

Source
pub struct CudaBackend { /* private fields */ }

Implementations§

Source§

impl CudaBackend

Source

pub fn new(device_id: CudaDeviceId) -> Result<Self, CudaDeviceError>

Create a new CubeCL backend for the caller-selected CUDA device.

§Examples
use tenferro_gpu::{cuda::CudaBackend, cuda::CudaDeviceError, cuda::CudaDeviceId};

let _ctor: fn(CudaDeviceId) -> Result<CudaBackend, CudaDeviceError> = CudaBackend::new;
§Errors

Returns CudaDeviceError::Discovery when device discovery fails, CudaDeviceError::Unavailable when the selected device is not discovered, or CudaDeviceError::Initialization when CUDA runtime, context, or CubeCL client initialization fails.

Source

pub fn runtime(&self) -> &CudaRuntime

Borrow the underlying CubeCL runtime.

§Examples
use tenferro_gpu::{cuda::CudaBackend, cuda::CudaRuntime};

let _runtime: fn(&CudaBackend) -> &CudaRuntime = CudaBackend::runtime;
Source

pub fn device_id(&self) -> CudaDeviceId

Return the caller-selected CUDA device identity used by this backend.

§Examples
use tenferro_gpu::{cuda::CudaBackend, cuda::CudaDeviceId};

let _device_id: fn(&CudaBackend) -> CudaDeviceId = CudaBackend::device_id;
Source

pub fn runtime_identity(&self) -> CudaRuntimeIdentity

Return the opaque identity of this exact executable backend instance.

Clones of a backend return the same identity. Independently constructed backends return different identities even when they target the same CUDA device ordinal.

§Examples
use tenferro_gpu::cuda::CudaBackend;

let _identity = CudaBackend::runtime_identity;
Source

pub fn clear_cuda_extension_cache(&self) -> Result<()>

Clear CUDA extension-owned backend state.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned.

Source

pub fn cuda_extension_cache_stats(&self) -> Result<CacheStats>

Return CUDA extension cache stats.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned.

Source

pub fn cuda_extension_cache_max_entries(&self) -> Result<NonZeroUsize>

Return the CUDA extension cache entry bound.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned.

Source

pub fn cuda_extension_cache_max_retained_bytes(&self) -> Result<NonZeroUsize>

Return the CUDA extension cache logical retained-byte bound.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned.

Source

pub fn set_cuda_extension_cache_max_entries( &self, max_entries: NonZeroUsize, ) -> Result<()>

Configure the CUDA extension cache entry bound.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned while changing the bound.

Source

pub fn set_cuda_extension_cache_max_retained_bytes( &self, max_retained_bytes: NonZeroUsize, ) -> Result<()>

Configure the CUDA extension cache logical retained-byte bound.

§Errors

Returns crate::Error::RuntimeState if the extension cache mutex is poisoned while changing the bound.

Source

pub fn cutensor_plan_cache_stats(&self) -> Result<CacheStats>

Return cuTENSOR contraction plan cache stats.

The returned entry count is the number of retained cuTENSOR contraction plans inside the CUDA backend’s extension cache entry. Logical retained bytes include cached cuTENSOR device workspace estimates.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Source

pub fn cutensor_plan_cache_max_entries(&self) -> Result<NonZeroUsize>

Return the cuTENSOR contraction plan entry bound.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Source

pub fn set_cutensor_plan_cache_max_entries( &self, max_entries: NonZeroUsize, ) -> Result<()>

Configure the cuTENSOR contraction plan entry bound.

The cache is initialized if it does not already exist so a setting made before the first CUDA dot_general call is preserved.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Source

pub fn cutensor_permutation_plan_cache_stats(&self) -> Result<CacheStats>

Return cuTENSOR structural permutation plan cache stats.

The returned entry count is the number of retained cuTENSOR permutation plans inside the CUDA backend’s extension cache entry. Logical retained bytes include cached descriptor and plan state.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Source

pub fn cutensor_permutation_plan_cache_max_entries( &self, ) -> Result<NonZeroUsize>

Return the cuTENSOR structural permutation plan entry bound.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Source

pub fn set_cutensor_permutation_plan_cache_max_entries( &self, max_entries: NonZeroUsize, ) -> Result<()>

Configure the cuTENSOR structural permutation plan entry bound.

The cache is initialized if it does not already exist so a setting made before the first CUDA structural permutation call is preserved.

§Errors

Returns crate::Error::RuntimeState if the cache mutex is poisoned.

Trait Implementations§

Source§

impl BackendCachedDot for CudaBackend

Source§

fn dot_general_read_into_accum_cached( &mut self, _cache: &mut Self::RuntimeCache, _cache_slot: Option<usize>, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<(), Error>

Apply cached scaled dot-general accumulation into caller-provided output. Read more
Source§

impl BackendRuntimeCache for CudaBackend

Source§

impl BackendSession for CudaBackend

Source§

fn vdot_read( &mut self, _lhs: TensorRead<'_>, _rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Compute the all-axis conjugating dot product without transferring either input. Read more
Source§

fn norm_squared_read(&mut self, _input: TensorRead<'_>) -> Result<Tensor, Error>

Compute the all-axis sum of squared magnitudes without taking a square root. Read more
Source§

fn axpby_read_into_accum( &mut self, _alpha: ContractionScalar, _x: TensorRead<'_>, _beta: ContractionScalar, _y: TensorWrite<'_>, ) -> Result<(), Error>

Apply y <- alpha * x + beta * y in one pass into caller-owned storage. Read more
Source§

impl BackendSessionHost for CudaBackend

Source§

fn with_backend_session<R: Send>( &mut self, f: impl FnOnce(&mut dyn BackendSession) -> R + Send, ) -> R

Source§

impl Clone for CudaBackend

Source§

fn clone(&self) -> CudaBackend

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CudaBackend

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DotGeneralPreparation for CudaBackend

Source§

fn prepare( &self, request: DotGeneralPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>

Prepare one dot-general operation. Read more
Source§

impl ElementwiseRuntime for CudaBackend

Source§

fn prepare( &self, request: ElementwisePrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>

Prepare one elementwise operation. Read more
Source§

impl IndexingRuntime for CudaBackend

Source§

fn prepare( &self, request: IndexingPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>

Prepare one indexing operation. Read more
Source§

impl LayoutRuntime for CudaBackend

Source§

fn prepare( &self, request: LayoutPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>

Prepare one layout operation. Read more
Source§

impl ReductionRuntime for CudaBackend

Source§

fn prepare( &self, request: ReductionPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>

Prepare one reduction operation. Read more
Source§

impl RuntimeCacheOwner for CudaBackend

Source§

fn cache_stats(&self) -> Result<CacheStats, CacheOwnerError>

Return this owner’s current cache statistics. Read more
Source§

fn clear_caches(&self) -> Result<(), CacheOwnerError>

Clear this owner’s retained caches. Read more
Source§

impl TensorAnalytic for CudaBackend

Source§

fn exp(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn log(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn sin(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn cos(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn tanh(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn sqrt(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn rsqrt(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn pow(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn expm1(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn log1p(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn exp_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn log_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn sin_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn cos_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn tanh_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn sqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn pow_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

impl TensorBackend for CudaBackend

Source§

impl TensorBackendCapability for CudaBackend

Source§

fn backend_id(&self) -> BackendId

Source§

fn capabilities(&self) -> &'static [OperationCapability]

Source§

fn capability(&self, query: CapabilityQuery) -> Option<OperationCapability>

Look up one operation/dtype capability for this backend. Read more
Source§

fn require_capability( &self, query: CapabilityQuery, axis: CapabilityAxis, ) -> Result<OperationCapability, Error>

Require support for one operation/dtype/axis, returning a structured unsupported error otherwise. Read more
Source§

impl TensorBuffer for CudaBackend

Source§

fn reclaim_buffer(&mut self, _tensor: Tensor)

Source§

impl TensorDeviceTransfer for CudaBackend

Source§

fn download_to_host(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>

Explicitly copy a provider-owned read target into host storage. Read more
Source§

fn upload_host_tensor(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>

Explicitly copy a host read target into provider storage. Read more
Source§

impl TensorDot for CudaBackend

Source§

fn dot_general( &mut self, lhs: &Tensor, rhs: &Tensor, config: &DotGeneralConfig, ) -> Result<Tensor>

Errors Read more
Source§

fn dot_general_read_into_accum( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<()>

Apply scaled dot-general accumulation into caller-provided output. Read more
Source§

fn dot_general_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with dot-general from read inputs. Read more
Source§

impl TensorElementwise for CudaBackend

Source§

fn add(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn sub(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn mul(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn neg(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn conj(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn div(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn rem(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Elementwise remainder. Read more
Source§

fn abs(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn sign(&mut self, input: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn maximum(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn minimum(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>

Errors Read more
Source§

fn compare( &mut self, lhs: &Tensor, rhs: &Tensor, dir: &CompareDir, ) -> Result<Tensor>

Errors Read more
Source§

fn select( &mut self, pred: &Tensor, on_true: &Tensor, on_false: &Tensor, ) -> Result<Tensor>

Errors Read more
Source§

fn clamp( &mut self, input: &Tensor, lower: &Tensor, upper: &Tensor, ) -> Result<Tensor>

Errors Read more
Source§

fn elementwise_read_into( &mut self, op: ElementwiseReadOp, inputs: &[TensorRead<'_>], out: TensorWrite<'_>, ) -> Result<(), Error>

Execute an elementwise operation into caller-owned storage. Read more
Source§

fn add_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Elementwise addition accepting either owned tensors or borrowed views. Read more
Source§

fn add_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise addition. Read more
Source§

fn add_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise addition from reads. Read more
Source§

fn sub_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Elementwise subtraction accepting either owned tensors or borrowed views. Read more
Source§

fn sub_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise subtraction. Read more
Source§

fn sub_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise subtraction from reads. Read more
Source§

fn mul_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn mul_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise multiplication. Read more
Source§

fn mul_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise multiplication from reads. Read more
Source§

fn neg_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn neg_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise negation. Read more
Source§

fn neg_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise negation from a read. Read more
Source§

fn conj_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn conj_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise conjugation. Read more
Source§

fn conj_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise conjugation from a read. Read more
Source§

fn div_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn div_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise division. Read more
Source§

fn div_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>

Overwrite caller-provided output with elementwise division from reads. Read more
Source§

fn rem_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Elementwise remainder accepting owned tensors or borrowed views. Read more
Source§

fn abs_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn sign_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>

Errors Read more
Source§

fn maximum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn minimum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn compare_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, dir: &CompareDir, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn select_read( &mut self, pred: TensorRead<'_>, on_true: TensorRead<'_>, on_false: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

fn clamp_read( &mut self, input: TensorRead<'_>, lower: TensorRead<'_>, upper: TensorRead<'_>, ) -> Result<Tensor, Error>

Errors Read more
Source§

impl TensorFusion for CudaBackend

Source§

impl TensorIndexing for CudaBackend

Source§

fn gather( &mut self, operand: &Tensor, start_indices: &Tensor, config: &GatherConfig, ) -> Result<Tensor>

Errors Read more
Source§

fn scatter( &mut self, operand: &Tensor, scatter_indices: &Tensor, updates: &Tensor, config: &ScatterConfig, ) -> Result<Tensor>

Errors Read more
Source§

fn slice(&mut self, input: &Tensor, config: &SliceConfig) -> Result<Tensor>

Errors Read more
Source§

fn dynamic_slice( &mut self, input: &Tensor, starts: &Tensor, slice_sizes: &[usize], ) -> Result<Tensor>

Errors Read more
Source§

fn dynamic_update_slice( &mut self, _operand: &Tensor, _update: &Tensor, _starts: &Tensor, ) -> Result<Tensor>

Errors Read more
Source§

fn pad(&mut self, input: &Tensor, config: &PadConfig) -> Result<Tensor>

Errors Read more
Source§

fn concatenate(&mut self, inputs: &[&Tensor], axis: usize) -> Result<Tensor>

Errors Read more
Source§

fn reverse(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>

Errors Read more
Source§

impl TensorReduction for CudaBackend

Source§

fn reduce_sum(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>

Errors Read more
Source§

fn reduce_prod(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>

Errors Read more
Source§

fn reduce_max(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>

Errors Read more
Source§

fn reduce_min(&mut self, input: &Tensor, axes: &[usize]) -> Result<Tensor>

Errors Read more
Source§

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>

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>

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>

Take minimum values across axes from an owned tensor or borrowed view. Read more
Source§

impl TensorStructural for CudaBackend

Source§

fn to_contiguous_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>

Materialize an owned tensor or borrowed view into fresh compact storage. Read more
Source§

fn copy_read_into( &mut self, src: TensorRead<'_>, dst: TensorWrite<'_>, ) -> Result<()>

Overwrite caller-provided storage from a readable tensor or view. Read more
Source§

fn transpose(&mut self, input: &Tensor, perm: &[usize]) -> Result<Tensor>

Errors Read more
Source§

fn reshape(&mut self, input: &Tensor, shape: &[usize]) -> Result<Tensor>

Errors Read more
Source§

fn broadcast_in_dim( &mut self, input: &Tensor, shape: &[usize], dims: &[usize], ) -> Result<Tensor>

Errors Read more
Source§

fn cast(&mut self, input: &Tensor, to: DType) -> Result<Tensor>

Cast a tensor to another dtype using explicit dtype projection. Read more
Source§

fn extract_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> Result<Tensor>

Errors Read more
Source§

fn embed_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> Result<Tensor>

Errors Read more
Source§

fn tril(&mut self, input: &Tensor, k: i64) -> Result<Tensor>

Errors Read more
Source§

fn triu(&mut self, input: &Tensor, k: i64) -> Result<Tensor>

Errors Read more
Source§

fn transpose_read( &mut self, input: TensorRead<'_>, perm: &[usize], ) -> Result<Tensor, Error>

Errors Read more
Source§

fn reshape_read( &mut self, input: TensorRead<'_>, shape: &[usize], ) -> Result<Tensor, Error>

Errors Read more
Source§

fn broadcast_in_dim_read( &mut self, input: TensorRead<'_>, shape: &[usize], dims: &[usize], ) -> Result<Tensor, Error>

Errors Read more
Source§

fn convert(&mut self, input: &Tensor, to: DType) -> Result<Tensor, Error>

Convert a tensor to another dtype using checked dtype conversion. Read more
Source§

impl<R> TensorViewCanonicalization<Complex<f32>, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, Complex32, R>, ) -> Result<TypedTensor<Complex32, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, Complex32, R>, dst: &mut TypedTensorViewMut<'_, Complex32, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<Complex<f64>, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, Complex64, R>, ) -> Result<TypedTensor<Complex64, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, Complex64, R>, dst: &mut TypedTensorViewMut<'_, Complex64, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<bool, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, _view: &TypedTensorView<'_, bool, R>, ) -> Result<TypedTensor<bool, R>>

Errors Read more
Source§

fn copy_into( &mut self, _src: &TypedTensorView<'_, bool, R>, _dst: &mut TypedTensorViewMut<'_, bool, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<f32, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, f32, R>, ) -> Result<TypedTensor<f32, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, f32, R>, dst: &mut TypedTensorViewMut<'_, f32, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<f64, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, f64, R>, ) -> Result<TypedTensor<f64, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, f64, R>, dst: &mut TypedTensorViewMut<'_, f64, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<i32, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, i32, R>, ) -> Result<TypedTensor<i32, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, i32, R>, dst: &mut TypedTensorViewMut<'_, i32, R>, ) -> Result<()>

Errors Read more
Source§

impl<R> TensorViewCanonicalization<i64, R> for CudaBackend
where R: TensorRank,

Source§

fn to_contiguous( &mut self, view: &TypedTensorView<'_, i64, R>, ) -> Result<TypedTensor<i64, R>>

Errors Read more
Source§

fn copy_into( &mut self, src: &TypedTensorView<'_, i64, R>, dst: &mut TypedTensorViewMut<'_, i64, R>, ) -> Result<()>

Errors Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> ByRef<T> for T

§

fn by_ref(&self) -> &T

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<C> CloneExpand for C
where C: Clone,

§

fn __expand_clone_method(&self, _scope: &mut Scope) -> C

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<S> FaerParallelismExt for S
where S: BackendSession + ?Sized,

Source§

fn with_faer_parallelism( &mut self, callback: impl FnOnce(Par) -> Result<(), Error> + Send, ) -> Result<(), Error>

Run a scoped callback with this session’s faer parallelism policy. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoComptime for T

§

fn comptime(self) -> Self

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSendSync for T
where T: Send + Sync,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> SessionCachedDot for T
where T: TensorBackend + ?Sized,

Source§

fn dot_general_read_into_accum_cached( &mut self, _cache_slot: Option<usize>, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<(), Error>

Apply session-cached scaled dot-general accumulation into output. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> TuneInputs for T
where T: Clone + Send + Sync + 'static,

§

type At<'a> = T

The concrete input type at lifetime 'a.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,