-
Notifications
You must be signed in to change notification settings - Fork 96
[API Compatibility] Change compatibility apis to ChangePrefixMatcher, inject paddle.enable_compat(), fix test environment context pollution -part #895
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
Open
Manfredss
wants to merge
37
commits into
PaddlePaddle:master
Choose a base branch
from
Manfredss:patch_compat
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
321f32b
change for enable_compat
Manfredss 9bf7bfb
add two left api
Manfredss 204c7a1
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss edb4042
[API Compatibility] inject enable_compat(level=2) so prefix-converted…
Manfredss 1ff4284
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss 020ce44
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss e584efa
[API Compatibility] refine enable_compat injection; activate compat r…
Manfredss bfff52a
Merge branch 'patch_compat' of https://github.com/manfredss/paconvert…
Manfredss 3dcd2a1
update ChangePrefixMatcher for those can passed under enable_compat(l…
Manfredss 81a3c07
ChangePrefixMatcher for BatchNorm1d/2d/3d
Manfredss 8170d4f
[API Compatibility] fix softmin/allclose/sort matchers under enable_c…
Manfredss f04bbf3
fix code conversion mis-alignment
Manfredss 9bef7f9
Merge upstream master into patch_compat
Manfredss 838a8a5
restore test script
Manfredss f7e1c04
update min-mode consistency baselines
Manfredss 5fe7de1
fix default-mode consistency: dedupe injected imports, update baselines
Manfredss 14d8aeb
Simplify ImportTransformer.visit_Module to insert paddle imports and …
Manfredss e0808c4
Merge branch 'patch_compat' of https://github.com/manfredss/paconvert…
Manfredss 6bd002d
paddle_package == paddle and add once
Manfredss f8f344a
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss 961af0c
update after paddle changed
Manfredss d8f6e9d
fix
Manfredss 62739d7
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss 7bb47d1
improve
Manfredss 67be297
AvgPool1/2/3d, BatchNorm1/2/3d, MultiheadAttention, Tensor.split to C…
Manfredss 1f774a4
Merge branch 'master' of https://github.com/paddlepaddle/paconvert in…
Manfredss 9c52c23
fix
Manfredss e39b042
add fix for split, to help distinguish from string split() and Tensor…
Manfredss 8ee2f99
fix
Manfredss 22d59d6
delete same conversion param for nn.functional.softmin
Manfredss 7f11a54
enhance three Tensor api tests, enhance Categorical tests, and PReLU …
Manfredss 5362b97
still fix split typo
Manfredss 1f99f24
clean
Manfredss d9a9a74
split root cause
Manfredss 5cd351e
fix
Manfredss 770552a
add reason for check_value=False
Manfredss 38925e2
fix backslash
Manfredss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,40 +39,40 @@ echo '************************************************************************** | |
| echo "Checking code gpu unit test by pytest ..." | ||
| set +e | ||
|
|
||
| ISOLATED_TESTS=( | ||
| tests/test_cuda_stream.py | ||
| tests/test_cuda_CUDAGraph.py | ||
| tests/test_cuda_set_stream.py | ||
| tests/test_set_num_interop_threads.py | ||
| ) | ||
|
|
||
| PYTEST_IGNORE=( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里分两批跑,第一次跑特定名单,第二次跑其他的 |
||
| --ignore=tests/test_hub_download_url_to_file.py | ||
| --ignore=tests/test_hub_help.py | ||
| --ignore=tests/test_hub_list.py | ||
| --ignore=tests/test_hub_load.py | ||
| --ignore=tests/test_hub_load_state_dict_from_url.py | ||
| ) | ||
| for test_file in "${ISOLATED_TESTS[@]}"; do | ||
| PYTEST_IGNORE+=(--ignore="${test_file}") | ||
| done | ||
|
|
||
| # Run test_cuda_stream.py separately and FIRST (GPU state is clean), | ||
| # as it can segfault when run after other GPU tests (Paddle FullKernel issue). | ||
| # Running in isolation prevents the segfault from killing the entire test batch. | ||
| python -m pytest -v -s -p no:warnings tests/test_cuda_stream.py 2>&1 | tee pytest.log | ||
| stream_exit=${PIPESTATUS[0]} | ||
| python -m pytest -v -s -p no:warnings "${ISOLATED_TESTS[@]}" \ | ||
| -n 1 --reruns=3 2>&1 | tee pytest.log | ||
| isolated_errors=${PIPESTATUS[0]} | ||
|
|
||
| # Run test_cuda_CUDAGraph.py in its own process as well: CUDA graph | ||
| # capture/replay leaves Paddle GPU state that can natively crash later | ||
| # AMP tests (e.g. test_cuda_amp_GradScaler) in the same pytest worker. | ||
| python -m pytest -v -s -p no:warnings tests/test_cuda_CUDAGraph.py 2>&1 | tee -a pytest.log | ||
| cudagraph_exit=${PIPESTATUS[0]} | ||
|
|
||
| python -m pytest -v -s -p no:warnings "${PYTEST_IGNORE[@]}" --ignore=tests/test_cuda_stream.py --ignore=tests/test_cuda_CUDAGraph.py -n 1 --reruns=3 ./tests 2>&1 | tee -a pytest.log | ||
| python -m pytest -v -s -p no:warnings "${PYTEST_IGNORE[@]}" \ | ||
| -n 1 --reruns=3 ./tests 2>&1 | tee -a pytest.log | ||
| check_errors=${PIPESTATUS[0]} | ||
| if [ ${check_errors} -ne 0 ]; then | ||
| echo "Rerun GPU unit test" | ||
| python -m pytest -v -s -p no:warnings "${PYTEST_IGNORE[@]}" --ignore=tests/test_cuda_stream.py --ignore=tests/test_cuda_CUDAGraph.py -n 1 --lf ./tests 2>&1 | tee -a pytest.log | ||
| python -m pytest -v -s -p no:warnings "${PYTEST_IGNORE[@]}" \ | ||
| -n 1 --lf ./tests 2>&1 | tee -a pytest.log | ||
| check_errors=${PIPESTATUS[0]} | ||
| fi | ||
|
|
||
| # Propagate isolated test failures if any | ||
| if [ ${stream_exit} -ne 0 ]; then | ||
| check_errors=${stream_exit} | ||
| fi | ||
| if [ ${cudagraph_exit} -ne 0 ]; then | ||
| check_errors=${cudagraph_exit} | ||
| if [ ${isolated_errors} -ne 0 ]; then | ||
| check_errors=${isolated_errors} | ||
| fi | ||
|
|
||
| echo '******************************************************************************' | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
这个又是有啥bug不修吗