Skip to content

Commit 7648164

Browse files
authored
[Cherry-Pick][CI] Sync parallelism optimization from dev to 2.5 (#7085) (#7140)
* [Cherry-Pick][CI] Sync parallelism optimization from dev to 2.5 (#7085)
1 parent 5666993 commit 7648164

17 files changed

Lines changed: 377 additions & 92 deletions

.github/workflows/_base_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ jobs:
182182
docker rm -f ${runner_name} || true
183183
fi
184184
185-
docker run --rm --ipc=host --pid=host --net=host \
185+
docker run --rm --net=host \
186+
--shm-size=64g \
187+
--sysctl kernel.msgmax=1048576 \
188+
--sysctl kernel.msgmnb=268435456 \
186189
--name ${runner_name} \
187190
-v $(pwd):/workspace \
188191
-w /workspace \

.github/workflows/_gpu_4cards_case_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ jobs:
166166
docker rm -f ${runner_name} || true
167167
fi
168168
169-
docker run --rm --ipc=host --net=host \
169+
docker run --rm --net=host \
170+
--shm-size=64g \
171+
--sysctl kernel.msgmax=1048576 \
172+
--sysctl kernel.msgmnb=268435456 \
170173
--name ${runner_name} \
171174
-v $(pwd):/workspace -w /workspace \
172175
-v "${CACHE_DIR}/gitconfig:/etc/gitconfig:ro" \

.github/workflows/_logprob_test_linux.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ jobs:
152152
echo "Removing stale container: ${runner_name}"
153153
docker rm -f ${runner_name} || true
154154
fi
155-
docker run --rm --ipc=host --pid=host --net=host \
155+
156+
docker run --rm --net=host \
157+
--shm-size=64g \
158+
--sysctl kernel.msgmax=1048576 \
159+
--sysctl kernel.msgmnb=268435456 \
156160
--name ${runner_name} \
157161
-v $(pwd):/workspace \
158162
-w /workspace \

.github/workflows/_pre_ce_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ jobs:
163163
fi
164164
165165
docker run --rm --net=host \
166+
--shm-size=64G \
166167
--name ${runner_name} \
167168
-v $(pwd):/workspace \
168169
-w /workspace \

.github/workflows/_stable_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ jobs:
160160
fi
161161
162162
docker run --rm --net=host \
163+
--shm-size=64G \
163164
--name ${runner_name} \
164165
-v $(pwd):/workspace \
165166
-w /workspace \

.github/workflows/_unit_test_coverage.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
outputs:
4848
all_cov_file_url: ${{ steps.cov_upload.outputs.all_cov_file_url }}
4949
unittest_failed_url: ${{ steps.cov_upload.outputs.unittest_failed_url }}
50+
unittest_logs_url: ${{ steps.cov_upload.outputs.unittest_logs_url }}
5051
diff_cov_result_json_url: ${{ steps.cov_upload.outputs.diff_cov_result_json_url }}
5152
steps:
5253
- name: Code Prepare
@@ -173,6 +174,8 @@ jobs:
173174
export RDMA_DEVICES=$(find /dev/infiniband/uverbs* -maxdepth 1 -not -type d | xargs -I{} echo '--device {}:{}')
174175
175176
docker run --rm --net=host \
177+
--sysctl kernel.msgmax=1048576 \
178+
--sysctl kernel.msgmnb=268435456 \
176179
--name ${runner_name} \
177180
--cap-add=SYS_PTRACE --cap-add=IPC_LOCK \
178181
--shm-size=64G \
@@ -309,6 +312,15 @@ jobs:
309312
echo "unittest_failed_url=${UNIT_TEST_RESULT_URL}" >> $GITHUB_ENV
310313
fi
311314
315+
# Only upload logs when tests failed
316+
unittest_logs_archive="unittest_logs.tar.gz"
317+
if [ "$HAS_FAILED_TESTS" = true ]; then
318+
python ${push_file} ${unittest_logs_archive} ${target_path}/UnitTestResult
319+
UNIT_TEST_LOGS_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/UnitTestResult/${unittest_logs_archive}
320+
echo "unittest_logs_url=${UNIT_TEST_LOGS_URL}" >> $GITHUB_OUTPUT
321+
echo "unittest_logs_url=${UNIT_TEST_LOGS_URL}" >> $GITHUB_ENV
322+
fi
323+
312324
if [[ "$IS_PR" != "true" ]]; then
313325
full_cov_file="full_coverage_report.txt"
314326
full_cov_csv="full_coverage_report.csv"
@@ -345,6 +357,7 @@ jobs:
345357
if [ -f "${filename}" ];then
346358
echo "Failed test cases:"
347359
cat "${filename}"
360+
echo "unittest_logs_url=${unittest_logs_url}"
348361
fi
349362
exit "$TEST_EXIT_CODE"
350363
fi

0 commit comments

Comments
 (0)