Skip to content

Commit 6c4b4e6

Browse files
committed
split CI
Differential Revision: [D83884590](https://our.internmc.facebook.com/intern/diff/D83884590/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D83884590/)! ghstack-source-id: 314025408 Pull Request resolved: #1429
1 parent e5ca0a9 commit 6c4b4e6

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/test-gpu-python.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,33 @@ jobs:
5252
# pyre currently does not check these assertions
5353
pyright python/tests/test_python_actors.py
5454
55-
# Run GPU Python tests
56-
LC_ALL=C pytest python/tests/ -s -v -m "not oss_skip"
55+
# Run GPU Python tests split into 10 groups sequentially
56+
# Each group runs separately with process cleanup in between
57+
pip install pytest-split
58+
for GROUP in {1..10}; do
59+
echo "Running test group $GROUP of 10..."
60+
61+
# Kill any existing Python processes to ensure clean state
62+
echo "Cleaning up Python processes before group $GROUP..."
63+
pkill -9 python || true
64+
pkill -9 pytest || true
65+
66+
# Wait a moment for processes to terminate
67+
sleep 2
68+
69+
# Run tests for this group
70+
LC_ALL=C pytest python/tests/ -s -v -m "not oss_skip" \
71+
--dist=no \
72+
--group=$GROUP \
73+
--splits=10 || {
74+
echo "Test group $GROUP failed with exit code $?"
75+
exit 1
76+
}
77+
78+
echo "Completed test group $GROUP of 10"
79+
done
80+
81+
echo "All test groups completed successfully!"
5782
# TODO(meriksen): temporarily disabled to unblock lands while debugging
5883
# mock CUDA issues on the OSS setup
5984
# python python/tests/test_mock_cuda.py

0 commit comments

Comments
 (0)