npx skills add ...
npx skills add nvidia/omniperf --skill nvtx-python
Profile Python functions with NVTX in non-Kit environments (Isaac Lab 3.0+ standalone, any Python app without Carbonite). Uses a bundled PYTHONPATH-scoped sitecustomize.py with sys.setprofile hook, NVTX push/pop ranges, module include/exclude filtering, and Nsight Systems integration. Use when CARB_PROFILING_PYTHON doesn't work (no Kit/Carbonite runtime), when profiling standalone Isaac Lab scripts, or when you need per-function Python tracing in nsys captures outside Kit.
npx skills add nvidia/omniperf --skill nvtx-python
For Isaac Lab 3.0+ standalone mode and other Python apps without Kit/Carbonite, CARB_PROFILING_PYTHON doesn't work. This skill uses the bundled scripts/sitecustomize.py helper to install a sys.setprofile() hook with NVTX ranges.
Do not write into an environment's existing sitecustomize.py. Load the bundled helper with PYTHONPATH so disabling it is just unsetting PYTHONPATH or NVTX_PROFILE_PYTHON.
| Variable | Description | Default | Example |
|---|---|---|---|
NVTX_PROFILE_PYTHON | Set to 1 to enable | (disabled) | 1 |
NVTX_PROFILE_INCLUDE | Module prefixes to trace (comma-separated). Empty = all. | (all) | isaaclab,skrl,torch |
NVTX_PROFILE_EXCLUDE | Module prefixes to exclude (comma-separated). | importlib | importlib,threading,nvtx |
NVTX_PROFILE_INCLUDE to limit scope to modules of interestNVTX_PROFILE_PYTHON or remove the skill's scripts/ directory from PYTHONPATHsys.setprofileIsaac Lab 3.0+ standalone does boot Kit/Carb under the hood via AppLauncher. Just running from isaaclab.app import AppLauncher (or any import that transitively pulls carb / isaacsim) registers Carb's own Python profile callback during module load, silently overwriting the hook this skill installed at interpreter startup. The resulting .nsys-rep then shows Python NVTX only for the brief window between interpreter startup and the first Carb-pulling import — typically just argparse, then nothing.
Fix: call sitecustomize.install() after the import to re-arm. install() is idempotent, re-reads NVTX_PROFILE_INCLUDE / NVTX_PROFILE_EXCLUDE each call, and re-installs both sys.setprofile and threading.setprofile.
The probes are how you confirm the issue and the fix in one run. Drop them once verified.
sys.setprofile is per-thread. threading.setprofile only catches threads created via Python's threading module — Kit / PhysX / Hydra / Fabric / TBB native threads stay invisible. Most of env.step() runs in C++ on those threads, so even with the hook re-armed you'll see relatively few Python NVTX zones during the step loop.NVTX_PROFILE_INCLUDE to your own packages (e.g. simulation,isaaclab.envs,isaaclab_tasks) for Isaac Lab workloads.CARB_PROFILING_PYTHON=1 + Carb's NVTX backend (see profiling skill) instead of, or alongside, this skill.@nvtx.annotate (env.step, IK solve, observation manager, camera readout).If you know exactly which modules/functions to trace, nsys has a built-in option:
See the Nsight Systems User Guide for details.