pub struct DeviceConfig {
pub device_id: u32,
pub mock_mode: bool,
pub pending_queue_capacity: usize,
pub enabled_libraries: EnabledLibraries,
}Expand description
Public configuration for a DeviceActor.
Fields§
§device_id: u32§mock_mode: boolWhen true, the ContextActor skips real cudarc calls and just
drives the supervision plumbing. Used by examples/echo_no_gpu
and unit tests on hosts without a GPU.
pending_queue_capacity: usizeInternal queue cap for work received before the context is ready (or while it is being rebuilt). Bounds the §5.4 backpressure surface.
enabled_libraries: EnabledLibrariesWhich library actors ContextActor should spawn under this
device. Defaults to BLAS only (F1 behaviour). Compile-time
feature = "..." gates still apply.
Implementations§
Source§impl DeviceConfig
impl DeviceConfig
pub fn new(device_id: u32) -> Self
pub fn mock(device_id: u32) -> Self
Sourcepub fn with_libraries(self, libs: EnabledLibraries) -> Self
pub fn with_libraries(self, libs: EnabledLibraries) -> Self
Builder: select which libraries’ kernel actors to spawn.
Trait Implementations§
Source§impl Clone for DeviceConfig
impl Clone for DeviceConfig
Source§fn clone(&self) -> DeviceConfig
fn clone(&self) -> DeviceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DeviceConfig
impl RefUnwindSafe for DeviceConfig
impl Send for DeviceConfig
impl Sync for DeviceConfig
impl Unpin for DeviceConfig
impl UnsafeUnpin for DeviceConfig
impl UnwindSafe for DeviceConfig
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