How to get the GPU uuid on the Jetson boards?

We are able to use the nvmlDeviceGetUUID call on platforms where libnvidia-ml.so is available. But on the Jetson platforms, this library does not exist. Is there an equivalent call that can get us the GPU’s unique id? And which library will it be in?

Hi,

Thanks for your question.
NVMLibrary doesn’t support tegra device.

We are checking if an alternative can fetch UUID on tegra
Will update information to you later.

Thanks.

Not sure about what is the nvml UUID. However, if you are looking for a unique chip ID, in tegra CPUs and GPU are in the same chip. You may access the chip uuid reading this thread: https://devtalk.nvidia.com/default/topic/996988/?comment=5100481.

Hi,

There is no API for UUID on tegra since NVMLibaray is not supported.
As mentioned by Honey, you can use chip ID as alternative since there is only one GPU on board.

Please refer to this topic for more details: (same as Honey mentioned)
https://devtalk.nvidia.com/default/topic/996988/jetson-tk1/chip-uid/post/5100481/#5100481

Thanks.

Thanks. But I am unable to locate that file (or any similar file) on my PX2 (which also runs a Tegra gpu). Can you pls help?

We currently support multiple Tegra-based boards - TX1, PX2 and TK1. Hopefully, the call is portable across these boards.

Hi,

We will discuss with Drive platform team to check if there is shared API for unique ID.
Thanks.

Hi,

Thanks for your patience.

As mentioned before, there is no UVM information on tegra. The only available UUID is SOC ID.
Since GPU and CPU are in the same die, it should be sufficient for your requirement.

For L4T, SOC UUID can access via:
1.
$TOP/kernel/drivers/misc/tegra-fuse/tegra210_fuse_offsets.h
unsigned long long tegra_chip_uid(void) {…}

boot into forced-recovery

sudo ./tegrarcm --chip 0x21 --uid
BR_CID: 0x32101001641057492400000002008500

Please try if you can get SOC id via above approaches.
If not, please share which OS do you use on PX2.

Thanks.

Hi,

I have download the kernel source code, but I don’t know how to use it. When I include the header in my code, there are some errors that cannot find some other kernel headers. Do I need to compile the full kernel to use this function? Besides, I only need this single function in my project, is it possible to compile this function to a lib and use it in my code?

Best,
Mike

The file “drivers/misc/tegra-fuse/tegra210_fuse_offsets.h” from kernel source implies you are compiling a kernel and the code is not useful outside of the kernel…an end user application cannot access this. I haven’t looked at the code, but perhaps the existing code exports this through “/sys” or other means. If not, it means you’re writing kernel code and exporting to user space.

This seems to be a duplicate question with https://devtalk.nvidia.com/default/topic/1013747/obtain-unique-machine-id-of-tx1/?offset=5#5167510 for TX1.

I would further advise to look at sysfs node /sys/devices/soc0/soc_id that does something similar.

Hi,

For building kernel, please check our document for information:
http://developer.nvidia.com/embedded/dlc/l4t-Jetson-TK1-Driver-Package-Documents-R21-5

Getting Started > Building the NVIDIA Kernel