pub struct CudaBackend { /* private fields */ }Implementations§
Source§impl CudaBackend
impl CudaBackend
Sourcepub fn new(device_id: CudaDeviceId) -> Result<Self, CudaDeviceError>
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.
Sourcepub fn runtime(&self) -> &CudaRuntime
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;Sourcepub fn device_id(&self) -> CudaDeviceId
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;Sourcepub fn runtime_identity(&self) -> CudaRuntimeIdentity
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;Sourcepub fn clear_cuda_extension_cache(&self) -> Result<()>
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.
Sourcepub fn cuda_extension_cache_stats(&self) -> Result<CacheStats>
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.
Sourcepub fn cuda_extension_cache_max_entries(&self) -> Result<NonZeroUsize>
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.
Sourcepub fn cuda_extension_cache_max_retained_bytes(&self) -> Result<NonZeroUsize>
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.
Sourcepub fn set_cuda_extension_cache_max_entries(
&self,
max_entries: NonZeroUsize,
) -> Result<()>
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.
Sourcepub fn set_cuda_extension_cache_max_retained_bytes(
&self,
max_retained_bytes: NonZeroUsize,
) -> Result<()>
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.
Sourcepub fn cutensor_plan_cache_stats(&self) -> Result<CacheStats>
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.
Sourcepub fn cutensor_plan_cache_max_entries(&self) -> Result<NonZeroUsize>
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.
Sourcepub fn set_cutensor_plan_cache_max_entries(
&self,
max_entries: NonZeroUsize,
) -> Result<()>
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.
Sourcepub fn cutensor_permutation_plan_cache_stats(&self) -> Result<CacheStats>
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.
Sourcepub fn cutensor_permutation_plan_cache_max_entries(
&self,
) -> Result<NonZeroUsize>
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.
Sourcepub fn set_cutensor_permutation_plan_cache_max_entries(
&self,
max_entries: NonZeroUsize,
) -> Result<()>
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
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>
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>
impl BackendRuntimeCache for CudaBackend
Source§impl BackendSession for CudaBackend
impl BackendSession for CudaBackend
Source§fn vdot_read(
&mut self,
_lhs: TensorRead<'_>,
_rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn vdot_read( &mut self, _lhs: TensorRead<'_>, _rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn norm_squared_read(&mut self, _input: TensorRead<'_>) -> Result<Tensor, Error>
fn norm_squared_read(&mut self, _input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn axpby_read_into_accum(
&mut self,
_alpha: ContractionScalar,
_x: TensorRead<'_>,
_beta: ContractionScalar,
_y: TensorWrite<'_>,
) -> Result<(), Error>
fn axpby_read_into_accum( &mut self, _alpha: ContractionScalar, _x: TensorRead<'_>, _beta: ContractionScalar, _y: TensorWrite<'_>, ) -> Result<(), Error>
y <- alpha * x + beta * y in one pass into caller-owned storage. Read moreSource§impl BackendSessionHost for CudaBackend
impl BackendSessionHost for CudaBackend
fn with_backend_session<R: Send>( &mut self, f: impl FnOnce(&mut dyn BackendSession) -> R + Send, ) -> R
Source§impl Clone for CudaBackend
impl Clone for CudaBackend
Source§fn clone(&self) -> CudaBackend
fn clone(&self) -> CudaBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CudaBackend
impl Debug for CudaBackend
Source§impl DotGeneralPreparation for CudaBackend
impl DotGeneralPreparation for CudaBackend
Source§fn prepare(
&self,
request: DotGeneralPrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: DotGeneralPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl ElementwiseRuntime for CudaBackend
impl ElementwiseRuntime for CudaBackend
Source§fn prepare(
&self,
request: ElementwisePrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: ElementwisePrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl IndexingRuntime for CudaBackend
impl IndexingRuntime for CudaBackend
Source§fn prepare(
&self,
request: IndexingPrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: IndexingPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl LayoutRuntime for CudaBackend
impl LayoutRuntime for CudaBackend
Source§fn prepare(
&self,
request: LayoutPrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: LayoutPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl ReductionRuntime for CudaBackend
impl ReductionRuntime for CudaBackend
Source§fn prepare(
&self,
request: ReductionPrepareRequest<'_>,
) -> Result<PrepareCapability, PrepareError>
fn prepare( &self, request: ReductionPrepareRequest<'_>, ) -> Result<PrepareCapability, PrepareError>
Source§impl RuntimeCacheOwner for CudaBackend
impl RuntimeCacheOwner for CudaBackend
Source§fn cache_stats(&self) -> Result<CacheStats, CacheOwnerError>
fn cache_stats(&self) -> Result<CacheStats, CacheOwnerError>
Source§fn clear_caches(&self) -> Result<(), CacheOwnerError>
fn clear_caches(&self) -> Result<(), CacheOwnerError>
Source§impl TensorAnalytic for CudaBackend
impl TensorAnalytic for CudaBackend
Source§fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn rsqrt_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn pow_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn pow_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn expm1_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
Source§fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
fn log1p_read(&mut self, input: TensorRead<'_>) -> Result<Tensor, Error>
impl TensorBackend for CudaBackend
Source§impl TensorBackendCapability for CudaBackend
impl TensorBackendCapability for CudaBackend
fn backend_id(&self) -> BackendId
fn capabilities(&self) -> &'static [OperationCapability]
Source§fn capability(&self, query: CapabilityQuery) -> Option<OperationCapability>
fn capability(&self, query: CapabilityQuery) -> Option<OperationCapability>
Source§fn require_capability(
&self,
query: CapabilityQuery,
axis: CapabilityAxis,
) -> Result<OperationCapability, Error>
fn require_capability( &self, query: CapabilityQuery, axis: CapabilityAxis, ) -> Result<OperationCapability, Error>
Source§impl TensorBuffer for CudaBackend
impl TensorBuffer for CudaBackend
fn reclaim_buffer(&mut self, _tensor: Tensor)
Source§impl TensorDeviceTransfer for CudaBackend
impl TensorDeviceTransfer for CudaBackend
Source§fn download_to_host(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
fn download_to_host(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
Source§fn upload_host_tensor(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
fn upload_host_tensor(&mut self, tensor: TensorRead<'_>) -> Result<Tensor>
Source§impl TensorDot for CudaBackend
impl TensorDot for CudaBackend
Source§fn dot_general(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
config: &DotGeneralConfig,
) -> Result<Tensor>
fn dot_general( &mut self, lhs: &Tensor, rhs: &Tensor, config: &DotGeneralConfig, ) -> Result<Tensor>
Source§fn dot_general_read_into_accum(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
config: &DotGeneralConfig,
accumulation: DotGeneralAccumulation,
out: TensorWrite<'_>,
) -> Result<()>
fn dot_general_read_into_accum( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, accumulation: DotGeneralAccumulation, out: TensorWrite<'_>, ) -> Result<()>
Source§fn dot_general_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
config: &DotGeneralConfig,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn dot_general_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, config: &DotGeneralConfig, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§impl TensorElementwise for CudaBackend
impl TensorElementwise for CudaBackend
Source§fn rem(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>
fn rem(&mut self, lhs: &Tensor, rhs: &Tensor) -> Result<Tensor>
Source§fn compare(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
dir: &CompareDir,
) -> Result<Tensor>
fn compare( &mut self, lhs: &Tensor, rhs: &Tensor, dir: &CompareDir, ) -> Result<Tensor>
Source§fn select(
&mut self,
pred: &Tensor,
on_true: &Tensor,
on_false: &Tensor,
) -> Result<Tensor>
fn select( &mut self, pred: &Tensor, on_true: &Tensor, on_false: &Tensor, ) -> Result<Tensor>
Source§fn clamp(
&mut self,
input: &Tensor,
lower: &Tensor,
upper: &Tensor,
) -> Result<Tensor>
fn clamp( &mut self, input: &Tensor, lower: &Tensor, upper: &Tensor, ) -> Result<Tensor>
Source§fn elementwise_read_into(
&mut self,
op: ElementwiseReadOp,
inputs: &[TensorRead<'_>],
out: TensorWrite<'_>,
) -> Result<(), Error>
fn elementwise_read_into( &mut self, op: ElementwiseReadOp, inputs: &[TensorRead<'_>], out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn add_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn add_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn add_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn add_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn add_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn add_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn sub_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn sub_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn sub_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn sub_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn sub_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn sub_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn mul_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn mul_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn mul_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn mul_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn mul_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn mul_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn neg_into(
&mut self,
input: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn neg_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn neg_read_into(
&mut self,
input: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn neg_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn conj_into(
&mut self,
input: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn conj_into( &mut self, input: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn conj_read_into(
&mut self,
input: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn conj_read_into( &mut self, input: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn div_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn div_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn div_into(
&mut self,
lhs: &Tensor,
rhs: &Tensor,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn div_into( &mut self, lhs: &Tensor, rhs: &Tensor, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn div_read_into(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
out: TensorWrite<'_>,
) -> Result<(), Error>
fn div_read_into( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, out: TensorWrite<'_>, ) -> Result<(), Error>
Source§fn rem_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn rem_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn maximum_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn maximum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn minimum_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
) -> Result<Tensor, Error>
fn minimum_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn compare_read(
&mut self,
lhs: TensorRead<'_>,
rhs: TensorRead<'_>,
dir: &CompareDir,
) -> Result<Tensor, Error>
fn compare_read( &mut self, lhs: TensorRead<'_>, rhs: TensorRead<'_>, dir: &CompareDir, ) -> Result<Tensor, Error>
Source§fn select_read(
&mut self,
pred: TensorRead<'_>,
on_true: TensorRead<'_>,
on_false: TensorRead<'_>,
) -> Result<Tensor, Error>
fn select_read( &mut self, pred: TensorRead<'_>, on_true: TensorRead<'_>, on_false: TensorRead<'_>, ) -> Result<Tensor, Error>
Source§fn clamp_read(
&mut self,
input: TensorRead<'_>,
lower: TensorRead<'_>,
upper: TensorRead<'_>,
) -> Result<Tensor, Error>
fn clamp_read( &mut self, input: TensorRead<'_>, lower: TensorRead<'_>, upper: TensorRead<'_>, ) -> Result<Tensor, Error>
impl TensorFusion for CudaBackend
Source§impl TensorIndexing for CudaBackend
impl TensorIndexing for CudaBackend
Source§fn gather(
&mut self,
operand: &Tensor,
start_indices: &Tensor,
config: &GatherConfig,
) -> Result<Tensor>
fn gather( &mut self, operand: &Tensor, start_indices: &Tensor, config: &GatherConfig, ) -> Result<Tensor>
Source§fn scatter(
&mut self,
operand: &Tensor,
scatter_indices: &Tensor,
updates: &Tensor,
config: &ScatterConfig,
) -> Result<Tensor>
fn scatter( &mut self, operand: &Tensor, scatter_indices: &Tensor, updates: &Tensor, config: &ScatterConfig, ) -> Result<Tensor>
Source§fn dynamic_slice(
&mut self,
input: &Tensor,
starts: &Tensor,
slice_sizes: &[usize],
) -> Result<Tensor>
fn dynamic_slice( &mut self, input: &Tensor, starts: &Tensor, slice_sizes: &[usize], ) -> Result<Tensor>
Source§impl TensorReduction for CudaBackend
impl TensorReduction for CudaBackend
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>
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>
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>
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>
Source§impl TensorStructural for CudaBackend
impl TensorStructural for CudaBackend
Source§fn to_contiguous_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
fn to_contiguous_read(&mut self, input: TensorRead<'_>) -> Result<Tensor>
Source§fn copy_read_into(
&mut self,
src: TensorRead<'_>,
dst: TensorWrite<'_>,
) -> Result<()>
fn copy_read_into( &mut self, src: TensorRead<'_>, dst: TensorWrite<'_>, ) -> Result<()>
Source§fn broadcast_in_dim(
&mut self,
input: &Tensor,
shape: &[usize],
dims: &[usize],
) -> Result<Tensor>
fn broadcast_in_dim( &mut self, input: &Tensor, shape: &[usize], dims: &[usize], ) -> Result<Tensor>
Source§fn cast(&mut self, input: &Tensor, to: DType) -> Result<Tensor>
fn cast(&mut self, input: &Tensor, to: DType) -> Result<Tensor>
Source§fn extract_diagonal(
&mut self,
input: &Tensor,
axis_a: usize,
axis_b: usize,
) -> Result<Tensor>
fn extract_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> Result<Tensor>
Source§fn embed_diagonal(
&mut self,
input: &Tensor,
axis_a: usize,
axis_b: usize,
) -> Result<Tensor>
fn embed_diagonal( &mut self, input: &Tensor, axis_a: usize, axis_b: usize, ) -> Result<Tensor>
Source§fn transpose_read(
&mut self,
input: TensorRead<'_>,
perm: &[usize],
) -> Result<Tensor, Error>
fn transpose_read( &mut self, input: TensorRead<'_>, perm: &[usize], ) -> Result<Tensor, Error>
Source§fn reshape_read(
&mut self,
input: TensorRead<'_>,
shape: &[usize],
) -> Result<Tensor, Error>
fn reshape_read( &mut self, input: TensorRead<'_>, shape: &[usize], ) -> Result<Tensor, Error>
Source§fn broadcast_in_dim_read(
&mut self,
input: TensorRead<'_>,
shape: &[usize],
dims: &[usize],
) -> Result<Tensor, Error>
fn broadcast_in_dim_read( &mut self, input: TensorRead<'_>, shape: &[usize], dims: &[usize], ) -> Result<Tensor, Error>
Source§impl<R> TensorViewCanonicalization<Complex<f32>, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<Complex<f32>, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, Complex32, R>,
) -> Result<TypedTensor<Complex32, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, Complex32, R>, ) -> Result<TypedTensor<Complex32, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, Complex32, R>,
dst: &mut TypedTensorViewMut<'_, Complex32, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, Complex32, R>, dst: &mut TypedTensorViewMut<'_, Complex32, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<Complex<f64>, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<Complex<f64>, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, Complex64, R>,
) -> Result<TypedTensor<Complex64, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, Complex64, R>, ) -> Result<TypedTensor<Complex64, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, Complex64, R>,
dst: &mut TypedTensorViewMut<'_, Complex64, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, Complex64, R>, dst: &mut TypedTensorViewMut<'_, Complex64, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<bool, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<bool, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
_view: &TypedTensorView<'_, bool, R>,
) -> Result<TypedTensor<bool, R>>
fn to_contiguous( &mut self, _view: &TypedTensorView<'_, bool, R>, ) -> Result<TypedTensor<bool, R>>
Source§fn copy_into(
&mut self,
_src: &TypedTensorView<'_, bool, R>,
_dst: &mut TypedTensorViewMut<'_, bool, R>,
) -> Result<()>
fn copy_into( &mut self, _src: &TypedTensorView<'_, bool, R>, _dst: &mut TypedTensorViewMut<'_, bool, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<f32, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<f32, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, f32, R>,
) -> Result<TypedTensor<f32, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, f32, R>, ) -> Result<TypedTensor<f32, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, f32, R>,
dst: &mut TypedTensorViewMut<'_, f32, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, f32, R>, dst: &mut TypedTensorViewMut<'_, f32, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<f64, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<f64, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, f64, R>,
) -> Result<TypedTensor<f64, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, f64, R>, ) -> Result<TypedTensor<f64, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, f64, R>,
dst: &mut TypedTensorViewMut<'_, f64, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, f64, R>, dst: &mut TypedTensorViewMut<'_, f64, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<i32, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<i32, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, i32, R>,
) -> Result<TypedTensor<i32, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, i32, R>, ) -> Result<TypedTensor<i32, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, i32, R>,
dst: &mut TypedTensorViewMut<'_, i32, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, i32, R>, dst: &mut TypedTensorViewMut<'_, i32, R>, ) -> Result<()>
Source§impl<R> TensorViewCanonicalization<i64, R> for CudaBackendwhere
R: TensorRank,
impl<R> TensorViewCanonicalization<i64, R> for CudaBackendwhere
R: TensorRank,
Source§fn to_contiguous(
&mut self,
view: &TypedTensorView<'_, i64, R>,
) -> Result<TypedTensor<i64, R>>
fn to_contiguous( &mut self, view: &TypedTensorView<'_, i64, R>, ) -> Result<TypedTensor<i64, R>>
Source§fn copy_into(
&mut self,
src: &TypedTensorView<'_, i64, R>,
dst: &mut TypedTensorViewMut<'_, i64, R>,
) -> Result<()>
fn copy_into( &mut self, src: &TypedTensorView<'_, i64, R>, dst: &mut TypedTensorViewMut<'_, i64, R>, ) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for CudaBackend
impl !UnwindSafe for CudaBackend
impl Freeze for CudaBackend
impl Send for CudaBackend
impl Sync for CudaBackend
impl Unpin for CudaBackend
impl UnsafeUnpin for CudaBackend
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<C> CloneExpand for Cwhere
C: Clone,
impl<C> CloneExpand for Cwhere
C: Clone,
fn __expand_clone_method(&self, _scope: &mut Scope) -> C
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FaerParallelismExt for Swhere
S: BackendSession + ?Sized,
impl<S> FaerParallelismExt for Swhere
S: BackendSession + ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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