Skip to main content

PlanPreference

Struct PlanPreference 

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

Implementations§

Source§

impl PlanPreference

Source

pub fn create_default(ctx: &Context) -> Result<Self>

Source

pub fn create( ctx: &Context, algorithm: Algorithm, jit_mode: JitMode, ) -> Result<Self>

Creates a plan preference that limits the applicable kernels for a plan or operation.

The preference is tied to ctx and frees its cuTENSOR handle when dropped.

§Errors

Returns an error if the context is not initialized, cuTENSOR rejects the requested algorithm or JIT mode, or cuTENSOR does not return a valid handle.

Source

pub fn set_autotune_mode(&mut self, mode: AutotuneMode) -> Result<()>

Source

pub fn set_cache_mode(&mut self, mode: CacheMode) -> Result<()>

Source

pub fn set_incremental_count(&mut self, count: i32) -> Result<()>

Source

pub fn set_algorithm(&mut self, algorithm: Algorithm) -> Result<()>

Source

pub fn set_kernel_rank(&mut self, rank: i32) -> Result<()>

Source

pub fn set_jit_mode(&mut self, mode: JitMode) -> Result<()>

Source

pub fn autotune_mode(&self) -> Result<AutotuneMode>

Source

pub fn cache_mode(&self) -> Result<CacheMode>

Source

pub fn incremental_count(&self) -> Result<i32>

Source

pub fn algorithm(&self) -> Result<Algorithm>

Source

pub fn kernel_rank(&self) -> Result<i32>

Source

pub fn jit_mode(&self) -> Result<JitMode>

Source

pub fn gpu_arch(&self) -> Result<u32>

Source

pub fn set_gpu_arch(&mut self, gpu_arch: u32) -> Result<()>

Plans for a specific GPU architecture instead of the architecture associated with the context. The value encodes the SM version as 10 * SM.major + SM.minor. Currently only SM versions 80, 90 and 100 are supported.

§Errors

Returns an error if gpu_arch cannot be represented for cuTENSOR or if cuTENSOR rejects the architecture value.

Source

pub const fn as_raw(&self) -> cutensorPlanPreference_t

Trait Implementations§

Source§

impl Debug for PlanPreference

Source§

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

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

impl Drop for PlanPreference

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. 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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.