Skip to main content

BackendDescriptor

Struct BackendDescriptor 

Source
pub struct BackendDescriptor { /* private fields */ }
Expand description

RAII wrapper around a cudnnBackendDescriptor_t that destroys the descriptor on drop.

Implementations§

Source§

impl BackendDescriptor

Source

pub fn create(kind: cudnnBackendDescriptorType_t) -> Result<Self, GpuError>

cudnnBackendCreateDescriptor.

Source

pub fn as_raw(&self) -> cudnnBackendDescriptor_t

Raw handle (only valid until Drop).

Source

pub fn finalize(&mut self) -> Result<(), GpuError>

cudnnBackendFinalize.

Source

pub fn is_finalized(&self) -> bool

True iff finalize() has succeeded.

Source

pub unsafe fn set_attribute_raw( &mut self, name: cudnnBackendAttributeName_t, attr_type: cudnnBackendAttributeType_t, count: i64, data: *const c_void, ) -> Result<(), GpuError>

Generic cudnnBackendSetAttribute — caller supplies the element type and a *const c_void pointer to a contiguous array of count elements.

§Safety

data must point to count valid elements of the type expected by attr_type. The descriptor must outlive the call.

Source

pub fn set_i64( &mut self, name: cudnnBackendAttributeName_t, value: i64, ) -> Result<(), GpuError>

Set a single i64 attribute.

Source

pub fn set_i64_array( &mut self, name: cudnnBackendAttributeName_t, values: &[i64], ) -> Result<(), GpuError>

Set an array of i64 attributes.

Source

pub fn set_f32( &mut self, name: cudnnBackendAttributeName_t, value: f32, ) -> Result<(), GpuError>

Set a single f32 attribute (e.g. an alpha scaling parameter).

Source

pub fn set_f64( &mut self, name: cudnnBackendAttributeName_t, value: f64, ) -> Result<(), GpuError>

Set a single f64 attribute.

Source

pub fn set_dev_ptr( &mut self, name: cudnnBackendAttributeName_t, ptr: *mut c_void, ) -> Result<(), GpuError>

Set a single device-pointer attribute.

Source

pub fn set_descriptor( &mut self, name: cudnnBackendAttributeName_t, sub: &BackendDescriptor, ) -> Result<(), GpuError>

Set a single sub-descriptor reference.

Source

pub fn set_descriptors( &mut self, name: cudnnBackendAttributeName_t, subs: &[&BackendDescriptor], ) -> Result<(), GpuError>

Set an array of sub-descriptor references.

Source

pub fn set_data_type( &mut self, name: cudnnBackendAttributeName_t, dt: cudnnDataType_t, ) -> Result<(), GpuError>

Set a cudnnDataType_t attribute.

Trait Implementations§

Source§

impl Debug for BackendDescriptor

Source§

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

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

impl Drop for BackendDescriptor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for BackendDescriptor

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

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> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more