feat(config): add typed event runtime options#355
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This adds support for configuring max_genstep through the app config and applies it to runtime event configuration. This enables controlling genstep allocation limits through configuration instead of hardcoded behavior, making debug and stress setups easier to tune.
0cc1b15 to
26a7d64
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the application-level configuration layer (gphox::Config) to support additional event runtime options (max gensteps, lite storage mode, merge mode) and centralizes string-to-enum parsing via a shared named-enum reader, then synchronizes these settings into SEventConfig in Config::Apply().
Changes:
- Added
event.max_genstepto config/state and applied it viaSEventConfig::SetMaxGenstep. - Introduced typed
ModeLite/ModeMergeenums and correspondingevent.mode_lite/event.mode_mergestring config options, applied conditionally. - Reworked string-valued enum config parsing with a shared named-enum reader and reused it for
event.mode,torch.gentype, andtorch.type(now rejecting invalidtorch.typevalues with a clear error).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
sysrap/config.h |
Adds ModeLite/ModeMerge enums and new Config fields (max_genstep, mode_lite, mode_merge) aligned with event runtime options. |
sysrap/config.cpp |
Implements a generic named-enum reader, updates config parsing for event/torch enum-like fields, and applies new options to SEventConfig. |
config/dev.json |
Adds event.max_genstep, event.mode_lite, and event.mode_merge keys and keeps ordering consistent with Config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
event.max_genstepto app config and apply it throughSEventConfig::SetMaxGenstep.event.mode_liteandevent.mode_mergeoptions with typedModeLite/ModeMergeenums.event.mode,event.mode_lite,event.mode_merge,torch.gentype, andtorch.type.config/dev.jsonandConfig.Behavior
mode_liteandmode_mergeuse string names such as"Unspecified","Lite", and"Merged"instead of numeric values.torch.gentyperemains restricted to"TORCH".torch.typevalues now fail with a clear config error instead of silently becomingT_UNDEF.