Skip to content

Add topology-safe live decoder reconfiguration - #695

Draft
vedika-saravanan wants to merge 8 commits into
NVIDIA:mainfrom
vedika-saravanan:decoding-server-reconfig
Draft

Add topology-safe live decoder reconfiguration#695
vedika-saravanan wants to merge 8 commits into
NVIDIA:mainfrom
vedika-saravanan:decoding-server-reconfig

Conversation

@vedika-saravanan

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

Copy link
Copy Markdown
Collaborator

Summary

Reimplements live decoding-server configuration on top of the current one-ring-per-decoder architecture and runtime bridge providers.

  • Reloads the canonical YAML file on SIGHUP without rebuilding transport providers, endpoints, or rings.
  • Permits host-decoder configuration changes only when decoder IDs, per-ID dispatch shapes, provider configuration, and device-graph entries remain unchanged.
  • Drains in-flight work at the documented between-shots safe point before replacing affected host decoder sessions.
  • Rejects malformed or topology-changing configurations while preserving the active configuration.
  • Returns NOT_READY during reload and when construction of a replacement decoder fails; a later valid reload can recover the unavailable decoder.

Validation

  • Added two-process tests for a host decoder swap, malformed YAML rollback, topology-change rejection, and construction-failure recovery.
  • Added operator documentation for SIGHUP behavior, invariants, and failure semantics.
  • clang-format --dry-run --Werror passed for all changed C++ files.
  • git diff --check passed.

Full CUDA-Q build and test coverage is delegated to GitHub CI because the local environment does not contain CUDA/CUDA-Q.

@vedika-saravanan
vedika-saravanan force-pushed the decoding-server-reconfig branch 4 times, most recently from d471ca8 to faf0d1a Compare July 15, 2026 19:40
@vedika-saravanan vedika-saravanan changed the title unify and extend decoding-server SIGHUP config-apply Add live decoder reconfiguration for decoding_server Jul 15, 2026
@vedika-saravanan vedika-saravanan added the breaking change Change breaks backwards compatibility label Jul 15, 2026
@vedika-saravanan
vedika-saravanan marked this pull request as ready for review July 15, 2026 20:47
@vedika-saravanan vedika-saravanan removed the breaking change Change breaks backwards compatibility label Jul 15, 2026
Comment thread .claude/settings.local.json Outdated
@@ -0,0 +1,7 @@
{

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.

This looks like an accidental checkin that should be removed.

@melody-ren melody-ren 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.

Thanks Vedika! I have some questions about the gpu roce path. See inline comments please~

return 1;
}

cudaq::qec::decoding::config::multi_decoder_config config;

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.

#679 added some nice validation helpers for config. We can call config.validate_custom_args() here to validate it

throw std::runtime_error("duplicate decoder id " +
std::to_string(d.id));
}
} catch (const std::exception &e) {

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.

Later in SessionRegistry.cpp, we check for negative/out of range decoder IDs and mixed transports, which is a bit too late since invalid config should be rejected here before reaching SessionRegistry. I think we can just add those checks here too

config_text << config_file.rdbuf();

ConfigApplyRequest out;
out.yaml = decoder_yaml_from_daemon_yaml(config_text.str());

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.

I understand why the ServerConfig is stripped for the decoders, but what happens if the new config has server setup (e.g, transport is different) than the one currently serving? I think we need to check the server config's content before stripping and compare that to the active server's setting and reject if the transport restart is needed (For GPU RoCE path, I think we do need to reject per the current scope)

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.

Three questions about this:
(1) We removed HOLOLINK_GPU_ID. Not sure we should also remove these hololink env vars for two reasons: they should come from the config and we want to use HSB in names instead. @cketcham2333 ?

(2) The transport level config saved in ServerConfig is stripped before being sent to the factory, which then reads the settings from from_env. We have basically two pathways for configuring gpu_roce. This env might be useful still for internal testing but the primary route, in my opinion, should default to the config coming down the wire and we need some sort of reconciliation if the two disagree. I favor that we remove the env var path entirely though

(3) Related to another comment about transport might be different in the config: the gpu_roce related settings are not checked or reread on SIGHUP since ServerConfig is stripped

@vedika-saravanan
vedika-saravanan force-pushed the decoding-server-reconfig branch from b6f7791 to 56df053 Compare July 28, 2026 18:38
@copy-pr-bot

copy-pr-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
@vedika-saravanan
vedika-saravanan force-pushed the decoding-server-reconfig branch from 56df053 to 04b2d38 Compare July 28, 2026 18:41
@vedika-saravanan vedika-saravanan changed the title Add live decoder reconfiguration for decoding_server Add topology-safe live decoder reconfiguration Jul 28, 2026
@vedika-saravanan

Copy link
Copy Markdown
Collaborator Author

/ok to test 04b2d38

@vedika-saravanan
vedika-saravanan marked this pull request as draft July 28, 2026 19:48
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
Signed-off-by: vedika-saravanan <vsaravanan@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.

3 participants