Skip to content

[Nexthop][NPI] "asic_config_v3" - support generating a single platform#1346

Open
marif-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-output-1-platform
Open

[Nexthop][NPI] "asic_config_v3" - support generating a single platform#1346
marif-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-output-1-platform

Conversation

@marif-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

Implements asic_config_v3 design.

Add an optional --platform <name> flag to the asic_config_v3 generator so a single platform's variants can be regenerated on their own. With no flag, behavior is unchanged: all discovered platforms are generated.

The executable entry point (MAIN_MODULE in cmake/AsicConfigV3ConfigCli.cmake) is switched from gen:generate_all_asic_configs to a new gen:main that parses the flag. Single-platform mode only clears that platform's own outputs (<platform>_*), leaving other platforms' generated YAML untouched.

Test Plan

Built and ran fboss/lib/asic_config_v3/run-helper.sh in the build container:

  • No flag: generates all discovered platforms (behavior unchanged).
  • --platform montblanc: regenerates only montblanc_*.yml; other platforms' outputs are left untouched and byte-identical.
  • --platform bogus: exits non-zero with a ValueError listing the available platforms.
Add an optional `--platform <name>` flag to the `asic_config_v3`
generator so a single platform's variants can be regenerated on their
own. With no flag, behavior is unchanged: all discovered platforms are
generated.

The executable entry point (`MAIN_MODULE`) is switched from
`gen:generate_all_asic_configs` to a new `gen:main` that parses the flag.
Single-platform mode only clears that platform's own outputs
(`<platform>_*`), leaving other platforms' generated YAML untouched.
@meta-cla meta-cla Bot added the CLA Signed label Jun 30, 2026
@marif-nexthop marif-nexthop marked this pull request as ready for review June 30, 2026 00:37
@marif-nexthop marif-nexthop requested review from a team as code owners June 30, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant