@@ -4,9 +4,9 @@ Benchmarking Isaac Lab
44======================
55
66Isaac Lab provides supported benchmark workflows for environment stepping,
7- trained-policy playback, reinforcement-learning training, and startup profiling.
8- This guide explains which workflow to use, how to run it, and how to interpret
9- its results.
7+ trained-policy playback, reinforcement-learning training, and startup profiling,
8+ each of which can also be run across several GPUs. This guide explains which
9+ workflow to use, how to run it, and how to interpret its results.
1010
1111.. seealso ::
1212
@@ -31,6 +31,8 @@ Choose A Workflow
3131 - ``training ``
3232 * - Launch, import, configuration, scene creation, or first-step latency
3333 - ``startup ``
34+ * - Any of the above across several GPUs
35+ - ``<workflow>-multigpu ``
3436 * - One asset or sensor operation
3537 - :ref: `testing_micro_benchmarks `
3638
@@ -119,7 +121,7 @@ same random-action stepping workload.
119121 .. code-block :: json
120122
121123 {
122- "schema_version" : " 1.3 " ,
124+ "schema_version" : " 1.4 " ,
123125 "run" : {
124126 "config" : {"physics_backend" : " physx" , "rendering_backend" : " none" , "presets" : [" physx" ]},
125127 "task" : " Isaac-Cartpole-Direct" , "seed" : 42 , "status" : " completed" , "num_envs" : 4096
@@ -154,7 +156,7 @@ same random-action stepping workload.
154156 .. code-block :: json
155157
156158 {
157- "schema_version" : " 1.3 " ,
159+ "schema_version" : " 1.4 " ,
158160 "run" : {
159161 "config" : {
160162 "physics_backend" : " physx" , "rendering_backend" : " isaacsim_rtx" ,
@@ -336,6 +338,96 @@ Do not treat a faster environment-step rate as proof of faster end-to-end
336338training or equivalent learning. Do not compare short training curves as if
337339they established final policy quality.
338340
341+ .. _testing_benchmarks_multigpu :
342+
343+ Multi-GPU
344+ ---------
345+
346+ Use It When
347+ ~~~~~~~~~~~
348+
349+ Append ``-multigpu `` to ``startup ``, ``runtime ``, or ``training `` to run the same
350+ workflow with one rank per GPU. Use it to measure synchronized multi-GPU training
351+ throughput, or to measure how much a workflow slows down when every GPU on the
352+ node is busy.
353+
354+ Command
355+ ~~~~~~~
356+
357+ .. code-block :: bash
358+
359+ ./isaaclab.sh benchmark training-multigpu \
360+ --rl_library rsl_rl \
361+ --num_gpus 2 \
362+ --task Isaac-Cartpole-Direct \
363+ --num_envs 4096 \
364+ --max_iterations 100 \
365+ --seed 42 \
366+ --visualizer none \
367+ --output_path ./benchmark_results/multigpu \
368+ physics=isaacsim_physx
369+
370+ The launcher accepts ``--num_gpus ``, ``--nnodes ``, ``--node_rank ``, and the
371+ ``torchrun `` rendezvous options, exactly like :ref: `train-multigpu-command `. Every
372+ other argument is forwarded to the single-GPU workflow unchanged. Add ``--dry_run ``
373+ to print the ``torchrun `` command without running it, and ``--log_all_ranks `` to
374+ show console output from every rank instead of local rank 0 only.
375+
376+ For a multi-node run, issue the same command on every node with a distinct
377+ ``--node_rank ``:
378+
379+ .. code-block :: bash
380+
381+ ./isaaclab.sh benchmark training-multigpu \
382+ --rl_library rsl_rl --nnodes 2 --node_rank 0 --num_gpus 8 \
383+ --rdzv_backend c10d --rdzv_endpoint host0:29400 --rdzv_id bench \
384+ --task Isaac-Cartpole-Direct
385+
386+ ``training-multigpu `` supports ``rsl_rl ``, ``rl_games ``, and ``skrl `` with Torch. It
387+ does not support skrl JAX or SB3, and it rejects ``--video ``,
388+ ``--capture_env_sensors ``, and ``--check_success ``, none of which are meaningful
389+ across ranks. Use :ref: `train-multigpu-command ` for general distributed training.
390+
391+ Read The Result
392+ ~~~~~~~~~~~~~~~
393+
394+ ``--num_envs `` is the number of environments **per rank **, and each rank creates its
395+ own Isaac Lab instance on its own GPU. Only global rank 0 writes a bundle. What that
396+ bundle covers depends on the workflow, and ``extra `` records it:
397+
398+ .. list-table ::
399+ :header-rows: 1
400+ :widths: 30 70
401+
402+ * - ``extra `` field
403+ - Meaning
404+ * - ``world_size ``, ``local_world_size ``, ``num_nodes ``
405+ - Rank layout of the job.
406+ * - ``num_envs_per_rank ``
407+ - Environments hosted by each rank.
408+ * - ``workload_scope ``
409+ - ``global `` for ``training-multigpu ``: ranks train in lockstep, so ``run.num_envs ``,
410+ ``runtime.steps_per_iteration ``, and every FPS field cover all ranks.
411+ ``rank0 `` for ``startup-multigpu `` and ``runtime-multigpu ``: those ranks run
412+ independent workloads, so the reported values are rank 0's own, measured while
413+ the other ranks contend for the same host.
414+ * - ``measurement_scope ``
415+ - ``rank0_process `` — timings, learning curves, CPU, and RAM come from rank 0 alone.
416+ * - ``gpu_measurement_scope ``
417+ - ``rank0_node `` — ``resources.devices `` reports every GPU visible to rank 0, so a
418+ single-node run shows all ranks. ``resources.gpu_util_pct `` and
419+ ``resources.gpu_mem_gb `` remain scoped to rank 0's own device.
420+
421+ Do Not Infer
422+ ~~~~~~~~~~~~
423+
424+ Do not compare a multi-GPU result against a single-GPU result at the same
425+ ``--num_envs ``: the multi-GPU run has ``world_size `` times as many environments. To
426+ measure scaling, compare the global throughput of an ``N ``-GPU run against ``N ``
427+ times the throughput of a single-GPU run at the same per-rank environment count. Do
428+ not read ``startup-multigpu `` or ``runtime-multigpu `` throughput as a global rate;
429+ their ``workload_scope `` is ``rank0 ``, and the other ranks were not measured.
430+
339431Startup Profiling
340432-----------------
341433
0 commit comments