Skip to main content

CpuOption

Enum CpuOption 

Source
#[non_exhaustive]
#[repr(i32)]
pub enum CpuOption {
Show 32 variants Threads = 0, LightMode = 1, Winograd = 2, Sgemm = 3, Int8Inference = 4, Packing = 5, Fp16Packed = 6, Fp16Storage = 7, Fp16Arithmetic = 8, Bf16Storage = 9, LocalPool = 10, OpenmpBlocktime = 11, FlushDenormals = 12, Winograd23 = 13, Winograd43 = 14, Winograd63 = 15, MappedModelLoading = 16, KvCacheSequenceHint = 17, SubgroupOps = 18, Int8Packed = 19, Int8Storage = 20, Int8Arithmetic = 21, Bf16Packed = 22, TensorStorage = 23, WeightsInHostMemory = 24, ShaderLocalMemory = 25, CooperativeMatrix = 26, A53A55OptimizedKernel = 27, Fp16Uniform = 28, Int8Uniform = 29, Int16Packed = 30, Int16Storage = 31,
}
Expand description

Identifies one native integer option.

Each variant maps to one field of the native option block; Options::set documents the accepted range per variant.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Threads = 0

Native worker count.

§

LightMode = 1

Releases cached intermediate blobs after use.

§

Winograd = 2

Enables Winograd convolution.

§

Sgemm = 3

Enables single-precision matrix multiplication.

§

Int8Inference = 4

Enables INT8 inference paths.

§

Packing = 5

Enables packed element layouts.

§

Fp16Packed = 6

Enables packed FP16 storage.

§

Fp16Storage = 7

Stores activations as FP16.

§

Fp16Arithmetic = 8

Uses FP16 arithmetic where available.

§

Bf16Storage = 9

Stores activations as BF16.

§

LocalPool = 10

Uses the per-network blob pool.

§

OpenmpBlocktime = 11

Sets the OpenMP spin block time.

§

FlushDenormals = 12

Flushes denormal results to zero.

§

Winograd23 = 13

Enables 3x3 Winograd kernels.

§

Winograd43 = 14

Enables 5x5 Winograd kernels.

§

Winograd63 = 15

Enables 7x7 Winograd kernels.

§

MappedModelLoading = 16

Maps model files instead of copying them.

§

KvCacheSequenceHint = 17

Hints the sequence length of an LLM KV cache.

§

SubgroupOps = 18

Allows Vulkan subgroup operations.

§

Int8Packed = 19

Enables packed INT8 storage.

§

Int8Storage = 20

Stores activations as INT8.

§

Int8Arithmetic = 21

Uses INT8 arithmetic where available.

§

Bf16Packed = 22

Enables packed BF16 storage.

§

TensorStorage = 23

Uses tensor storage for Vulkan buffers.

§

WeightsInHostMemory = 24

Keeps Vulkan weights in host memory.

§

ShaderLocalMemory = 25

Prefers shader local memory.

§

CooperativeMatrix = 26

Allows cooperative matrix instructions.

§

A53A55OptimizedKernel = 27

Selects kernels tuned for Cortex-A53 and A55.

§

Fp16Uniform = 28

Uses FP16 uniform buffers.

§

Int8Uniform = 29

Uses INT8 uniform buffers.

§

Int16Packed = 30

Enables packed INT16 storage.

§

Int16Storage = 31

Stores activations as INT16.

Trait Implementations§

Source§

impl Clone for CpuOption

Source§

fn clone(&self) -> Self

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 Copy for CpuOption

Source§

impl Debug for CpuOption

Source§

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

Formats the value using the given formatter. 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> 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
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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.