/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

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.

See Also:

AWS * API Reference

*/ class TargetPlatform { public: AWS_SAGEMAKER_API TargetPlatform(); AWS_SAGEMAKER_API TargetPlatform(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API TargetPlatform& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline const TargetPlatformOs& GetOs() const{ return m_os; } /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline bool OsHasBeenSet() const { return m_osHasBeenSet; } /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline void SetOs(const TargetPlatformOs& value) { m_osHasBeenSet = true; m_os = value; } /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline void SetOs(TargetPlatformOs&& value) { m_osHasBeenSet = true; m_os = std::move(value); } /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline TargetPlatform& WithOs(const TargetPlatformOs& value) { SetOs(value); return *this;} /** *

Specifies a target platform OS.

  • LINUX: * Linux-based operating systems.

  • ANDROID: Android * operating systems. Android API level can be specified using the * ANDROID_PLATFORM compiler option. For example, * "CompilerOptions": {'ANDROID_PLATFORM': 28}

*/ inline TargetPlatform& WithOs(TargetPlatformOs&& value) { SetOs(std::move(value)); return *this;} /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline const TargetPlatformArch& GetArch() const{ return m_arch; } /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline bool ArchHasBeenSet() const { return m_archHasBeenSet; } /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline void SetArch(const TargetPlatformArch& value) { m_archHasBeenSet = true; m_arch = value; } /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline void SetArch(TargetPlatformArch&& value) { m_archHasBeenSet = true; m_arch = std::move(value); } /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline TargetPlatform& WithArch(const TargetPlatformArch& value) { SetArch(value); return *this;} /** *

Specifies a target platform architecture.

  • * X86_64: 64-bit version of the x86 instruction set.

  • *

    X86: 32-bit version of the x86 instruction set.

  • *

    ARM64: ARMv8 64-bit CPU.

  • * ARM_EABIHF: ARMv7 32-bit, Hard Float.

  • * ARM_EABI: ARMv7 32-bit, Soft Float. Used by Android 32-bit ARM * platform.

*/ inline TargetPlatform& WithArch(TargetPlatformArch&& value) { SetArch(std::move(value)); return *this;} /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline const TargetPlatformAccelerator& GetAccelerator() const{ return m_accelerator; } /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline bool AcceleratorHasBeenSet() const { return m_acceleratorHasBeenSet; } /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline void SetAccelerator(const TargetPlatformAccelerator& value) { m_acceleratorHasBeenSet = true; m_accelerator = value; } /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline void SetAccelerator(TargetPlatformAccelerator&& value) { m_acceleratorHasBeenSet = true; m_accelerator = std::move(value); } /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline TargetPlatform& WithAccelerator(const TargetPlatformAccelerator& value) { SetAccelerator(value); return *this;} /** *

Specifies a target platform accelerator (optional).

  • * NVIDIA: Nvidia graphics processing unit. It also requires * gpu-code, trt-ver, cuda-ver compiler * options

  • MALI: ARM Mali graphics processor

    *
  • INTEL_GRAPHICS: Integrated Intel graphics

  • *
*/ inline TargetPlatform& WithAccelerator(TargetPlatformAccelerator&& value) { SetAccelerator(std::move(value)); return *this;} private: TargetPlatformOs m_os; bool m_osHasBeenSet = false; TargetPlatformArch m_arch; bool m_archHasBeenSet = false; TargetPlatformAccelerator m_accelerator; bool m_acceleratorHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws