Skip to content

Add QPU device_call host-dispatch path for realtime QEC decoding#618

Draft
vedika-saravanan wants to merge 1 commit into
NVIDIA:mainfrom
vedika-saravanan:qpu-device-call-shmem-decoder
Draft

Add QPU device_call host-dispatch path for realtime QEC decoding#618
vedika-saravanan wants to merge 1 commit into
NVIDIA:mainfrom
vedika-saravanan:qpu-device-call-shmem-decoder

Conversation

@vedika-saravanan

@vedika-saravanan vedika-saravanan commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds a CUDA-Q device_call host-dispatch path for realtime QEC decoding.

The new path allows a lowered QPU kernel call to invoke QEC decoder operations through CUDA-Q's --cudaq-device-call=host-dispatch runtime. The HOST_CALL handlers forward into the existing CUDA-QX realtime decoder host API, enabling an end-to-end QPU-kernel-to-decoder flow for CPU decoders such as vanilla PyMatching.

Changes include:

  • Add cudaq-qec-realtime-decoding-host-dispatch, a DeviceCallService plugin for QEC realtime decoder calls.
  • Add QPU-side wrappers for enqueue_syndromes, get_corrections, and reset_decoder using cudaq::device_call(0, ...).
  • Register HOST_CALL entries for packed uint64_t enqueue/get/reset decoder RPCs.
  • Add an end-to-end PyMatching test that runs a QPU kernel, enqueues syndromes, retrieves corrections, and verifies reset behavior through host-dispatch.
  • Wire the new optional target/test behind CUDA-Q realtime/device_call availability.

Runtime / performance impact

N/A for existing paths. The new host-dispatch target is optional and only built when CUDA-Q realtime/device_call dependencies are available.

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.
  • Tests fail if the new functionality is broken (including crashes), not
    just when it is missing.
  • Negative tests added where exceptions are expected.
  • Truth data added where simple EXPECT_* / assert checks are
    insufficient for algorithmic correctness.
  • CI runtime impact considered; team notified if significant.

Documentation

  • Public-facing APIs have Doxygen docs.
  • User-visible behavior changes have public docs, or a follow-up is
    tracked.
    Docs: N/A. This PR adds internal host-dispatch wiring and an integration test; it does not introduce a new public API or documented user workflow.

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.

@vedika-saravanan vedika-saravanan changed the title Added a new HOST_CALL-backed device-call path QPU device_call HOST_CALL follow-up Jun 17, 2026
@vedika-saravanan vedika-saravanan changed the title QPU device_call HOST_CALL follow-up Add QPU device_call host-dispatch path for realtime QEC decoding Jun 17, 2026
@vedika-saravanan vedika-saravanan force-pushed the qpu-device-call-shmem-decoder branch 5 times, most recently from 234f516 to 0d73f27 Compare June 17, 2026 02:51
…ching QPU test

Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
@vedika-saravanan vedika-saravanan force-pushed the qpu-device-call-shmem-decoder branch from 0d73f27 to aef3222 Compare June 17, 2026 02:52
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