You can use the command line tool nvpmodel to set the performance and energy usage characteristics of the NVIDIA Jetson AGX Developer Kit. Looky here:
Background
With the introduction of the Jetson TX2, the command line tool nvpmodel brought the ability to define a set of parameters to effectively define the performance for a given power envelope.
Jetson Tegra systems cover a wide range of performance and power requirements. Balancing the performance and power requirements is an important part of most product development cycles. Fortunately, NVIDIA has done the heavy lifting and done the calculations to figure out which processing components provide the best performance for a given energy budget in multiple configurations. At the very least, these configurations provide a great start to developing your own tuned configuration.
On the TX2, nvpmodel defines the number of CPUs on line and their clock frequencies, the GPU frequency, and the External Memory Controller (EMC) frequency. Remember that the EMC controls the speed of access to the external LPDDR4 memory.
The Jetson AGX Xavier is a much richer computing environment than the Jetson TX2. In addition to adding 4 more CPU cores, the Xavier adds Deep Learning Accelerators (DLA) and Visual Accelerators (VA). These new additions can also be configured with nvpmodel! nvpmodel defines 4 different power envelopes in 7 different modes. The power envelopes are 10 Watt, 15 Watt, 30 Watt, and “Forget power usage, speed is what I need!”.
Configuration
nvpmodel introduces seven different “modes” on the Jetson AGX Xavier. The following table breaks down the modes which describe which CPU, GPU, DLA and VA cores to use along with their clock frequency, and the memory controller frequency.
NVPMODEL CLOCK CONFIGURATION
Mode Name | EDP | 10W | 15W | 30W | 30W | 30W | 30W |
---|---|---|---|---|---|---|---|
MAXN | MODE_10W | MODE_15W | MODE_30W_ALL | MODE_30W_6CORE | MODE_30W_4CORE | MODE_30W_2CORE | |
Power Budget | n/a | 10W | 15W | 30W | 30W | 30W | 30W |
Mode ID | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
Number of Online CPUs | 8 | 2 | 4 | 8 | 6 | 4 | 2 |
CPU Maximal Frequency (MHz) |
2265.6 | 1200 | 1200 | 1200 | 1450 | 1780 | 2100 |
GPU TPC | 4 | 2 | 4 | 4 | 4 | 4 | 4 |
CPU Maximal Frequency (MHz) |
1377 | 520 | 670 | 900 | 900 | 900 | 900 |
DLA Cores | 2 | 2 | 2 | 2 | 2 | 2 | 2 |
DLA Maximal Frequency (MHz) |
1395.2 | 550 | 750 | 1050 | 1050 | 1050 | 1050 |
Vision Accelerator (VA) cores | 2 | 0 | 1 | 1 | 1 | 1 | 1 |
VA Maximal Frequency (MHz) |
1088 | 0 | 550 | 760 | 760 | 760 | 760 |
Memory Maximal Frequency (MHz) |
2133 | 1066 | 1333 | 1600 | 1600 | 1600 | 1600 |
The default mode is 15W (MODE_15W, ID:2)
Table Abbreviation Notes:
- GPU TPC – GPU Texture/Processor Cluster
- DLA – Deep Learning Accelerator
- VA – Vision Accelerator
Usage
To call nvpmodel:
$ sudo nvpmodel -m [mode]
where mode is the number of the mode that you want to use. For example:
$ sudo nvpmodel -m 0
places the Jetson into MAXN mode.
You can query which mode is currently being used:
$ sudo nvpmodel -q --verbose
The file /etc/nvpmodel.conf holds the different models. Developers can add their own models to add different modes suitable to their application.
Note: nvpmodel settings are persistent across sessions. That is, if the Xavier reboots, the nvpmodel settings remain in effect.
jetson_clocks.sh
If you have been developing on previous Jetson models, you probably are familiar with the script jetson_clocks.sh. On the Jetson Xavier, jetson_clocks.sh provides the best performance for the current nvpmodel mode. The nvpmodel configuration defines maximum and minimum clock values for any given mode, jetson_clocks.sh adjusts the clock value to the maximum value. Oh, and sometimes adjusts the fan value when you decide to run flat out.
jetson_clocks.sh can also show the current settings for the CPU, GPU and EMC. This includes which cores are online, the minimum and maximum frequencies, and the current frequency.
$ sudo ${HOME}/jetson_clocks.sh –show
Note: If you are in the home directory, of course you can just use:
$ sudo ./jetson_clocks.sh –show
You can store the current clock settings for later use into a file using the store option. The restore option uses the file to set the clocks to the saved value.
To maximize the current mode performance for the Xavier:
$ sudo ${HOME}/jetson_clocks.sh –show
Note: The effects of jetson_clocks.sh is not persistent across sessions. In other words, if the machine reboots the previous jetson_clocks.sh settings are not in place.
Maximum Performance
To configure the Jetson Xavier and set the clocks for maximum performance:
$ sudo nvpmodel -m 0
$ sudo ${HOME}/jetson_clocks.sh
Conclusion
Using nvpmodel provides developers with a nice tool set to easily setup different energy usage and performance scenarios. Recommended.
Notes
Note: The mode names in the nvpmodel configuration file:
- MAXN
- MODE_10W
- MODE_15W
- MODE_30W_ALL
- MODE_30W_6CORE
- MODE_30W_4CORE
- MODE_30W_2CORE
The table derives from a NVIDIA webinar given by Dustin Franklin. The notes for the webinar are available on Github.
The post NVPModel – NVIDIA Jetson AGX Xavier Developer Kit appeared first on JetsonHacks.