Skip to content

[Nexthop][NPI] "asic_config_v3" part 1 - basic skeleton#1198

Open
marif-nexthop wants to merge 6 commits into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-1
Open

[Nexthop][NPI] "asic_config_v3" part 1 - basic skeleton#1198
marif-nexthop wants to merge 6 commits into
facebook:mainfrom
nexthop-ai:marif.fboss-asic-config-v3-1

Conversation

@marif-nexthop
Copy link
Copy Markdown
Contributor

@marif-nexthop marif-nexthop commented May 14, 2026

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 fboss/lib/asic_config_v3/ Python package skeleton along with a fully defined CMake build target. This creates the basic infra of the data-driven ASIC config generator (asic_config_v3) that will replace the code-driven asic_config_v2 path.

The gen.py entry point is included with an empty _GENERATOR_REGISTRY so the fboss-asic-config-v3-gen target is buildable immediately; registry entries for concrete ASIC families will be added in follow-up commits.

Test Plan

Ran fboss/lib/asic_config_v3/run-helper.sh.

Note: fboss/lib/asic_config_v3/run-helper.sh will not generate any output until "asic_config_v3" part 4 PR.


This PR is created on top of #1149 , so it contains diff from it too. When #1149 merges, this PR will have shorter diff.

add_fb_thrift_python_executable (and any add_fb_python_executable call
with TYPE dir) produces a directory whose cmake target name is suffixed
with .GEN_PY_EXE. Strip that suffix when computing the on-disk output
path, and invoke directory outputs via python3 so __main__.py runs.
Non-python targets (e.g. fboss-bspmapping-gen) continue to exec directly.
cmake/AsicConfigV2ConfigCli.cmake uses add_fb_thrift_python_executable,
which registers the cmake target with a .GEN_PY_EXE suffix. Pass the
suffixed name so build can find it; run-helper.py strips the suffix
when locating the on-disk output.
Callers can now pass a JSON object of additional cmake defines which is
merged over the hardcoded {CMAKE_BUILD_TYPE, CMAKE_CXX_STANDARD} defaults.
Caller keys win on conflict. Existing callers that do not pass the flag
are unaffected.
range-v3's test suite fails to compile under clang's -Werror,-Wnrvo.
Disable it at the cmake level via --extra-cmake-defines.
Implements the design described in "[Data-Driven asic_config_v3
Design](https://docs.google.com/document/d/1yJ1IHX06IOnv5hznau2hdGvtvjvZwPGRsQT2Ft-y3_g/edit?pli=1&tab=t.yk03mogkzncz)"
document (approved by Meta for phase 1).

Add `fboss/lib/asic_config_v3/` Python package skeleton along
with a fully defined CMake build target. This creates the basic infra of
the data-driven ASIC config generator (`asic_config_v3`) that will
replace the code-driven
`asic_config_v2` path.

The `gen.py` entry point is included with an empty `_GENERATOR_REGISTRY`
so
the `fboss-asic-config-v3-gen` target is buildable immediately; registry
entries for concrete ASIC families will be added in follow-up commits.

Ran `fboss/lib/asic_config_v3/run-helper.sh`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant