[Nexthop][NPI] "asic_config_v3" part 4 - Add platform configurations#1221
[Nexthop][NPI] "asic_config_v3" part 4 - Add platform configurations#1221marif-nexthop wants to merge 4 commits into
Conversation
d038b30 to
7035a48
Compare
ccdf5ea to
e4ef252
Compare
In this PR, add platform configurations for the four core XGS platforms which were originally generated by `asic_config_v2`: - montblanc - icecube800bc - icecube800banw - wedge800bact After this commit the `asic_config_v3` generator produces four XGS output files which should be identical to the `asic_config_v2` output.
e4ef252 to
e3c765e
Compare
|
Rebased on the latest |
joseph5wu
left a comment
There was a problem hiding this comment.
I didn't see any generated_asic_config files for the four platforms.
Did you forget to git add them
| }, | ||
| "variants": { | ||
| "base": {} | ||
| } |
There was a problem hiding this comment.
Let's keep "default" as the only "default" and retire "base" here.
There was a problem hiding this comment.
I did not add generated files as I assumed the user will generate a fresh copy when they need it (and these are large YAML file) but I see that asic_config_v2 has generated files also under git.
I can add the generated file into git if that is what you prefer.
There was a problem hiding this comment.
Let's keep "default" as the only "default" and retire "base" here.
OK, in that case we'll have to diff asic_config_v2/generated_asic_configs/montblanc_base.yml with asic_config_v3/generated_asic_configs/montblanc_default.yml and so on.
There was a problem hiding this comment.
@marif-nexthop Yeah let's generated the config so that we can tell the difference if someone changes the input json, we can have a better idea of what will it change from the last asic config.
Ideally, I would like to have an automation config(cmake and our internal buck) to generate the asic configs based on these input jsons so we don't need to worry that people forgot to update the generated_asic_configs.
Can you check how does asic_config_v2 handles this auto generate logic to see whether we can do the same for v3.
There was a problem hiding this comment.
Variants are changed from base to default and generated output files are add to git now.
Check in the generated ASIC config YAML for the four platforms added in this PR so the outputs are reviewable alongside their inputs: - icecube800banw_default.yml - icecube800bc_default.yml - montblanc_base.yml - wedge800bact_base.yml
…ault Rename the sole variant of montblanc and wedge800bact from "base" to "default" for consistency with the other platforms. The variant name only affects the output filename, not the generated content: regenerating produces montblanc_default.yml and wedge800bact_default.yml byte-identical to the prior montblanc_base.yml and wedge800bact_base.yml (verified by rebuild + diff).
The generated ASIC config YAML are multi-document streams with complex (dict-valued) mapping keys, which PyYAML cannot load, so the check-yaml pre-commit hook fails on them. They are generated artifacts whose format matches asic_config_v2 output and must not be modified. Exclude the generated_asic_configs dir from check-yaml; the other hooks (trailing-whitespace, end-of-file-fixer, check-json) still apply.
|
@joseph5wu has imported this pull request. If you are a Meta employee, you can view this in D109735092. |
|
@joseph5wu merged this pull request in e05feac. |
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Implements
asic_config_v3design.In this PR, add platform configurations for the four core XGS platforms which were originally generated by
asic_config_v2:After this commit the
asic_config_v3generator produces four XGS output files which should be identical to theasic_config_v2output.Note: After review comments, changed variant name
basetodefault.v2: montblanc_base.yml
v3: montblanc_defaultyml
v2: wedge800bact_base.yml
v3: wedge800bact_default.yml
Test Plan
Ran
fboss/lib/asic_config_v3/run-helper.shto generateasic_config_v3output:The generated output files are byte-identical with
asic_config_v2output
Schema validation also passed for all files
This PR is created on top of
so it contains diff from these PRs. When these PRs will merge, this PR will have a shorter diff.