-
Notifications
You must be signed in to change notification settings - Fork 73
Add hardware pinning for QEC decoders #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kvmto
wants to merge
18
commits into
NVIDIA:main
Choose a base branch
from
kvmto:decoder-hardware-pinning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
31f98c5
Add hardware pinning (cuda_device_id/numa_node_id) for QEC decoders
kvmto 2ca48a6
Redesign hardware pinning: base class owns CUDA/NUMA affinity
kvmto 628c10b
feat(qec): hardware-affinity knobs + loud, cudaq-decoupled pinning fo…
kvmto 6069dcb
feat(qec): concurrent multi-decoder pool with per-GPU pinning
kvmto d991724
feat(qec): non-blocking streaming submit for decoder_pool
kvmto 7c2bdac
fix(qec): decouple plugin params from affinity knobs; add pinning sys…
kvmto 71de8f2
Merge remote-tracking branch 'upstream/main' into decoder-hardware-pi…
kvmto 765bc12
test(qec): skip mempolicy assertions where the syscalls are blocked
kvmto dca1f0e
fix(qec): harden hardware-pinning guards and drop decoder_pool
kvmto fd45911
bug bash
kvmto e25478a
fix(qec): merge-readiness hardening for decoder hardware pinning
kvmto 5ea8f0f
test(qec): negative-path and perf-budget coverage for hardware pinning
kvmto f3ab07f
fix(qec): close hardware-pinning coverage gaps across all surfaces
kvmto cc53ef9
refactor(qec): consolidate trt guards onto the shared header; release…
kvmto 08646c7
quick fix of include
kvmto 73cdc8c
Merge remote-tracking branch 'upstream/main' into decoder-hardware-pi…
kvmto 088973e
pinning test fix
kvmto e4760ab
CI + test fix for multi trt testing
kvmto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2025 - 2026 NVIDIA Corporation & Affiliates. * | ||
| * All rights reserved. * | ||
| * * | ||
| * This source code and the accompanying materials are made available under * | ||
| * the terms of the Apache License 2.0 which accompanies this distribution. * | ||
| ******************************************************************************/ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include "cuda-qx/core/heterogeneous_map.h" | ||
| #include <stdexcept> | ||
| #include <string> | ||
|
|
||
| namespace cudaq::qec { | ||
|
|
||
| namespace detail { | ||
| /// Returns -1 if key is absent; throws if stored value is negative. | ||
| /// Handles both int (YAML path) and std::size_t (Python kwargs path) storage. | ||
| inline int read_pin_key(const cudaqx::heterogeneous_map ¶ms, | ||
| const std::string &key) { | ||
| if (!params.contains(key)) | ||
| return -1; | ||
| int value = params.get<int>(key); | ||
| if (value < 0) | ||
| throw std::runtime_error(key + " must be >= 0 (got " + | ||
| std::to_string(value) + ")"); | ||
| return value; | ||
| } | ||
| } // namespace detail | ||
|
|
||
| /// @brief GPU device id for a decoder. -1 = inherit current device (no-op). | ||
| inline int read_cuda_device_id(const cudaqx::heterogeneous_map ¶ms) { | ||
| return detail::read_pin_key(params, "cuda_device_id"); | ||
| } | ||
|
|
||
| /// @brief NUMA node id for a decoder. -1 = no binding. | ||
| inline int read_numa_node_id(const cudaqx::heterogeneous_map ¶ms) { | ||
| return detail::read_pin_key(params, "numa_node_id"); | ||
| } | ||
|
|
||
| } // namespace cudaq::qec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.