#[non_exhaustive]pub struct AcceleratorConfig {
pub accelerator_count: i64,
pub accelerator_type: String,
pub gpu_partition_size: String,
pub gpu_sharing_config: Option<GPUSharingConfig>,
pub gpu_driver_installation_config: Option<GPUDriverInstallationConfig>,
}Expand description
AcceleratorConfig represents a Hardware Accelerator request.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.accelerator_count: i64The number of the accelerator cards exposed to an instance.
accelerator_type: StringThe accelerator type resource name. List of supported accelerators here
gpu_partition_size: StringSize of partitions to create on the GPU. Valid values are described in the NVIDIA mig user guide.
gpu_sharing_config: Option<GPUSharingConfig>The configuration for GPU sharing options.
gpu_driver_installation_config: Option<GPUDriverInstallationConfig>The configuration for auto installation of GPU driver.
Implementations§
Source§impl AcceleratorConfig
impl AcceleratorConfig
Sourcepub fn set_accelerator_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_accelerator_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of accelerator_count.
Sourcepub fn set_accelerator_type<T: Into<String>>(self, v: T) -> Self
pub fn set_accelerator_type<T: Into<String>>(self, v: T) -> Self
Sets the value of accelerator_type.
Sourcepub fn set_gpu_partition_size<T: Into<String>>(self, v: T) -> Self
pub fn set_gpu_partition_size<T: Into<String>>(self, v: T) -> Self
Sets the value of gpu_partition_size.
Sourcepub fn set_gpu_sharing_config<T: Into<Option<GPUSharingConfig>>>(
self,
v: T,
) -> Self
pub fn set_gpu_sharing_config<T: Into<Option<GPUSharingConfig>>>( self, v: T, ) -> Self
Sets the value of gpu_sharing_config.
Sourcepub fn set_gpu_driver_installation_config<T: Into<Option<GPUDriverInstallationConfig>>>(
self,
v: T,
) -> Self
pub fn set_gpu_driver_installation_config<T: Into<Option<GPUDriverInstallationConfig>>>( self, v: T, ) -> Self
Sets the value of gpu_driver_installation_config.
Trait Implementations§
Source§impl Clone for AcceleratorConfig
impl Clone for AcceleratorConfig
Source§fn clone(&self) -> AcceleratorConfig
fn clone(&self) -> AcceleratorConfig
Returns a copy 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 AcceleratorConfig
impl Debug for AcceleratorConfig
Source§impl Default for AcceleratorConfig
impl Default for AcceleratorConfig
Source§fn default() -> AcceleratorConfig
fn default() -> AcceleratorConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AcceleratorConfigwhere
AcceleratorConfig: Default,
impl<'de> Deserialize<'de> for AcceleratorConfigwhere
AcceleratorConfig: Default,
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
Source§impl Message for AcceleratorConfig
impl Message for AcceleratorConfig
Source§impl PartialEq for AcceleratorConfig
impl PartialEq for AcceleratorConfig
Source§impl Serialize for AcceleratorConfig
impl Serialize for AcceleratorConfig
impl StructuralPartialEq for AcceleratorConfig
Auto Trait Implementations§
impl Freeze for AcceleratorConfig
impl RefUnwindSafe for AcceleratorConfig
impl Send for AcceleratorConfig
impl Sync for AcceleratorConfig
impl Unpin for AcceleratorConfig
impl UnwindSafe for AcceleratorConfig
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