[PR #2209] [CLOSED] CUDA: keep CPU expert servicing active during instrumented graph launches #3927

Closed
opened 2026-11-07 15:31:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2209
Author: @CC-David-CC
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: fix/cpu-serviced-graph-launch


📝 Commits (1)

  • 5d2f39b CUDA: service CPU doorbells while instrumented graph launches block

📊 Changes

5 files changed (+203 additions, -0 deletions)

View changed files

📝 CMakeLists.txt (+7 -0)
📝 docs/DETAILS.md (+17 -0)
➕ include/strata/core/host_graph_launch.hpp (+64 -0)
📝 src/core/verify.cpp (+33 -0)
➕ tests/core/host_graph_launch_test.cu (+82 -0)

📄 Description

Compute Sanitizer can block cudaGraphLaunch while the verifier graph waits for CPU expert doorbells supplied by the calling thread. This is the launch/service cycle diagnosed in #1383 and #1341; #1383 added a warning.

Add opt-in STRATA_VERIFY_ASYNC_LAUNCH=1: a separate host thread launches the CUDA graph while the caller serves its CPU requests. Join and propagate the real launch error before returning a frontier; release mapped GPU waits on an early service failure.

Before/after diagnostic on RTX PRO 6000 Blackwell 96 GB, Qwen3.8 Flash Next Q8_0 / FP16 KV:

  • The original parent/two-sibling full-memcheck probe remained locked for 14+ hours, with no completed forward operation.
  • The same probe completed in 43.6 seconds after this scheduling fix: three exact fresh-oracle comparisons, unchanged parent bytes, four instrumented native processes and zero sanitizer errors.
  • The elapsed-time reduction comes from breaking the wait cycle.

Current-main validation (a0116b27, RTX 4090, Linux, CUDA 13.3):

  • CUDA signal/cleanup/error-propagation regression passed; synchronous negative control failed after its eight-second watchdog; regression memcheck reported zero errors.
  • A two-token Q8_0 fixture produced byte-identical full 248,320-logit dumps on upstream main, patched default, threaded mode and memcheck. The CLI memcheck uses --report-api-errors explicit; default extended reporting also logged internal cuBLAS fatbinary-loading diagnostics.

Minimal change: launch helper, Verifier::run integration, CUDA regression/CMake registration and usage documentation. The option defaults off. Scope is the CUDA single-request verifier; direct batch/pipelined entry points retain their scheduling. HIP active verifier source matches upstream; SYCL source is unchanged. G1 certification runs separately from this branch.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2209 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/cpu-serviced-graph-launch` --- ### 📝 Commits (1) - [`5d2f39b`](https://github.com/Niko1221/Strata/commit/5d2f39bef1167c25e3f746a9265a634d197f3a42) CUDA: service CPU doorbells while instrumented graph launches block ### 📊 Changes **5 files changed** (+203 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+7 -0) 📝 `docs/DETAILS.md` (+17 -0) ➕ `include/strata/core/host_graph_launch.hpp` (+64 -0) 📝 `src/core/verify.cpp` (+33 -0) ➕ `tests/core/host_graph_launch_test.cu` (+82 -0) </details> ### 📄 Description Compute Sanitizer can block `cudaGraphLaunch` while the verifier graph waits for CPU expert doorbells supplied by the calling thread. This is the launch/service cycle diagnosed in #1383 and #1341; #1383 added a warning. Add opt-in `STRATA_VERIFY_ASYNC_LAUNCH=1`: a separate host thread launches the CUDA graph while the caller serves its CPU requests. Join and propagate the real launch error before returning a frontier; release mapped GPU waits on an early service failure. Before/after diagnostic on RTX PRO 6000 Blackwell 96 GB, Qwen3.8 Flash Next Q8_0 / FP16 KV: - The original parent/two-sibling full-memcheck probe remained locked for **14+ hours**, with no completed forward operation. - The same probe completed in **43.6 seconds** after this scheduling fix: three exact fresh-oracle comparisons, unchanged parent bytes, four instrumented native processes and **zero sanitizer errors**. - The elapsed-time reduction comes from breaking the wait cycle. Current-main validation (`a0116b27`, RTX 4090, Linux, CUDA 13.3): - CUDA signal/cleanup/error-propagation regression passed; synchronous negative control failed after its eight-second watchdog; regression memcheck reported zero errors. - A two-token Q8_0 fixture produced byte-identical full 248,320-logit dumps on upstream main, patched default, threaded mode and memcheck. The CLI memcheck uses `--report-api-errors explicit`; default extended reporting also logged internal cuBLAS fatbinary-loading diagnostics. Minimal change: launch helper, `Verifier::run` integration, CUDA regression/CMake registration and usage documentation. The option defaults off. Scope is the CUDA single-request verifier; direct batch/pipelined entry points retain their scheduling. HIP active verifier source matches upstream; SYCL source is unchanged. G1 certification runs separately from this branch. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:31:44 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3927
No description provided.