pub enum EpSelection {
Cpu,
Cuda,
TensorRt,
}Expand description
ONNX Runtime execution provider selection.
Controlled by BGE_M3_EP. Defaults to EpSelection::Cpu.
On macOS the CoreML EP is always used regardless of this setting.
Variants§
Cpu
CPU inference via MLAS (default). Works everywhere, no GPU required.
Cuda
NVIDIA CUDA execution provider (requires cuda feature and a CUDA ORT build).
Set BGE_M3_EP=cuda to enable. BGE_M3_WORKERS is clamped to
BGE_M3_GPU_COUNT so each worker is pinned to a distinct CUDA device.
Set BGE_M3_GPU_COUNT to match the number of GPUs on the instance for
maximum parallel inference throughput.
TensorRt
NVIDIA TensorRT execution provider (requires tensorrt feature and a TRT ORT build).
Set BGE_M3_EP=tensorrt to enable. Falls back to CUDA for ops TRT cannot
handle. BGE_M3_WORKERS is clamped to BGE_M3_GPU_COUNT; each worker
compiles its own per-GPU TRT shard of the warmup shapes during startup,
enabling parallel engine compilation across GPUs.
Trait Implementations§
Source§impl Clone for EpSelection
impl Clone for EpSelection
Source§fn clone(&self) -> EpSelection
fn clone(&self) -> EpSelection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EpSelection
impl Debug for EpSelection
Source§impl Display for EpSelection
impl Display for EpSelection
Source§impl PartialEq for EpSelection
impl PartialEq for EpSelection
impl Copy for EpSelection
impl Eq for EpSelection
impl StructuralPartialEq for EpSelection
Auto Trait Implementations§
impl Freeze for EpSelection
impl RefUnwindSafe for EpSelection
impl Send for EpSelection
impl Sync for EpSelection
impl Unpin for EpSelection
impl UnsafeUnpin for EpSelection
impl UnwindSafe for EpSelection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more