-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Compile_vs_Runtime Check Specification(English)
Specification summary::
- Section 1, Background
- Section 2, Details of The Specification
- Section 3, Instructions of CI
- Section 4, Suggestions Of Check Failure
- Section 5, Verify Meeting the Specification
Supplementary Note:
You may find some aspects that are not taken into account in the existing specifications, which need to be continuously supplemented and improved during the implementation process. Please feel free to give your feedback.
Each op will execute infershape() twice in compile time and runtime. In order to ensure the consistency of information, the compile_vs_runtime check method is added to the op test in this specification. At present, it mainly checks whether the lod_level of compile time and runtime is consistent when the output is lodsensor. In this specification, incremental check is added to CI. Except for special cases, each op’s unit test can not skip compile_vs_runtime check.
In Op's unit test, all cases that inherit OpTest need to call the compile_vs_runtime check method automatically.
special cases:
You can exempt it by describing the reason for skipping compile_vs_runtime check and add it to whitelist COMPILE_RUN_OP_WHITE_LIST
.
White list location: python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py
- When the white list file
compile_vs_runtime_white_list.py
is modified, CI incremental detection will be triggered, you need to describe the reason for skipping compile_vs_runtime check and ask for specific personnel to review
When the check fails, you can modify unit test by referring to the following suggestions:
- Lod level need to be set in
Op->InferShape()
.Please refer to pr.
- Delete the op from
COMPILE_RUN_OP_WHITE_LIST
in python/paddle/fluid/tests/unittests/white_list/compile_vs_runtime_white_list.py - Push your code to paddlepaddle.
- If it passes the CI check, the op test meets the specification.
- If it raise errors for not meet the standard error threshold, you should modify the op test again according to "4. Suggestions for CI Check Failure".
If you encounter other problems, please contact @DannyIsFunny