targetPlatform property
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": "ARM_EABIHF"},"CompilerOptions": {'mattr':'+neon'} -
Jetson TX2
"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "NVIDIA"},"CompilerOptions": {'gpu-code': 'sm_62', 'trt-ver': '6.0.1', 'cuda-ver': '10.0'} -
EC2 m5.2xlarge instance OS
"TargetPlatform": {"Os": "LINUX", "Arch": "X86_64", "Accelerator": "NVIDIA"},"CompilerOptions": {'mcpu': 'skylake-avx512'} -
RK3399
"TargetPlatform": {"Os": "LINUX", "Arch": "ARM64", "Accelerator": "MALI"} -
ARMv7 phone (CPU)
"TargetPlatform": {"Os": "ANDROID", "Arch": "ARM_EABI"},"CompilerOptions": {'ANDROID_PLATFORM': 25, 'mattr':'+neon'} -
ARMv8 phone (CPU)
"TargetPlatform": {"Os": "ANDROID", "Arch": "ARM64"},"CompilerOptions": {'ANDROID_PLATFORM': 29}
Implementation
final TargetPlatform? targetPlatform;