How to determine max nvpmodel for the particular platform

I’m writing an install script for some software that will run on Xavier NX as well as Xavier AGX and the Nano. For each of these platforms I want to run the correct nvpmodel command that maximises the GPU performance for running AI programs like yolo.

For the Xavier NX I understand this would be:

nvpmodel -m 4

Whereas for the Nano I understand it is just:

nvpmodel -m 0

as well as jetson_clocks of course.

My question is how can I through commands determine either:

  1. Determine through commands which of the Jetson platforms the script is running on
  2. Determine the best nvpmodel command to maximize GPU performance for yolo like programs

Any help will be appreciated. Currently I’m just going to look at memory size, more than 4GB will be considered that I should use nvpmodel -m 4 but I’m sure that’s an approach that’s going to fail for me one day.


hello kimv9rqv,

please refer to developer guide, for example, there’s Supported Modes and Power Efficiency shows the NVPModel clock configurations for Jetson Xavier NX.
you may have some customization to define a custom power mode, by adding a mode definition to the file, /etc/nvpmodel.conf

Thanks for the response. Actually, I know what commands to run on each of the models for my purpose. Perhaps it’s more how can I be sure of the platform?

I would guess that if it came down to checking of of the three platforms I use, the nano the Xavier NX and the Xavier AGX I can check how many CUDA cores it has and use that. I can’t think of a best way right now to know what board I have.

Kim Hendrikse

hello kimv9rqv,

the quickest way I’ve usually used is checking kernel initial messages about the device tree file names.
for example,
below shows t18x series, which means it’s Jetson TX2.

$ dmesg | grep DTS
[    0.164233] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t18x/quill/kernel-dts/tegra186-quill-p3310-1000-c03-00-base.dts

since Jetson Xavier and Jetson Xavier NX were all based-on t19x series.
you may also check the later carrier board information from the device tree naming.
here’s flashing configuration file, jetson-xavier.conf
it’ll include the configuration for T194 Silicon,

# p2822-0000+p2888-0004.conf: configuration for T194 Silicon

source "${LDK_DIR}/p2972-0000.conf.common";

for example, below device tree indicate this is a Jetson Xavier platform.

$ dmesg | grep DTS
[    0.446914] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t19x/galen/kernel-dts/common/tegra194-p2888-0001-p2822-0000-common.dtsi

Ah ok. Thanks for that. I tested this on a Xavier NX and a nano. On the nano it didn’t work because it’s been up long enough so that the in memory buffer for dmesg has passed that point.

However, it got me thinking based on the device tree and the following command can provide me with what I need.

On the nano:

$ cat /proc/device-tree/model | tr ‘\0’ ‘\n’
NVIDIA Jetson Nano Developer Kit

On the Xavier AGX:

$ cat /proc/device-tree/model | tr ‘\0’ ‘\n’ ; echo ‘’

On the NX:

$ cat /proc/device-tree/model | tr ‘\0’ ‘\n’ ; echo ‘’
NVIDIA Jetson Xavier NX Developer Kit

This came out of /etc/systemd/

(Forget the echos on the last two. Typo)