Skip to content

Avoid static stream registry teardown - #32

Merged
voltjia merged 1 commit into
masterfrom
fix/stream-registry-teardown
Jul 25, 2026
Merged

Avoid static stream registry teardown#32
voltjia merged 1 commit into
masterfrom
fix/stream-registry-teardown

Conversation

@voltjia

@voltjia voltjia commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR keeps the process-wide stream registry alive until process termination so extension static teardown cannot call InfiniRT after the accelerator runtime has started shutting down.

It removes the native stream and event destruction loop that was observed hanging inside CUDA runtime teardown and relies on the operating system to reclaim process-scoped handles.

It adds a subprocess regression that creates multiple streams, submits Add work, synchronizes the streams, and requires Python to exit within 30 seconds.

Validation

  • Ruff and clang-format 19.1.4 checks passed.
  • The installed wheel built and imported with PyTorch 2.13.0+cu130 on the NVIDIA runtime backend.
  • The subprocess exit regression passed in five independent NVIDIA containers.
  • The complete installed-wheel CPU fallback suite passed with 142 tests passed, 32 skipped, and 3 expected failures.
  • The broader NVIDIA stream suite completed without teardown hangs. Five existing Add value assertions still fail with the cached SM75 InfiniOps build on A100 and are tracked separately in Stabilize NVIDIA Add validation #33.

@voltjia
voltjia merged commit ec577cd into master Jul 25, 2026
8 checks passed
@voltjia
voltjia deleted the fix/stream-registry-teardown branch July 25, 2026 06:40
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.

1 participant