I’m currently using Jetson AGX Orin 32GB with JetPack 6.2 to run some tutorials of Isaac ROS. I set up a development enviornment with Isaac ROS Dev Docker and also ran some tutorials inside a Docker container.
I ran a model and tried to get a profile with Nsight Systems, but I could not get DLA profile.
Even inside the docker SoC metrics of DLA can be obtained, so the model run successfully and use DLA also inside docker. However, I cannot obtain DLA profile (other accelerators trace does not exist in the profile).
So, I would like to know how to get DLA profile with Nsight Systems inside a Docker container. I would really appreciate it if I get any suggestions or solutions.
*** Please note that this reply is generated by LLM automatically ***
I understand your concern about not being able to obtain DLA (Deep Learning Accelerator) profile with Nsight Systems inside a Docker container on your Jetson AGX Orin 32GB device with JetPack 6.2. I’ll provide a comprehensive analysis and suggestions to help you resolve this issue.
Comparison of DLA profiling on Jetson Host and Docker Container
You’ve successfully obtained DLA profiles on the Jetson host, but not inside the Docker container. This suggests that the issue is related to the container environment rather than the hardware or JetPack version.
Key differences between Jetson Host and Docker Container
Nsight Systems installation: You’ve copied the nsys directory from the Jetson host to the container, which might not be sufficient. Nsight Systems requires a proper installation and configuration to work correctly.
Container runtime and NVIDIA Container Toolkit: You’re using Docker 28.3.0 and NVIDIA Container Toolkit 1.16.2. Ensure that these versions are compatible and properly configured for GPU acceleration and DLA support.
Image and script: You’re using the Isaac ROS Dev Base image and running it with the run_dev.sh script. Verify that this image and script are correctly configured for DLA support and Nsight Systems profiling.
Suggestions and potential solutions
Reinstall Nsight Systems inside the container: Instead of copying the nsys directory, try reinstalling Nsight Systems inside the container using the official installation instructions. This will ensure that Nsight Systems is properly configured and integrated with the container environment.
Verify container runtime and NVIDIA Container Toolkit configuration: Check the Docker and NVIDIA Container Toolkit documentation to ensure that you’re using the correct versions and configurations for GPU acceleration and DLA support.
Update the Isaac ROS Dev Base image: If you’re using an older version of the Isaac ROS Dev Base image, try updating to the latest version to ensure that it includes the necessary dependencies and configurations for DLA support and Nsight Systems profiling.
Modify the run_dev.sh script: Inspect the run_dev.sh script and modify it if necessary to ensure that it correctly sets up the environment for DLA support and Nsight Systems profiling.
Check DLA support in the container: Verify that DLA is supported and enabled in the container by running nvidia-smi or other diagnostic tools.
Nsight Systems configuration: Check the Nsight Systems configuration files (e.g., nsys.conf) to ensure that they are correctly set up for DLA profiling.
By following these suggestions, you should be able to resolve the issue and obtain DLA profiles with Nsight Systems inside the Docker container. If you’re still facing issues, please provide more details about your environment and configuration, and I’ll be happy to help you further.
I would like to answer/reply to some parts of suggestions.
Key differences between Jetson Host and Docker Container
Nsight Systems installation: You’ve copied the nsys directory from the Jetson host to the container, which might not be sufficient. Nsight Systems requires a proper installation and configuration to work correctly.
Suggestions and potential solutions
Reinstall Nsight Systems inside the container: Instead of copying the nsys directory, try reinstalling Nsight Systems inside the container using the official installation instructions. This will ensure that Nsight Systems is properly configured and integrated with the container environment.
Actually, at first I installed Nsight Systems in the container by apt-get install nsight-systems, got NVIDIA Nsight Systems version 2024.5.4.34-245434855735v0 and tried to get profile with it. However, I could not get DLA profile with it.
In the document(User Guide — nsight-systems 2024.5 documentation), it is said that the option --accelerator-trace=tegra-accelerators is available in Nsight Systems Embedded Platforms Edition only.
Therefore, I suspected that there might be some difference between two nsys (the one in Jetson host and the one installed by apt-get install in the container) even though they have the same version number, and then I tried to copy the nsys file from Jetson host into the container, but the results was not changed.
Key differences between Jetson Host and Docker Container
2. Container runtime and NVIDIA Container Toolkit: You’re using Docker 28.3.0 and NVIDIA Container Toolkit 1.16.2. Ensure that these versions are compatible and properly configured for GPU acceleration and DLA support.
Suggestions and potential solutions
2. Verify container runtime and NVIDIA Container Toolkit configuration: Check the Docker and NVIDIA Container Toolkit documentation to ensure that you’re using the correct versions and configurations for GPU acceleration and DLA support.
5. Check DLA support in the container: Verify that DLA is supported and enabled in the container by running nvidia-smi or other diagnostic tools.
I use jtop and it shows that DLA is turned on when a model run, so I think that DLA is supported and enabled in the container.
Suggestions and potential solutions
4. Modify the run_dev.sh script: Inspect the run_dev.sh script and modify it if necessary to ensure that it correctly sets up the environment for DLA support and Nsight Systems profiling.
I think this can be a solution, but I don’t know how to modify for DLA profiling. Are there any directories or files to be mounted on the container to get DLA profile (like /usr/lib/aarch64-linux-gnu/tegra or/usr/bin/tegrastats)?
Or should I modify some options (like -e NVIDIA_VISIBLE_DEVICES=nvidia.com/gpu=all,nvidia.com/pva=all)?
the actual command is as below: /opt/nvidia/nsight-systems/2024.5.4/bin/nsys profile --trace=cuda,nvtx,cublas,cudla,cusparse,cudnn,tegra-accelerators --accelerator-trace=tegra-accelerators --soc-metrics=true --output=model_gn.nvvp /usr/src/tensorrt/bin/trtexec --loadEngine=model_gn_container.engine --iterations=10 --idleTime=500 --duration=0 --useSpinWait
Recently I also work on old Isaac ROS Dev with JetPack 5.1, and when I happened to try the same DLA tutorial inside the container, I noticed that I could obtain DLA profile inside a Docker Container built with this old configuration.
Configuration
Hardware Platform : Jetson AGX Orin 32GB
JetPack : 5.1.5
Nsight Systems : NVIDIA Nsight Systems version 2024.5.4.116-245435654689v0
I don’t know what is the key difference between new and old configurations, but there might be a clue for a solution.
I’ll look into it a bit more when I have time, and will comment again if I find anything.
Not sure if this is related, but the driver has been changed to support the Linux Distro.
So you might need some extra settings or mounting on JetPack 6.
We will give it a try on JetPack 6 and share more info with you.
When testing this with a TensorRT pipeline, below error is shown, and the SoC metrics section is missing.
# /opt/nvidia/nsight-systems/2024.5.4/bin/nsys profile --trace=cuda,nvtx,cublas,cudla,cusparse,cudnn,tegra-accelerators --accelerator-trace=tegra-accelerators --soc-metrics=true --output=container.nvvp /usr/src/tensorrt/bin/trtexec --onnx=./mnist.onnx --useDLACore=0 --allowGPUFallback --fp16
SoC Metrics: the feature is not supported on this system.
After applying the steps shared in the below doc, the error disappears, and the profiling output can be generated successfully.
Enable Docker Collection
However, the SoC section still does not show up, although the error message is gone.
We need to check this issue with our internal team. Will get back to you later.
Thanks.
Thank you so much for your investigation and I’m sorry for a late reply. I would like to check that command in my env within this week.
I’m sorry to ask a question before checking it by myself, but I would like to ask you one thing. In the last comment, you said that you can collect SoC metric inside the container, but how about the accelerators trace?
Could I expect to get both SoC Metrics and trace data, or only SoC Metrics by the command? In the latter case, would it be valid to use SoC metrics information instead of trace data?
In the test before, we missed the --soc-metrics=true configuration so the SoC metrics are not generated.
After adding the config, we can get the DLA information as expected.
To be honest, `–soc-metrics=true` configuration is already used and I successfully collect SoC Metrics inside Docker Container. However, I can’t collect any trace data for DLA inside Docker Container (the item expressed as ‘Other accelerators trace‘ on Nsight Systems).
Information that I can obtain from SoC Metrics and trace data are somewhat different so I would like to collect trace data to evaluate DLA kernel execution time.
What should I do to collect DLA trace data inside container?