pub struct PlanPreference { /* private fields */ }Implementations§
Source§impl PlanPreference
impl PlanPreference
pub fn create_default(ctx: &Context) -> Result<Self>
Sourcepub fn create(
ctx: &Context,
algorithm: Algorithm,
jit_mode: JitMode,
) -> Result<Self>
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.
pub fn set_autotune_mode(&mut self, mode: AutotuneMode) -> Result<()>
pub fn set_cache_mode(&mut self, mode: CacheMode) -> Result<()>
pub fn set_incremental_count(&mut self, count: i32) -> Result<()>
pub fn set_algorithm(&mut self, algorithm: Algorithm) -> Result<()>
pub fn set_kernel_rank(&mut self, rank: i32) -> Result<()>
pub fn set_jit_mode(&mut self, mode: JitMode) -> Result<()>
pub fn autotune_mode(&self) -> Result<AutotuneMode>
pub fn cache_mode(&self) -> Result<CacheMode>
pub fn incremental_count(&self) -> Result<i32>
pub fn algorithm(&self) -> Result<Algorithm>
pub fn kernel_rank(&self) -> Result<i32>
pub fn jit_mode(&self) -> Result<JitMode>
pub fn gpu_arch(&self) -> Result<u32>
Sourcepub fn set_gpu_arch(&mut self, gpu_arch: u32) -> Result<()>
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.
pub const fn as_raw(&self) -> cutensorPlanPreference_t
Trait Implementations§
Source§impl Debug for PlanPreference
impl Debug for PlanPreference
Source§impl Drop for PlanPreference
impl Drop for PlanPreference
Auto Trait Implementations§
impl Freeze for PlanPreference
impl RefUnwindSafe for PlanPreference
impl !Send for PlanPreference
impl !Sync for PlanPreference
impl Unpin for PlanPreference
impl UnsafeUnpin for PlanPreference
impl UnwindSafe for PlanPreference
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