Repository navigation
Accelerate and strengthen asset tests [7/13] - #8146
AntoineRichard wants to merge 8 commits into
Conversation
Cover the host-side Newton actuator runtime shared by the PhysX and OVPhysX backends at its own boundary: a failed graph capture restores the adapter state swapped by an earlier capture and falls back to eager kernels on every step, and stateful actuators reject an outer CUDA graph capture. These units replace full ANYmal rollouts in the PhysX Newton-actuator suite.
Drop the ideal-PD, DC-motor, and remotized-PD equivalence runs, whose actuator translation is backend independent: the mixed implicit/explicit run still exercises the PD and DC-motor authoring on PhysX, and the Newton suite owns the remaining models. Move the native-path preparation checks to a kitless unit file, and rely on the shared PhysX actuator runtime units for graph-capture failure and outer-capture rejection instead of full ANYmal rollouts.
|
| eager_compute = Mock() | ||
| monkeypatch.setattr(wp, "get_device", lambda device: _cuda_device(is_capturing=False)) | ||
| monkeypatch.setattr(wp, "ScopedCapture", _FailingCapture) | ||
| monkeypatch.setattr(runtime, "_run_native_actuator_kernels", eager_compute) |
There was a problem hiding this comment.
Fallback effort goes unchecked
This test replaces _run_native_actuator_kernels with a mock, so it checks that failed capture selects eager execution but not that the real adapter applies effort. The removed PhysX rollout checked for nonzero applied and adapter effort after capture failed. Without a check through the real kernels, a fallback that runs but produces zero or stale effort could pass.
Build the device description where it is used and annotate the test functions consistently.
The suite runs through pytest and the repository test runner.
…ntoiner/asset-tests-p13-physx-newton-actuators
The PhysX CUDA-capture rejection tests stub the adapter, so they no longer reach the real is_stateful property.
Description
Part 7/13 of the asset-test series (tracker: #7282). Scope: PhysX actuators. No dependencies.
What changed
source/isaaclab_physx/test/assets/test_newton_actuators_physx.pynow focuses on the PhysX-specific seams:PhysxActuatorWrapperefforts next to implicit PhysX drives, stateful actuators with ping-pong CUDA graphs, non-identity joint ordering, per-articulation adapters, per-environment resets, gain randomization, and network actuators. Every test kept is unchanged, includingtest_native_graph_countand bothtest_network_drives_haa_joints. The translation of each Lab actuator model to Newton actuator schemas is backend independent: the mixed implicit/explicit rollout keeps exercising PD and DC-motor authoring on PhysX, and the Newton suite owns the other models.The checks that no longer need a full rollout move to units:
source/isaaclab/test/actuators/test_physx_actuator_runtime.pycovers the CUDA-graph handling of the host-side runtime (isaaclab.actuators.newton.physx_runtime.PhysxActuatorRuntime), which the PhysX and OVPhysX backends share:test_newton_adapter.pygainstest_is_stateful_only_with_delay_state: an adapter built from delayed actuators reportsis_stateful, and one built from DC motors alone does not. The runtime unit stubs the adapter, so this test covers the real property.unit/test_physx_actuator_control.pyholds the two actuator-preparation checks verbatim; they do not need Kit.Disposition
"Mutation" means a one-line production change that turns the keeper red; each was checked red on the keeper and reverted.
TestIdealPDEquivalenceTestMixedWithImplicitEquivalencekphalvedTestDCMotorEquivalenceTestMixedWithImplicitEquivalencesaturation_efforthalvedTestRemotizedPDEquivalenceTestRemotizedPDEquivalence(develop); PD and delay path via Mixed andTestDelayedPDEquivalencetest_newton_actuator_graph_capture_failure_falls_back_to_eagertest_physx_actuator_runtime.py(first two tests)ValueError; capture retried after a failure (if not self.native_actuator_graphs:)test_stateful_newton_actuators_reject_outer_cuda_capturetest_physx_actuator_runtime.py(guard);test_newton_adapter.py::test_is_stateful_only_with_delay_state(the realNewtonActuatorAdapter.is_stateful)is_statefulreturningFalse, orTruetest_prepare_native_actuators_does_not_zero_solver_gains,test_prepare_native_actuators_leaves_implicit_only_articulation_on_standard_pathunit/test_physx_actuator_control.pyDevices and CI selection
test_newton_actuators_physx.pykeeps itsdevelopdevice scope (cuda:0).@pytest.mark.isaacsim_ciondevelop, and none does now.Timing
Warm Warp cache, repository orchestrator (
pytest tools), one process per file, second of two runs, RTX 5090.developis 09b1d54; this branch is 5ad5e84.Times are the per-file process wall times the orchestrator reports, including interpreter and Kit startup.
developtest_newton_actuators_physx.pyunit/test_physx_actuator_control.py(new)source/isaaclab/test/actuators/test_physx_actuator_runtime.py(new)source/isaaclab/test/actuators/test_newton_adapter.pyThe PhysX rollout file is 4.3 s faster; the two new unit files add about 5 s of process startup for well under 0.1 s of test time.
With a cold Warp cache, the removed outer-capture rollout alone took about 21 s.
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