Struct google_api_proto::google::cloud::visionai::v1::ResourceSpecification
source · pub struct ResourceSpecification {
pub cpu: String,
pub cpu_limits: String,
pub memory: String,
pub memory_limits: String,
pub gpus: i32,
pub latency_budget_ms: i32,
}
Expand description
ResourceSpec collects a set of resources that can be used to specify requests and requirements.
Note: Highly experimental as this can be runtime dependent. Can use the “extras” field to experiment first before trying to abstract it.
Fields§
§cpu: String
CPU specification.
Examples: “100m”, “0.5”, “1”, “2”, … correspond to 0.1, half, 1, or 2 cpus.
Leave empty to let the system decide.
Note that this does not determine the cpu vender/make, or its underlying clock speed and specific SIMD features. It is only the amount time it requires in timeslicing.
cpu_limits: String
CPU limit.
Examples: “100m”, “0.5”, “1”, “2”, … correspond to 0.1, half, 1, or 2 cpus.
Leave empty to indicate no limit.
memory: String
Memory specification (in bytes).
Examples: “128974848”, “129e6”, “129M”, “123Mi”, … correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to let the system decide.
memory_limits: String
Memory usage limits.
Examples: “128974848”, “129e6”, “129M”, “123Mi”, … correspond to 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes.
Leave empty to indicate no limit.
gpus: i32
Number of gpus.
latency_budget_ms: i32
The maximum latency that this operator may use to process an element.
If non positive, then a system default will be used. Operator developers should arrange for the system compute resources to be aligned with this latency budget; e.g. if you want a ML model to produce results within 500ms, then you should make sure you request enough cpu/gpu/memory to achieve that.
Trait Implementations§
source§impl Clone for ResourceSpecification
impl Clone for ResourceSpecification
source§fn clone(&self) -> ResourceSpecification
fn clone(&self) -> ResourceSpecification
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ResourceSpecification
impl Debug for ResourceSpecification
source§impl Default for ResourceSpecification
impl Default for ResourceSpecification
source§impl Message for ResourceSpecification
impl Message for ResourceSpecification
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ResourceSpecification
impl PartialEq for ResourceSpecification
source§fn eq(&self, other: &ResourceSpecification) -> bool
fn eq(&self, other: &ResourceSpecification) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ResourceSpecification
Auto Trait Implementations§
impl Freeze for ResourceSpecification
impl RefUnwindSafe for ResourceSpecification
impl Send for ResourceSpecification
impl Sync for ResourceSpecification
impl Unpin for ResourceSpecification
impl UnwindSafe for ResourceSpecification
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
§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request