Skip to content

Fix CQR surface-code test to use Relay-BP#691

Merged
vedika-saravanan merged 4 commits into
NVIDIA:mainfrom
vedika-saravanan:cqr-relay-bp-test-fix
Jul 14, 2026
Merged

Fix CQR surface-code test to use Relay-BP#691
vedika-saravanan merged 4 commits into
NVIDIA:mainfrom
vedika-saravanan:cqr-relay-bp-test-fix

Conversation

@vedika-saravanan

@vedika-saravanan vedika-saravanan commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes app_examples.surface_code-1-cqr-test-distance-3 for the CQR host-dispatch path when nv-qldpc-decoder is used with device-call decoding.

The test already set CUDAQ_DEVICE_CALL_CHANNEL=host_dispatch, but the nv-qldpc device-call path now requires Relay-BP (composition=1). This PR:

  • adds EXTRA_CLI_ARGS=--use-relay-bp for the CQR surface-code test when both the proprietary cudevice target and external decoder support are available
  • keeps the public/non-external-decoder configuration from forcing Relay-BP
  • threads $EXTRA_CLI_ARGS through the syndrome save/load phase, so --save_syndrome and --load_syndrome use the same decoder configuration as the main test path

Validated locally in Docker:

  • public-source style build without private decoder assets: targeted CQR test passed
  • private cuda-qx build with source-built cudaq-qec-nv-qldpc-decoder and cudaq-qec-realtime-cudevice-proprietary: targeted CQR test passed with --use-relay-bp, nv-qldpc-decoder, and syndrome replay verification

Runtime / performance impact

N/A. Test-only change.

Self-review checklist

Please confirm each item before requesting review. Check [x] or strike
through and explain.

Before requesting review

  • I reviewed my own full diff in GitHub or my editor.
  • PR is in Draft if it is not yet ready for review.
  • Temporary / debugging changes have been removed.
  • Local test logs reviewed; no unexplained warnings or errors.
  • CI logs reviewed; no unexplained warnings or errors.
  • Full CI has been run.

Scope and size

  • PR is under ~1000 lines, or an exception is justified in the description.
  • Refactoring-only changes are isolated in their own PR(s).
  • No existing tests were disabled or modified just to make this PR pass
    (if so, an issue has been raised).

Tests

  • New functionality has new tests. Test-only fix for an existing CQR test.
  • Tests fail if the new functionality is broken (including crashes), not
    just when it is missing.
  • Negative tests added where exceptions are expected. N/A; no new exception path.
  • Truth data added where simple EXPECT_* / assert checks are
    insufficient for algorithmic correctness.
    N/A; existing syndrome replay verification covers this path.
  • CI runtime impact considered; team notified if significant.

Documentation

  • Public-facing APIs have Doxygen docs. N/A; no API changes.
  • User-visible behavior changes have public docs, or a follow-up is
    tracked.
    N/A; test-only change.

Code style

  • Naming follows the existing convention (snake_case vs camelCase) for
    the area being modified.

Dependencies

  • No new third-party dependencies, or the team has been notified and
    OSRB tickets filed.

Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Comment thread libs/qec/unittests/realtime/app_examples/CMakeLists.txt Outdated
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
@vedika-saravanan
vedika-saravanan marked this pull request as ready for review July 14, 2026 00:02
Comment thread libs/qec/unittests/realtime/app_examples/CMakeLists.txt Outdated
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>

@bmhowe23 bmhowe23 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this passes the GitHub CI, this LGTM ... thanks!

@vedika-saravanan
vedika-saravanan enabled auto-merge (squash) July 14, 2026 00:41
@vedika-saravanan
vedika-saravanan merged commit 6c688b5 into NVIDIA:main Jul 14, 2026
24 checks passed
bmhowe23 added a commit to bmhowe23/cudaqx that referenced this pull request Jul 15, 2026
…ridge branch

Main landed the squashed PR 670 plus NVIDIA#656/NVIDIA#673/NVIDIA#674/NVIDIA#678/NVIDIA#680/NVIDIA#683/NVIDIA#688/
NVIDIA#690/NVIDIA#691/NVIDIA#692.  Resolution keeps this branch's design and ports main's
content into it:

- Naming: main's GpuRoce{Transceiver,Factory,LinkCheck} map 1:1 onto this
  branch's DeviceGraph* files (the de-transport-ing follow-up requested in
  the PR 670 review).  Main's post-review fixes are ported into the
  renamed files: ring-size overflow + host-page-size alignment validation,
  gpu_id resolved from the decoder's cuda_device_id instead of an env var,
  the factory taking pinned_cuda_device, and the linkcheck exercising the
  new factory signature.
- Schema: per-decoder 'dispatch: host|device_graph' plus the top-level
  transport section stay; main's per-decoder 'transport:' key does not
  return.  cuda_device_id is adopted as a per-decoder placement knob
  (config struct + YAML trait), and the hsb script now injects
  'dispatch: device_graph' + cuda_device_id and drives the server with
  QEC_DEVICE_GRAPH_* env and the device_graph READY sentinel.
- Features adopted from main: decoder CUDA-device pinning (worker-thread
  pin via promise, graph-capture pin, hardware_guards.h), per-session
  decode counters + print_session_stats + QEC_DECODING_SERVER_STATS
  server-side stats printing, DecodingServer ctor exception safety,
  virtualized realtime decoder API (NVIDIA#674), CMP0126 fix, CUDA::cudart on
  the core lib, and the cudevice-archive dedup in the server link.
- DecodingSession combines main's set_graph_capture_device with this
  branch's reserved-SMs decode-graph capture
  (QEC_DEVICE_GRAPH_RESERVED_SMS).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Ben Howe <bhowe@nvidia.com>
anjbur added a commit to anjbur/cudaqx that referenced this pull request Jul 16, 2026
This reverts commit 6c688b5.

Signed-off-by: Angela Burton <angelab@nvidia.com>
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