Repository navigation
Fix native window stepping blocked by render completion - #1154
Merged
Merged
Conversation
yuecideng
self-requested a review
November 11, 2026 06:39
yuecideng
approved these changes
Nov 11, 2026
This was referenced Nov 12, 2026
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
Fix the native-window stepping regression introduced by #833.
update(step=1)enteredrender_frame(), whose state publication called_flush_render_updates()on every physics step, including scenes without markers. On RTX 5090 D v2 with Hybrid at 1920×1080, the wait averaged 61 ms and reduced thecreate_scene.pyloop to about 15 steps/s.Separate state publication from native render completion. Ordinary windows still publish physics and marker transforms, while cameras, due recording/visualization captures, and explicit
sync_render_state()retain completion waits. A synchronous consumer following window publication completes the same staged state once per frame. Fluid scenes retain completion waits because their bounded native staging can discard updates while both copy slots are busy. Due recording time is consumed after successful capture, so a failed completion wait remains retryable.Marker attachment refresh and the explicit synchronization API retain their behavior. Frame exit invalidates publication and completion flags so subsequent state writes remain visible. The render fix is confined to
sim_manager.pyscheduling.Measured with DexSim 0.6.0rc1, one environment, 1920×1080, a 10 ms physics timestep, 15 warmup steps and three repetitions of 50 steps:
Hybrid before the fix measured 15.00 CPU / 14.93 CUDA steps/s, with 150 full waits. Values are median physics-loop throughput; the native window renders asynchronously. Each run advanced simulation time by 1.5 seconds over the measured 150 steps. Other GPU processes were present; the reported runs had no concurrent tests from this change. Fluid scenes retain their previous completion policy and were not benchmarked here.
Type of change
Validation
Latest main integration —
ccfb55bbf/main@fb640fc3f(2026-11-13): merged current main and resolved both conflicts. Asset context retains the official-source fallback and upstream task-asset catalog guidance. The SPH configuration tests now match main's current contract rejecting standalone SPH in favor of DexUni composition. Render scheduling merged without conflicts.Local focused validation passed in the existing Python 3.12 simulation environment: 455 passed / 15 skipped across dataset fallback, simulation manager, fluid configuration/object, runtime controls, marker rendering, wheel configuration and context tests. Black 26.10.1 left all 2510 files unchanged; API docs coverage is 4887/4887; context validation and diff checks passed. Existing tests cover these integration boundaries, so no new tests were added. Context remains accurate after retaining both asset paragraphs. This run does not replace native GPU or full-container CI coverage; fresh Actions checks for this integration have not yet completed.
Previous main integration —
aba50d107/main@ac714ec86(2026-11-12): resolved the overlapping SPH configuration test by retaining the non-default option-forwarding checks, and removed the duplicate reset-fixture assignment introduced by automatic merging. Both test files match the previously validated branch version. Nine stepping/render publication/completion/camera/recording methods are AST-identical to205fa4990; upstream additions are retained.Focused validation in the previously successful CI container runtime passed: 715 CPU tests; 26 native GPU tests with three SDL-dummy window skips; Black 26.10.1 over 2464 files; API coverage 4832/4832; context checks. Native coverage includes markers, mounted cameras, batch reads/depth, fluid visibility, CUDA state reset and graph-motor reset. Existing tests cover the merge interactions; no new cases or context edits were needed. The tested source tree equals the pushed commit tree.
The complete
full-prjob was not rerun after this merge. The full-container evidence below remains tied to205fa4990before the main integration.full-prtest job in the SDK image declared by the workflow, on205fa4990includingmain@d95a5f161. The job exited 0: fast 13,924 passed / 56 skipped; GPU 586 passed / 11 skipped; independent sim 300 passed / 4 skipped. All 14,881 selected nodes have recorded outcomes, with zero failures, missing nodes or incomplete nodes. The distributed lane has no matching non-slow cases and follows the runner's existing empty-lane handling.42998110633; merge commiteb9c21510has the same tracked source as the validated head. The test used Python 3.11.16, DexSim 0.6.0rc1, PyTorch 2.7.0+cu128, eight CPU workers, default plugin loading, SDL dummy, and--no-finalize-resource-lanes --freeze-native-imports. Installation, import verification, the complete test plan and duration-history update all exited 0. The main test step ran continuously from 20:14:06 to 21:01:19 on 2026-11-11 (UTC+8).romacases and three existing CUDA skips.-W. Supplemental checks in that image passed: Python documentation 102; architecture frontend 17 unit, 8 browser and 10 Sphinx integration tests; Prettier; Black 2411 files; API coverage 4770/4770. The corresponding remote lint/documentation-test jobs useubuntu-latestand have passed.black .was run before each commit.A preceding container attempt aborted in the GPU lane with SIGABRT. Kernel logs recorded an existing Nsight process Xid 13 and the pytest process Xid 43 in the same second. The affected CUDA cases passed 60 repetitions on this branch and 60 on main; the complete run above then passed after stopping that profiling session, including the prior interruption point. No Xid occurred in the successful run, although one NVIDIA reference-state warning remained. The native abort's cause is not established; the failed attempt and diagnostics are retained alongside the passing evidence.
Additional native initialization finding: on the shared desktop (
DISPLAY=:0), intermittent X11BadAtomfailures reproduce withdexsim.init_sim_engine()alone, without importing EmbodiChain. GDB reaches SDL 3.4.4's X11 event handling before the rendering tests. Disabling the input method or preinitializing Xlib threads did not reliably resolve it. This desktop-specific native failure remains unresolved; the isolated X11 verification above must not be presented as a fix for it. The earlier interpreter-path attribution was not supported by repeated controls. No DexSim binary or production startup workaround is included in this PR.OfflineRT synchronization checks use explicitly unlit markers. With DexSim 0.6.0rc1, lit RobotMarkers texture previews appear gray through both the previous manual-flush capture route and the new manager route. That existing appearance difference remains unresolved; this change preserves production material behavior.
Asset download reliability
The shared dataset loader now appends the official Hugging Face source for known EmbodiChain asset URLs on hf-mirror.com. A failed mirror download falls through to the same asset path and revision with the original checksum and extraction settings. Custom hosts and unrelated repositories retain their declared sources.
This addresses the asset-download failure in #1154 CI. The identical repair is included in #837, #1137 and #1154. Validation on #1154: 154 data tests passed, including seven fallback cases; the original contact-sensor test passed. An empty-cache download reproduced the mirror SSL failure and then downloaded, verified and extracted the asset from the official source. The data-assets context documents this behavior. Full Actions checks for the new commits are pending.
Checklist
black .command to format the code base.python docs/scripts/check_api_docs.py), if applicable.