Skip to content

Commit 32d5437

Browse files
jia-rundongjiarundong
andauthored
Add CI to test args -a deepep (#84)
* add build args * add build args * add build args * add build args * add build args * Update pr-test-npu.yml * Update pr-test-npu.yml * Update pr-test-npu.yml --------- Co-authored-by: jiarundong <[email protected]>
1 parent 5d0d8a3 commit 32d5437

File tree

3 files changed

+52
-13
lines changed

3 files changed

+52
-13
lines changed

.github/workflows/pr-test-npu.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
cancel-in-progress: true
1818

1919
jobs:
20-
test-low-latency:
20+
test-all-build:
2121
if: (github.repository == 'sgl-project/sgl-kernel-npu' || github.event_name == 'pull_request') &&
2222
github.event.pull_request.draft == false
2323
runs-on: linux-aarch64-a3-16
@@ -51,14 +51,21 @@ jobs:
5151
- name: Prepare Deepep
5252
run: bash scripts/prepare_deepep_in_container.sh
5353

54-
- name: Run test
54+
- name: Run test intranode
5555
timeout-minutes: 10
5656
env:
57-
HCCL_BUFFSIZE: 2000
57+
HCCL_BUFFSIZE: 2239
58+
run: |
59+
python3 $GITHUB_WORKSPACE/tests/python/deepep/test_intranode.py
60+
61+
- name: Run test low latency
62+
timeout-minutes: 10
63+
env:
64+
HCCL_BUFFSIZE: 1913
5865
run: |
5966
python3 $GITHUB_WORKSPACE/tests/python/deepep/test_low_latency.py
6067
61-
test-intranode:
68+
test-build-deepep:
6269
if: (github.repository == 'sgl-project/sgl-kernel-npu' || github.event_name == 'pull_request') &&
6370
github.event.pull_request.draft == false
6471
runs-on: linux-aarch64-a3-16
@@ -90,20 +97,27 @@ jobs:
9097
bash scripts/npu_ci_install_dependency.sh
9198
9299
- name: Prepare Deepep
93-
run: bash scripts/prepare_deepep_in_container.sh
100+
run: bash scripts/prepare_deepep_in_container.sh -a deepep
94101

95-
- name: Run test
102+
- name: Run test intranode
96103
timeout-minutes: 10
97104
env:
98-
HCCL_BUFFSIZE: 3000
105+
HCCL_BUFFSIZE: 2239
99106
run: |
100107
python3 $GITHUB_WORKSPACE/tests/python/deepep/test_intranode.py
101108
109+
- name: Run test low latency
110+
timeout-minutes: 10
111+
env:
112+
HCCL_BUFFSIZE: 1913
113+
run: |
114+
python3 $GITHUB_WORKSPACE/tests/python/deepep/test_low_latency.py
115+
102116
finish:
103117
if: always()
104118
needs:
105-
- test-low-latency
106-
- test-intranode
119+
- test-all-build
120+
- test-build-deepep
107121
runs-on: ubuntu-latest
108122
steps:
109123
- name: Check all dependent job statuses

build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ while getopts ":a:h" opt; do
4242
esac
4343
;;
4444
h )
45-
echo "Use ./build.sh build all modules.\n"
45+
echo "Use './build.sh' build all modules."
4646
echo "Use './build.sh -a <target>' to build specific parts of the project."
47-
echo " <target> can be: all, deepep, kernels, deepep-adapter, deepep-kernels"
47+
echo " <target> can be:"
4848
echo " deepep Only build deep_ep."
4949
echo " kernels Only build sgl_kernel_npu."
5050
echo " deepep-adapter Only build deepep adapter layer and use old build of deepep kernels."
@@ -54,10 +54,12 @@ while getopts ":a:h" opt; do
5454
;;
5555
\? )
5656
echo "Error: unknown flag: -$OPTARG" 1>&2
57+
echo "Run './build.sh -h' for more information."
5758
exit 1
5859
;;
5960
: )
6061
echo "Error: -$OPTARG requires a value" 1>&2
62+
echo "Run './build.sh -h' for more information."
6163
exit 1
6264
;;
6365
esac
@@ -90,7 +92,7 @@ COMPILE_OPTIONS=""
9092
function build_kernels()
9193
{
9294
if [[ "$ONLY_BUILD_DEEPEP_KERNELs_MODULE" == "ON" ]]; then return 0; fi
93-
if [[ "$BUILD_KERNELS_MODULE" != "ON" ]]; then return 0; fi
95+
if [[ "$ONLY_BUILD_MEMORY_SAVER_MODULE" == "ON" ]]; then return 0; fi
9496

9597
CMAKE_DIR=""
9698
BUILD_DIR="build"
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
1+
2+
while getopts ":a:" opt; do
3+
case ${opt} in
4+
a )
5+
BUILD_ARGS="$OPTARG"
6+
;;
7+
\? )
8+
echo "Error: unknown flag: -$OPTARG" 1>&2
9+
exit 1
10+
;;
11+
: )
12+
echo "Error: -$OPTARG requires a value" 1>&2
13+
exit 1
14+
;;
15+
esac
16+
done
17+
18+
shift $((OPTIND -1))
19+
120
cd ${GITHUB_WORKSPACE}
2-
bash build.sh
21+
if [ -n "$BUILD_ARGS" ]; then
22+
bash build.sh -a "$BUILD_ARGS"
23+
else
24+
bash build.sh
25+
fi
326
pip install ${GITHUB_WORKSPACE}/output/deep_ep*.whl --no-cache-dir
427
cd "$(pip show deep-ep | awk '/^Location:/ {print $2}')"
528
ln -s deep_ep/deep_ep_cpp*.so || true

0 commit comments

Comments
 (0)