-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reenable compilation tests for P4Smith. #4791
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zzmic
force-pushed
the
compilation-test-support
branch
from
July 9, 2024 17:47
b3cf81e
to
d34f60e
Compare
zzmic
force-pushed
the
compilation-test-support
branch
3 times, most recently
from
July 11, 2024 01:48
d841ca5
to
21561a7
Compare
fruffy
reviewed
Jul 11, 2024
zzmic
force-pushed
the
compilation-test-support
branch
3 times, most recently
from
July 14, 2024 05:33
3b29458
to
1423109
Compare
fruffy
reviewed
Jul 15, 2024
fruffy
reviewed
Jul 15, 2024
fruffy
reviewed
Jul 15, 2024
zzmic
force-pushed
the
compilation-test-support
branch
from
July 16, 2024 19:21
257c5aa
to
889db85
Compare
fruffy
reviewed
Jul 17, 2024
fruffy
reviewed
Jul 18, 2024
zzmic
force-pushed
the
compilation-test-support
branch
2 times, most recently
from
July 23, 2024 05:55
0d4fbea
to
f778c51
Compare
fruffy
reviewed
Jul 24, 2024
zzmic
force-pushed
the
compilation-test-support
branch
2 times, most recently
from
July 25, 2024 03:46
dae791c
to
e7a47c0
Compare
fruffy
requested changes
Jul 25, 2024
fruffy
reviewed
Jul 25, 2024
zzmic
force-pushed
the
compilation-test-support
branch
from
July 26, 2024 03:47
1075a03
to
d8d0fde
Compare
zzmic
force-pushed
the
compilation-test-support
branch
4 times, most recently
from
August 6, 2024 15:40
bf4a750
to
418b981
Compare
fruffy
reviewed
Aug 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Seems like we are almost done. The error is related to the maximum bit-width.
zzmic
force-pushed
the
compilation-test-support
branch
from
August 9, 2024 07:45
50eaced
to
4d79e83
Compare
fruffy
force-pushed
the
compilation-test-support
branch
2 times, most recently
from
August 13, 2024 07:36
9071b41
to
34b6ed5
Compare
zzmic
force-pushed
the
compilation-test-support
branch
from
August 13, 2024 15:10
34b6ed5
to
29739fc
Compare
fruffy
force-pushed
the
compilation-test-support
branch
from
August 20, 2024 10:49
8622d4c
to
e42213e
Compare
fruffy
changed the title
Compilation test support for P4Smith
Reenable compilation tests for P4Smith.
Aug 20, 2024
fruffy
force-pushed
the
compilation-test-support
branch
from
August 20, 2024 11:35
e42213e
to
c4203c4
Compare
Change $TEST_DIR/out.p4 to $TEST_DIR/out_$i.p4 to generate different programs with different seeds (to inspect the behavior of the generation and compilation process in a finer/smaller granularity) Switch the order of --arch and --target Revert the version of backends/p4tools/modules/smith/scripts/compilation-test.sh back to the commit d34f60e, and switch the order of core and generic in backends/p4tools/modules/smith/targets/generic/test/P4Tests.cmake Modify the argument settings for multiple targets and architectures Attempt to make sure that only primitive-type parameters are used when generating the parameter list for the BMv2 portion of the fuzzer Fix the previous erroneous treatment of "bmv2" from archName to deviceName Add TODOs to remind myself to revert `out_$i.p4` back to `out.p4` to avoid dumping too many generated files after the debugging process 1. Instead of adding target-specific check in the target-independent core, preliminarily override the virtual method in the BMv2 backend (still hasn't worked yet) 2. Get rid of and expand the function signature of Refactor the implemented inheritance pattern Clang-format some source file Fix a linter issue Implement a mechanism to maintain a list of "known" bugs and not fail the test if those bugs occur Modify the output-printing mechanism Add another element to `KNOWN_BUGS` Add an echo statement to display the encounted bug using the `is_known_bug` function Modify echo statements Preliminarily add code to generate an approriate return statement for `pna_pre_output_metadata_t` Fix a linter issue Add a TODO to fix the casting bug Make use of `new IR::Type_Name` Hard-code to attempt to resolve the casting issue The current type casting is still erroneous Add commented-out code that doesn't work and add TODOs Fix linter issues Resolve the infinite recursing issue Improve the implementation to be modular (but still doesn't work) Fix some auxillary issues Refine type resolving Refine recursive type resolving Fix the "Arch '<null>' not supported by P4Runtime serializer" error Specify the compiler binary with extentions in the corresponding P4Tests.cmake file instead of the bash script Simplify the constructor Bmv2V1ModelDeclarationGenerator Remove 128 from the accepted bitwidths in the Expression Generator for the dpdk taget Activate `byte_align_headers` to `true` to support bit alignments Add a known bug: `terminate called after throwing an instance of 'Util::CompilerBug'` Modify the previously documented known bug to a fine-grained version Make further attempts to resolve type resolving Resolve a typo made previously Further refine type resolving and remove redundant code Implement explicit casting for `SecurityAssocId_t` for both assignment and return statements Revert the type signature of `genStructListExpr` from `IR::Expression` back to `IR::ListExpression` Revert the type signature of `getTypeByName` from `IR::Type` back to `IR::Type_Declaration` Revert the type signature of `genStructListExpr` from `IR::Expression` back to `IR::ListExpression` Preliminarily modify the previous type resolving/casting mechanism Remove the previous added, redundant `genBitType` with different arguments than the default `genBitType` Add print-outs to address the tuple-wrapping issue Resolve the typing issue of `SecurityAssocId_t` in a more generic way Make the bug documented in `KNOWN_BUGS` more generic Experimentally migrate the `Bmv2V1ModelDeclarationGenerator` class and its constructor and (overridden) member function to declarations.cpp and declarations.h in the `bmv2` target Experimentally migrate the `Bmv2V1ModelDeclarationGenerator` class and its constructor and (overridden) member function to declarations.cpp and declarations.h in the `bmv2` target Fix linter issues from the previous commit(s) Fix the issue caused by erroneously formatting backends/p4tools/modules/smith/targets/bmv2/CMakeLists.txt Set `byte_align_headers` true for the `nic` target Prohibit `128` from being a valid bit size for the `nic` target Document a known bug in the script Fix the previous linter issue(s) Support to generate well-typed parameter lists for the `nic` target Remove the hard-coded rhs-casting(s) of assignment generations Add a TODO (to make the bitwidth a generic parameter) 1. Preliminarily make the bitwidth a generic parameter (by implementing a template function) 2. Document a known bug Revert backends/p4tools/modules/smith/scripts/compilation-test.sh back to its original form since it is cluelessly `clang-format`ed Reactivate the executable permission of backends/p4tools/modules/smith/scripts/compilation-test.sh Preliminarily implement `pna_main_parser_input_metadata_t`'s field generations (although `enum` is not supported right now) Rename the previous `Bmv2V1ModelDeclarationGenerator` class to `Bmv2ModelDeclarationGenerator` and apply it (and its members) to the `psa` arch 1. Add a struct member in the `Constraints` struct to limit the maximum bit width (default value: 128) 2. Set it to 64 for the pna arch, dpdk target Fixups. Signed-off-by: zzmic <100326374+zzmic@users.noreply.github.com> Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
Signed-off-by: fruffy <fruffy@nyu.edu>
fruffy
force-pushed
the
compilation-test-support
branch
from
August 26, 2024 07:59
c4203c4
to
e230835
Compare
fruffy
approved these changes
Aug 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft PR that aims to re-enable
$COMPILER_BIN $TEST_DIR/out.p4
and test whether there is any generation or compilation error occurred while executing backends/p4tools/modules/smith/scripts/compilation-test.sh.