Skip to content

Add RTC temporal fusion runtime - #137

Merged
LiangSu8899 merged 3 commits into
flashrt-project:mainfrom
diantoudedianshan:feat/rtc-temporal-fusion
Jul 7, 2026
Merged

LiangSu8899 merged 3 commits into
flashrt-project:mainfrom
diantoudedianshan:feat/rtc-temporal-fusion

Conversation

@diantoudedianshan

Copy link
Copy Markdown
Contributor

Summary

Add a host-side RTC temporal-fusion runtime for action-chunk policies.

This introduces an AsyncTemporalFusionRunner and TemporalFusionBuffer that:

  • run the next policy prediction on a background worker while serving the active chunk
  • align raw action chunks on controller-step time
  • fuse overlapping predictions with exponential position-decay weights
  • support latency-based and state-based chunk switching
  • expose runner stats and worker readiness state for monitoring

The PR also documents the adapter contract, configuration knobs, deadline behavior, CPU validation, benchmark command, and the real Pi0.5 checkpoint gate. The checkpoint validation command is PR-safe and uses generic local paths instead of machine-specific paths.

Validation

  • PYTHONPATH=. python -m pytest tests/test_rtc_temporal_fusion.py -q
    • 10 passed in 0.18s
  • Real Pi0.5 checkpoint gate on SM89:
    • PYTHONPATH=$PWD python -m pytest tests/test_rtc_temporal_fusion_pi05.py -q -s
    • 1 passed, 2 warnings in 23.36s

@LiangSu8899

Copy link
Copy Markdown
Member

Thanks a lot for the PR — really cool
just have two small suggestions before merge: make close() wait for running workers by default, and maybe clean up the pending future/ticket if the worker throws, so the runner won’t get stuck. WDYT

@diantoudedianshan

Copy link
Copy Markdown
Contributor Author

Thanks, I updated #137 in the same direction as #138:

  • close() now waits by default
  • pending prediction tickets are cancelled on close/failure
  • failed worker futures clear self._pending so the runner can resubmit
  • added lifecycle tests for close waiting and failed worker cleanup

Validation:

  • PYTHONPATH=. python -m pytest tests/test_rtc_temporal_fusion.py -q
    • 12 passed
  • python -m py_compile flash_rt/runtime/rtc_temporal_fusion.py tests/test_rtc_temporal_fusion.py
    • passed
  • PYTHONPATH=$PWD python -m pytest tests/test_rtc_temporal_fusion_pi05.py -q -s
    • 1 passed, 2 warnings

@LiangSu8899
LiangSu8899 merged commit dfe513b into flashrt-project:main Jul 7, 2026
hypertseng added a commit to hypertseng/FlashRT that referenced this pull request Jul 10, 2026
Include:
- Qwen3 prefill fast path optimization (flashrt-project#134)
- SM89 Qwen3-VL FP8 decode-path optimization (flashrt-project#139)
- VLASH async runner (flashrt-project#138)
- RTC temporal fusion runtime (flashrt-project#137)
- GRoot N17 latency stats and fixes (flashrt-project#132)
- Thor fp16 routing through Thor producer (flashrt-project#133)
- Qwen3-VL improvements and fixes

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants