[−][src]Struct rusoto_sagemaker::OutputConfig
Contains information about the output location for the compiled model and the target device that the model runs on. TargetDevice
and TargetPlatform
are mutually exclusive, so you need to choose one between the two to specify your target device or platform. If you cannot find your device you want to use from the TargetDevice
list, use TargetPlatform
to describe the platform of your edge device and CompilerOptions
if there are specific settings that are required or recommended to use for particular TargetPlatform.
Fields
compiler_options: Option<String>
Specifies additional parameters for compiler options in JSON format. The compiler options are TargetPlatform
specific. It is required for NVIDIA accelerators and highly recommended for CPU compilations. For any other cases, it is optional to specify CompilerOptions.
-
CPU
: Compilation for CPU supports the following compiler options.-
mcpu
: CPU micro-architecture. For example,{'mcpu': 'skylake-avx512'}
-
mattr
: CPU flags. For example,{'mattr': ['+neon', '+vfpv4']}
-
-
ARM
: Details of ARM CPU compilations.-
NEON
: NEON is an implementation of the Advanced SIMD extension used in ARMv7 processors.For example, add
{'mattr': ['+neon']}
to the compiler options if compiling for ARM 32-bit platform with the NEON support.
-
-
NVIDIA
: Compilation for NVIDIA GPU supports the following compiler options.-
gpucode
: Specifies the targeted architecture. -
trt-ver
: Specifies the TensorRT versions in x.y.z. format. -
cuda-ver
: Specifies the CUDA version in x.y format.
For example,
{'gpu-code': 'sm72', 'trt-ver': '6.0.1', 'cuda-ver': '10.1'}
-
-
ANDROID
: Compilation for the Android OS supports the following compiler options:-
ANDROIDPLATFORM
: Specifies the Android API levels. Available levels range from 21 to 29. For example,{'ANDROIDPLATFORM': 28}
. -
mattr
: Add{'mattr': ['+neon']}
to compiler options if compiling for ARM 32-bit platform with NEON support.
-
-
INFERENTIA
: Compilation for target mlinf1 uses compiler options passed in as a JSON string. For example,"CompilerOptions": ""--verbose 1 --num-neuroncores 2 -O2""
.For information about supported compiler options, see Neuron Compiler CLI.
-
CoreML
: Compilation for the CoreML OutputConfig$TargetDevice supports the following compiler options:-
classlabels
: Specifies the classification labels file name inside input tar.gz file. For example,{"classlabels": "imagenetlabels_1000.txt"}
. Labels inside the txt file should be separated by newlines.
-
kms_key_id: Option<String>
The AWS Key Management Service (AWS KMS) key that Amazon SageMaker uses to encrypt data on the storage volume after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account
The KmsKeyId can be any of the following formats:
-
Key ID:
1234abcd-12ab-34cd-56ef-1234567890ab
-
Key ARN:
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
-
Alias name:
alias/ExampleAlias
-
Alias name ARN:
arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias
s3_output_location: String
Identifies the S3 bucket where you want Amazon SageMaker to store the model artifacts. For example, s3://bucket-name/key-name-prefix
.
target_device: Option<String>
Identifies the target device or the machine learning instance that you want to run your model on after the compilation has completed. Alternatively, you can specify OS, architecture, and accelerator using TargetPlatform fields. It can be used instead of TargetPlatform
.
target_platform: Option<TargetPlatform>
Contains information about a target platform that you want your model to run on, such as OS, architecture, and accelerators. It is an alternative of TargetDevice
.
The following examples show how to configure the TargetPlatform
and CompilerOptions
JSON strings for popular target platforms:
-
Raspberry Pi 3 Model B+
"TargetPlatform": {"Os": "LINUX", "Arch": "ARMEABIHF"},
"CompilerOptions": {'mattr': ['+neon']}
-
Jetson TX2
"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "NVIDIA"},
"CompilerOptions": {'gpu-code': 'sm62', 'trt-ver': '6.0.1', 'cuda-ver': '10.0'}
-
EC2 m5.2xlarge instance OS
"TargetPlatform": {"Os": "LINUX", "Arch": "X8664", "Accelerator": "NVIDIA"},
"CompilerOptions": {'mcpu': 'skylake-avx512'}
-
RK3399
"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "MALI"}
-
ARMv7 phone (CPU)
"TargetPlatform": {"Os": "ANDROID", "Arch": "ARMEABI"},
"CompilerOptions": {'ANDROIDPLATFORM': 25, 'mattr': ['+neon']}
-
ARMv8 phone (CPU)
"TargetPlatform": {"Os": "ANDROID", "Arch": "ARM64"},
"CompilerOptions": {'ANDROIDPLATFORM': 29}
Trait Implementations
impl Clone for OutputConfig
[src]
pub fn clone(&self) -> OutputConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OutputConfig
[src]
impl Default for OutputConfig
[src]
pub fn default() -> OutputConfig
[src]
impl<'de> Deserialize<'de> for OutputConfig
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl PartialEq<OutputConfig> for OutputConfig
[src]
pub fn eq(&self, other: &OutputConfig) -> bool
[src]
pub fn ne(&self, other: &OutputConfig) -> bool
[src]
impl Serialize for OutputConfig
[src]
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for OutputConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for OutputConfig
[src]
impl Send for OutputConfig
[src]
impl Sync for OutputConfig
[src]
impl Unpin for OutputConfig
[src]
impl UnwindSafe for OutputConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,