pub enum Accelerator {
Cpu,
Gpu,
}Expand description
Downloads and installs the ONNX Runtime shared library.
@param root - the install root
@param version - the ONNX Runtime version
@param gpu - whether to take the build carrying the CUDA execution provider
@param force - install again even when it is already there
Which build of the runtime setup-embeddings installs.
An enum rather than a bool beside another bool (task-1962, A9).
install_runtime took gpu and force adjacent and positional, and the
call site read install_runtime(&root, &version, gpu, force) - two words
that say which is which only because they happen to be named after the
parameters.
Variants§
Cpu
The CPU build, which every machine can run.
Gpu
The GPU build, which needs a supported card and its driver.
Trait Implementations§
Source§impl Clone for Accelerator
impl Clone for Accelerator
impl Copy for Accelerator
Source§impl Debug for Accelerator
impl Debug for Accelerator
impl Eq for Accelerator
Source§impl PartialEq for Accelerator
impl PartialEq for Accelerator
impl StructuralPartialEq for Accelerator
Auto Trait Implementations§
impl Freeze for Accelerator
impl RefUnwindSafe for Accelerator
impl Send for Accelerator
impl Sync for Accelerator
impl Unpin for Accelerator
impl UnsafeUnpin for Accelerator
impl UnwindSafe for Accelerator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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