setupCodegenContext - Select the target hardware to build code for from multiple live connection
objects - MATLAB ([original](https://in.mathworks.com/help/coder/nvidia/ref/setupcodegencontext.html)) ([raw](?raw))
Main Content
Select the target hardware to build code for from multiple live connection objects
Syntax
Description
setupCodegenContext([hwObj](#mw%5F7963389e-ae38-4226-8285-d869acfdd2bc%5Fsep%5Fmw%5Fbcc65819-faa5-4997-9bca-35a8da7d894a))
selects the NVIDIA® target hardware to generate code for. When there are multiple live connection objects for different targets, the code generator performs remote build on the target for which a recent live object was created. To choose a hardware board for performing remote build, use the setupCodegenContext()
method of the respective live hardware object. If only one live connection object was created, you need not call this method.
Examples
This example shows how to use thesetupCodegenContext()
method and select the NVIDIA Jetson™ board for code generation when the MATLAB® session has multiple live connection objects.
Create a connection, hwJetson
, from the MATLAB software to NVIDIA Jetson hardware.
Checking for CUDA availability on the Target... Checking for 'nvcc' in the target system path... Checking for cuDNN library availability on the Target... Checking for TensorRT library availability on the Target... Checking for prerequisite libraries is complete. Gathering hardware details... Checking for third-party library availability on the Target... Gathering hardware details is complete. Board name : NVIDIA Jetson TX2 CUDA Version : 10.0 cuDNN Version : 7.5 TensorRT Version : 5.1 GStreamer Version : 1.14.5 V4L2 Version : 1.14.2-1 SDL Version : 1.2 Available Webcams : Microsoft® LifeCam Cinema(TM) Available GPUs : NVIDIA Tegra X2
hwJetson =
jetson with properties:
DeviceAddress: 'jetson-board-name'
Port: 22
BoardName: 'NVIDIA Jetson TX2'
CUDAVersion: '10.0'
cuDNNVersion: '7.5'
TensorRTVersion: '5.1'
SDLVersion: '1.2'
V4L2Version: '1.14.2-1'
GStreamerVersion: '1.14.5'
GPUInfo: [1×1 struct]
WebcamList: {'Microsoft® LifeCam Cinema(TM)'}
Create a connection, hwDRIVE
, from the MATLAB software to NVIDIA DRIVE® hardware.
hwDrive = drive('drive-board-name','nvidia','nvidia');
Checking for CUDA availability on the Target... Checking for 'nvcc' in the target system path... Checking for cuDNN library availability on the Target... Checking for TensorRT library availability on the Target... Checking for prerequisite libraries is complete. Gathering hardware details... Checking for third-party library availability on the Target... Gathering hardware details is complete. Board name : NVIDIA Drive CUDA Version : 9.2 cuDNN Version : 7.1 TensorRT Version : 4.0 GStreamer Version : 1.8.2 V4L2 Version : 1.10.0-1 SDL Version : 1.2 Available Webcams : Microsoft® LifeCam Cinema(TM) Available GPUs : DRIVE PX 2 AutoChauffeur,NVIDIA Tegra X2
hwDrive =
jetson with properties:
DeviceAddress: 'drive-board-name'
Port: 22
BoardName: 'NVIDIA Drive'
CUDAVersion: '9.2'
cuDNNVersion: '7.1'
TensorRTVersion: '4.0'
SDLVersion: '1.2'
V4L2Version: '1.10.0-1'
GStreamerVersion: '1.8.2'
GPUInfo: [1×2 struct]
WebcamList: {'Microsoft® LifeCam Cinema(TM)'}
To choose a hardware board for performing remote build, use thesetupCodegenContext()
method of the respective live hardware object.
setupCodegenContext(hwJetson);
The code generator now performs code generation for the Jetson hardware target.
Version History
Introduced in R2018b
See Also
Functions
- jetson | drive | openShell | system | getPdkorSdkVersion | getL4TVersion | updatePeripheralInfo | getLinuxVersion