NVPModel – NVIDIA Jetson TX2 Development Kit

The introduction of the Jetson TX2 Development Kit brings with it the introduction of the new command line interface nvpmodel tool.

Background

Applications for the Jetson Tegra systems cover a wide range of performance and power requirements. As the Jetson family has become more sophisticated over the years, power and performance management is becoming an increasingly important issue.
v
Fortunately, NVIDIA is providing a new command line tool which takes out a lot of the guess work in configuring the CPU and GPU settings to maximize performance and energy usage under different scenarios.

There are natural performance/energy points which provide the best performance for the minimal amount of energy. NVIDIA has done the heavy lifting and done the calculations to figure out which of the core and clock frequencies provide the best performance for the energy budget.

Remember that the Jetson TX2 consists of a GPU along with a CPU cluster. The CPU cluster consists of a dual-core Denver 2 processor and a quad-core ARM Cortex-A57, connected by a high-performance coherent interconnect fabric. With 6 CPU cores and a GPU, you can understand how the average developer benefits by not having to run all the performance/energy tests themselves.

On the Jetson Tegra, CPUs may be online or offline (except CPU0, which is always on for obvious reasons). CPUs have minimum frequencies and maximum frequencies.

Usage

Nvpmodel introduces five different “modes”. On the Jetson TX2. The following table breaks down the modes, which CPU cores are used, and the maximum frequency of the CPU and GPU being used.

nvpmodel mode definition

Mode Mode Name Denver 2 Frequency ARM A57 Frequency GPU Frequency
0 Max-N 2 2.0 GHz 4 2.0 GHz 1.30 Ghz
1 Max-Q 0 4 1.2 Ghz 0.85 Ghz
2 Max-P Core-All 2 1.4 GHz 4 1.4 GHz 1.12 Ghz
3 Max-P ARM 0 4 2.0 GHz 1.12 Ghz
4 Max-P Denver 2 2.0 GHz 0 1.12 Ghz

Max-Q mode provides equivalent performance to a Jetson TX1 at full clock modes, while Max-N provides almost twice the performance. This is due to a variety of factors, not just clock speeds. For example, the Jetson TX2 has a 128-bit wide memory bus versus the 64-bit wide TX1.

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 1

places the Jetson into Max-Q 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.

Conclusion

Using nvpmodel provides developers with a nice tool set to easily setup different energy usage and performance scenarios. Recommended.

12 Comments

  1. “sudo nvpmodel -q –verbose” should be “sudo nvpmodel -q –-verbose”

    Thank you very much for this helpful article.

  2. How does the nvpmodel relate to the jetson_clocks.sh? It looks like you can use nvpmodel to enable all cores and then jetson_clocks.sh to set them all to max freq?
    Aside from power consumption is there a reason why it would be a bad idea to have a mode that enables all cpus and sets the min_freq of all cores to the max_freq value like jetson_clocks.sh does?

    • My understanding is that nvpmodel is suited towards the power/performance curve of each combination of cores. This is for the case where cranking the clocks to the max frequency has a detrimental effect with regards to power usage while not providing much more performance.

      Running with jetson_clocks.sh should have a minimal detrimental effect on the life of the processor. The idea behind nvpmodel is to maximize the performance/power curve at both the high end and the low end of power consumption. Thanks for reading!

  3. I’m running R28.2-DP on my TX2, and nvpmodel -m4 leads to CPU0 and CPU1 to be online and displayed by /proc/cpuinfo, while the table here says only Denver cores (CPU1 and CPU2).
    Am I missing something ?
    Thanks

    • I do not think you are missing anything. I believe that the table above lists what it is supposed to be, with maybe the exception that CPU0 is always online. There are plausible explanations:

      This could be for several reasons:

      • CPU0 is Denver in Mode 4 but is reported incorrectly.
      • CPU0, CPU1, and CPU2 are all on, but /proc/cpuinfo does not reflect it accurately
      • nvpmodel does not set the 2 Denver cores up correctly

      The only way to know is to ask NVIDIA for a clarification. The documentation for this tool is rather sparse. Thanks for reading!

      • Looking at /etc/nvpmodel.conf, indeed CPU0 is never shutdown, and MAXP_CORE_DENVER mode only sets CPU1:

        CPU_ONLINE CORE_1 1
        CPU_ONLINE CORE_2 0
        CPU_ONLINE CORE_3 0
        CPU_ONLINE CORE_4 0
        CPU_ONLINE CORE_5 0

        • CPU0 handles all the hardware interrupts, so I would not be surprised if it is hardwired and expected to always be “online” with special handling for wakeup on interrupt. I’m not quite sure about what to think about the 2 Denver cores, or where lies the discrepancy.

1 Trackback / Pingback

  1. Convenient Power Measurements on the Jetson TX2/Tegra X2 Board | Notes on Running DNNs on Embedded Platforms

Leave a Reply

Your email address will not be published.


*