Skip to content

Commit c0b9ecd

Browse files
committed
Merge upstream/develop into esekkin/camera-refactor
2 parents 1ed6af5 + 7588fa9 commit c0b9ecd

37 files changed

Lines changed: 1463 additions & 98 deletions

File tree

.github/actions/run-package-tests/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,31 @@ runs:
126126
echo "🟠 Workflow cancelled, force-killing container ${CONTAINER}..."
127127
docker kill "${CONTAINER}" 2>/dev/null || true
128128
docker rm -f "${CONTAINER}" 2>/dev/null || true
129+
130+
- name: Cleanup old Docker images
131+
if: always()
132+
shell: bash
133+
run: |
134+
# Don't let cleanup errors fail a passing test job
135+
set +e
136+
137+
echo "⚪ Disk usage before cleanup:"
138+
df -h /var/lib/docker
139+
140+
ISAACSIM_IMAGE="${{ inputs.isaacsim-base-image }}:${{ inputs.isaacsim-version }}"
141+
142+
# Pin the base IsaacSim image so prune -a doesn't remove it
143+
ISAACSIM_IMAGE_PIN_CONTAINER="isaacsim-pin-${{ inputs.container-name }}-${{ github.run_id }}-${{ github.run_attempt }}"
144+
echo "🔵 Pinning IsaacSim base image: ${ISAACSIM_IMAGE} to temporary container ${ISAACSIM_IMAGE_PIN_CONTAINER}"
145+
docker create --name "${ISAACSIM_IMAGE_PIN_CONTAINER}" "${ISAACSIM_IMAGE}" true 2>/dev/null || true
146+
147+
echo "🔵 Removing Docker images older than 3 days..."
148+
docker image prune -a -f --filter "until=72h"
149+
150+
echo "🔵 Removing temporary container ${ISAACSIM_IMAGE_PIN_CONTAINER}..."
151+
docker rm "${ISAACSIM_IMAGE_PIN_CONTAINER}" 2>/dev/null || true
152+
153+
echo "🟢 Docker image cleanup complete."
154+
155+
echo "⚪ Disk usage after cleanup:"
156+
df -h /var/lib/docker

docker/.env.base

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
ACCEPT_EULA=Y
77
# NVIDIA Isaac Sim base image
88
ISAACSIM_BASE_IMAGE=nvcr.io/nvidia/isaac-sim
9-
# NVIDIA Isaac Sim version to use (e.g. 6.0.0)
10-
ISAACSIM_VERSION=6.0.0
9+
# NVIDIA Isaac Sim version to use (e.g. 6.0.0-dev2)
10+
# TODO(AntoineRichard): Revert to stable 6.0.0 tag once it ships on NGC
11+
ISAACSSIM_VERSION=6.0.0-dev2
1112
# Derived from the default path in the NVIDIA provided Isaac Sim container
1213
DOCKER_ISAACSIM_ROOT_PATH=/isaac-sim
1314
# The Isaac Lab path in the container

docs/source/testing/benchmarks.rst

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,96 @@ Measure asset method and property performance using mock interfaces:
154154
For detailed documentation on micro-benchmarks, including available benchmark files,
155155
input modes, and how to add new benchmarks, see :ref:`testing_micro_benchmarks`.
156156

157+
Startup Profiling Benchmark
158+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
159+
160+
Profile the startup sequence of an IsaacLab environment using ``cProfile``. Each
161+
startup stage is wrapped in its own profiling session and the top functions by
162+
own-time are reported. This is useful for investigating startup regressions and
163+
understanding where time is spent during initialization.
164+
165+
.. code-block:: bash
166+
167+
# Basic usage — reports top 30 functions per phase
168+
./isaaclab.sh -p scripts/benchmarks/benchmark_startup.py \
169+
--task Isaac-Ant-v0 \
170+
--num_envs 4096 \
171+
--headless \
172+
--benchmark_backend summary
173+
174+
The script profiles five phases independently:
175+
176+
- **app_launch**: ``launch_simulation()`` context entry (Kit/USD/PhysX init)
177+
- **python_imports**: importing gymnasium, torch, isaaclab_tasks, etc.
178+
- **task_config**: ``resolve_task_config()`` (Hydra config resolution)
179+
- **env_creation**: ``gym.make()`` + ``env.reset()`` (scene creation, sim start)
180+
- **first_step**: a single ``env.step()`` call
181+
182+
Each phase records a wall-clock time plus per-function own-time and cumulative
183+
time as ``SingleMeasurement`` entries. Only IsaacLab functions and first-level
184+
calls into external libraries are included (deep internals of torch, USD, etc.
185+
are filtered out).
186+
187+
**Whitelist mode** — For dashboard time-series comparisons across runs, use a
188+
YAML whitelist config to report a fixed set of functions instead of top-N.
189+
Patterns use ``fnmatch`` syntax (``*`` and ``?`` wildcards):
190+
191+
.. code-block:: yaml
192+
193+
# Example whitelist config
194+
app_launch:
195+
- "isaaclab.utils.configclass:_custom_post_init"
196+
- "isaaclab.sim.*:__init__"
197+
env_creation:
198+
- "isaaclab.cloner.*:usd_replicate"
199+
- "isaaclab.cloner.*:filter_collisions"
200+
- "isaaclab.scene.*:_init_scene"
201+
first_step:
202+
- "isaaclab.actuators.*:compute"
203+
- "warp.*:launch"
204+
205+
.. code-block:: bash
206+
207+
./isaaclab.sh -p scripts/benchmarks/benchmark_startup.py \
208+
--task Isaac-Ant-v0 \
209+
--num_envs 4096 \
210+
--headless \
211+
--benchmark_backend omniperf \
212+
--whitelist_config scripts/benchmarks/startup_whitelist.yaml
213+
214+
Phases listed in the YAML use the whitelist; phases not listed fall back to
215+
``--top_n`` (default: 5 in whitelist mode, 30 otherwise). Patterns that match
216+
no profiled function emit ``0.0`` placeholders so the output always contains
217+
the same keys.
218+
219+
A default whitelist is provided at ``scripts/benchmarks/startup_whitelist.yaml``.
220+
221+
.. list-table::
222+
:header-rows: 1
223+
:widths: 25 15 60
224+
225+
* - Argument
226+
- Default
227+
- Description
228+
* - ``--task``
229+
- required
230+
- Environment task name
231+
* - ``--num_envs``
232+
- from config
233+
- Number of parallel environments
234+
* - ``--top_n``
235+
- 30 (5 with whitelist)
236+
- Max functions per non-whitelisted phase
237+
* - ``--whitelist_config``
238+
- None
239+
- Path to YAML whitelist file
240+
* - ``--benchmark_backend``
241+
- ``omniperf``
242+
- Output backend (``json``, ``osmo``, ``omniperf``, ``summary``)
243+
* - ``--output_path``
244+
- ``.``
245+
- Directory for output files
246+
157247
Command Line Arguments
158248
----------------------
159249

@@ -399,9 +489,12 @@ Output structure:
399489
Summary Backend
400490
~~~~~~~~~~~~~~~
401491

402-
Human-readable console report plus JSON file. Prints a formatted summary (runtime,
403-
startup, train, frametime, and system info) to the terminal while also writing
404-
the same data as JSON. Use when you want a quick readout without opening the JSON:
492+
Human-readable console report plus JSON file. Prints a formatted summary to the
493+
terminal while also writing the same data as JSON. Standard phases (runtime,
494+
startup, train, frametime, system info) are rendered with specialized formatting;
495+
any additional phases (e.g., from the startup profiling benchmark) are rendered
496+
automatically with their ``SingleMeasurement`` and ``StatisticalMeasurement``
497+
entries. Use when you want a quick readout without opening the JSON:
405498

406499
.. code-block:: bash
407500

0 commit comments

Comments
 (0)