pub struct AllocationRequest {
pub workload_type: WorkloadType,
pub priority: Priority,
pub memory_required: u64,
pub min_quality: Option<f32>,
pub wait_for_resources: bool,
pub timeout_ms: Option<u64>,
pub metadata: Option<String>,
}Expand description
A request for GPU allocation.
Fields§
§workload_type: WorkloadTypeType of workload.
priority: PriorityPriority level.
memory_required: u64Memory required in bytes.
min_quality: Option<f32>Minimum acceptable quality.
wait_for_resources: boolWhether to wait for resources or fail immediately.
timeout_ms: Option<u64>Maximum time to wait if waiting.
metadata: Option<String>Metadata for tracking.
Implementations§
Source§impl AllocationRequest
impl AllocationRequest
Sourcepub fn with_priority(self, priority: Priority) -> Self
pub fn with_priority(self, priority: Priority) -> Self
Sets priority.
Sourcepub fn with_min_quality(self, min_quality: f32) -> Self
pub fn with_min_quality(self, min_quality: f32) -> Self
Sets minimum quality.
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Sets timeout.
Sourcepub fn with_metadata(self, metadata: impl Into<String>) -> Self
pub fn with_metadata(self, metadata: impl Into<String>) -> Self
Sets metadata.
Sourcepub fn effective_min_quality(&self) -> f32
pub fn effective_min_quality(&self) -> f32
Returns effective minimum quality.
Trait Implementations§
Source§impl Clone for AllocationRequest
impl Clone for AllocationRequest
Source§fn clone(&self) -> AllocationRequest
fn clone(&self) -> AllocationRequest
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 moreSource§impl Debug for AllocationRequest
impl Debug for AllocationRequest
Source§impl<'de> Deserialize<'de> for AllocationRequest
impl<'de> Deserialize<'de> for AllocationRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AllocationRequest
impl RefUnwindSafe for AllocationRequest
impl Send for AllocationRequest
impl Sync for AllocationRequest
impl Unpin for AllocationRequest
impl UnwindSafe for AllocationRequest
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