Repository navigation
Accelerate and strengthen asset tests [3/13] - #8138
Closed
AntoineRichard wants to merge 4 commits into
Closed
AntoineRichard wants to merge 4 commits into
AntoineRichard wants to merge 4 commits into
Conversation
OvPhysxManager pinned the first simulation device for the whole process because the backend entered the OVPhysX process-wide CPU-only mode, which OVPhysX 0.6.3 still documents as irreversible. CPU scenes now leave that mode off and select CPU dynamics per scene through enableGPUDynamics=false and the MBP broadphase, as the OVPhysX developer guide recommends for mixed CPU/GPU processes, so the device lock is removed. A child-process test runs CPU, CUDA, CPU and CUDA, CPU scene sequences and checks device placement, state I/O, and that each CPU scene reproduces the same trajectory. A unit test pins the per-device scene attributes.
AntoineRichard
requested review from
huidongc,
marcodiiga,
pbarejko and
rilei-nvidia
as code owners
September 29, 2026 12:48
This was referenced Sep 29, 2026
Contributor
|
7 tasks done
AntoineRichard
marked this pull request as draft
September 29, 2026 12:54
The OVPhysX manager no longer pins the first simulation device, so the lock-skip fixtures in these test files skipped the other device's cases for a reason that no longer holds. Remove them and the device_split marker; each file passes its CPU and CUDA cases in one process. Describe the device_split marker by what it does rather than by the removed lock.
OVPhysX simulates every UsdPhysics.Scene in the stage, and the PhysX schema default enables GPU dynamics. The manager configured only the simulation's physics scene, so an extra scene, such as one authored by an asset, kept GPU dynamics during a CPU simulation. Author the device's dynamics and broadphase on every physics scene, and describe the change in the changelog.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part 3/13 of the asset-test series (tracker: #7282). Scope: OVPhysX manager: CPU and CUDA simulations in one process. No dependencies.
#8139 and #8141 depend on this PR: their OVPhysX asset tests run CPU and CUDA scenes in one process and drop the
device_splitmarker.What changed
OvPhysxManagerpinned the first simulation device for the whole process, because the backend calledovphysx.PhysX.set_cpu_mode(True)for CPU scenes. OVPhysX 0.6.3 still documents that mode as sticky: after a CPUscene,
set_cpu_mode(False)raisesCPU-only mode is sticky once enabled, so a later CUDA scene cannot start._locked_devicecheck and its error areremoved.
UsdPhysics.Scenein the stage selects the simulation device: CPU simulations authorenableGPUDynamics=falseand the MBP broadphase, GPU simulationstrueand the GPU broadphase. This is theper-scene path the OVPhysX developer guide recommends for mixed CPU/GPU processes. The simulation's physics scene
still receives the full OVPhysX scene configuration. Other scenes, such as one authored by an asset, receive the
device selection, because OVPhysX simulates them too and the schema default enables GPU dynamics.
OVPHYSX_DISABLE_GPU(see the changelog fragment).device_split.Each file runs its CPU and CUDA cases in one process and collects the same node IDs as the two-process run. The
device_splitmarker description inpyproject.tomlstates what the marker does instead of the removed lock.Evidence on OVPhysX 0.6.3:
scene: with only the simulation's scene configured, a cube resting beside an extra
UsdPhysics.Scenegavez(5) = 0.25812962651252747 on both CPU and CUDA; with every scene configured, the CPU run gives 0.2582125663757324,
the value of develop's hard CPU-only mode.
Tests:
test_cpu_and_cuda_scenes_run_sequentially_in_one_process[cpu-cuda-cpu, cuda-cpu](new, child process): deviceplacement, binding placement, state I/O, and a reproducible trajectory for each CPU scene.
test_scenes_author_device_dynamics_and_broadphase[cpu, gpu](new): the per-device attributes on the simulation'sphysics scene and on an extra scene authored for the other device.
test_manager_supports_pinned_runtime_apiasserts the wheel'sset_cpu_modeis never called._locked_devicestate.Mutations of
ovphysx_manager.py, each reverted, turn the tests red: re-addingset_cpu_mode(not is_gpu)(sequencetests and pinned-runtime test), re-adding a first-device lock (sequence tests), authoring GPU dynamics for CPU scenes,
and skipping the scenes other than the simulation's (scene-attribute test).
No test is deleted. The lock-skip fixtures only skipped the other device's cases, which now run.
Timing
Warm Warp cache, repository orchestrator (
./isaaclab.sh -p -m pytest tools, one process per file), second of two runs on one RTX 5090 shared with other jobs, so treat the numbers as indicative. Wall includes process startup. Develop numbers are from the same machine; develop randevice_splitfiles in two processes.sensors/test_contact_sensor.pysensors/test_frame_transformer.pysensors/test_imu.pysim/test_views_xform_prim_ovphysx.pysensors/test_joint_wrench_sensor.pytest_randomize_rigid_body_collider_offsets_mdp.pysensors/test_pva.pytest_randomize_rigid_body_material_mdp.pyphysics/test_ovphysx_manager_lifecycle.pyphysics/test_ovphysx_scene_data_backend.pyThe develop contact-sensor count of 38 includes flaky reruns; both runs collect the same 35 node IDs.
Product bugs pinned
None.
Type of change
Release backport
developChecklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bump package versions — CI handles that)CONTRIBUTORS.mdor my name already exists there