pub trait DeviceService: Send + 'static {
// Required methods
fn init(device_id: DeviceId) -> Self;
fn utilities(&self) -> Arc<dyn Any + Sync + Send> ⓘ;
// Provided method
fn stage() -> DeviceServiceStage { ... }
}Expand description
Represent a service that runs on a device.
Required Methods§
Provided Methods§
Sourcefn stage() -> DeviceServiceStage
fn stage() -> DeviceServiceStage
Which pipeline stage this service runs on.
Services on DeviceServiceStage::Upstream produce work ahead of time (e.g. autodiff graph
construction, kernel fusion) that is consumed by DeviceServiceStage::Downstream services,
which stream kernels to the device.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".