@@ -15,29 +15,31 @@ jobs:
1515 strategy :
1616 matrix :
1717 arch : [X64, ARM64]
18- image : ["dev-centos7-x86:v2", "dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
18+ image : ["dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
19+ enable_cuda : [0, 1]
1920 exclude :
2021 - arch : X64
2122 image : " dev-centos8-arm:v2"
22- - arch : ARM64
23- image : " dev-centos7-x86:v2"
2423 - arch : ARM64
2524 image : " dev-centos7-cu124:v1"
25+ - arch : ARM64
26+ enable_cuda : 1
2627 runs-on : [self-hosted, Linux, "${{ matrix.arch }}"]
2728 container :
2829 image : registry-1.docker.io/dashinfer/${{ matrix.image }}
2930 env :
3031 # force use node16 instead of node20
3132 # otherwise it may cause GLIBCXX_2.27 not found
32- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
33+ # ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
34+ ENABLE_CUDA : ${{ matrix.enable_cuda }}
3335 defaults :
3436 run :
3537 shell : bash -l {0}
3638 steps :
3739 - name : Check out code
3840 uses : actions/checkout@v3
3941 with :
40- lfs : true
42+ lfs : false
4143
4244 - name : Pull LFS
4345 run : |
@@ -50,32 +52,41 @@ jobs:
5052 git submodule update
5153
5254 - name : Build tgz package
55+ shell : bash
5356 run : |
57+ source /root/.bashrc
58+ if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
59+ source /miniconda/etc/profile.d/conda.sh
60+ fi
61+ source activate ds_py
62+
5463 git fetch --tags
5564 TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
5665 VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
57- source /root/.bashrc
5866
5967 export AS_RELEASE_VERSION=$VERSION_NUMBER
6068 export AS_BUILD_PACKAGE=ON
6169
62- if command -v nvcc &> /dev/null
63- then
64- export AS_PLATFORM="cuda"
65- export AS_CUDA_SM="'70;75;80;86;89;90a'"
66- bash scripts/release/cpp_build_cuda.sh
70+ echo "ENABLE_CUDA value: $ENABLE_CUDA"
71+
72+ # export ENABLE_MULTINUMA="ON"
73+ if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
74+ export AS_PLATFORM="armclang"
75+ bash build.sh
6776 else
68- # export ENABLE_MULTINUMA="ON"
69- if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
70- export AS_PLATFORM="armclang"
77+ if [ "$ENABLE_CUDA" -eq "1" ];
78+ then
79+ export AS_PLATFORM="cuda"
80+ export AS_CUDA_SM="'70;75;80;86;89;90a'"
81+ bash scripts/release/cpp_build_cuda.sh
7182 else
7283 export AS_PLATFORM="x86"
84+ bash build.sh
7385 fi
74- bash build.sh
7586 fi
76-
87+
7788 - name : Upload tgz package
78- uses : actions/upload-artifact@v3
89+ uses : actions/upload-artifact@v4
7990 with :
8091 name : dashinfer-tgz-${{ matrix.arch }}
8192 path : build/*.tar.gz
@@ -85,26 +96,28 @@ jobs:
8596 strategy :
8697 matrix :
8798 arch : [X64, ARM64]
88- image : ["dev-centos7-x86:v2", "dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
99+ image : ["dev-centos7-cu124:v1", "dev-centos8-arm:v2"]
100+ enable_cuda : [0, 1]
89101 exclude :
90102 - arch : X64
91103 image : " dev-centos8-arm:v2"
92- - arch : ARM64
93- image : " dev-centos7-x86:v2"
94104 - arch : ARM64
95105 image : " dev-centos7-cu124:v1"
106+ - arch : ARM64
107+ enable_cuda : 1
96108 runs-on : [self-hosted, Linux, "${{ matrix.arch }}"]
97109 container :
98110 image : registry-1.docker.io/dashinfer/${{ matrix.image }}
99111 env :
100112 # force use node16 instead of node20
101113 # otherwise it may cause GLIBCXX_2.27 not found
102- ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION : true
114+ # ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
115+ ENABLE_CUDA : ${{ matrix.enable_cuda }}
103116 steps :
104117 - name : Check out code
105118 uses : actions/checkout@v3
106119 with :
107- lfs : true
120+ lfs : false
108121
109122 - name : Pull LFS
110123 run : |
@@ -117,59 +130,39 @@ jobs:
117130 git submodule update
118131
119132 - name : Build manylinux wheels
133+ shell : bash
120134 run : |
135+ source /root/.bashrc
136+ if [ -f "/miniconda/etc/profile.d/conda.sh" ]; then
137+ source /miniconda/etc/profile.d/conda.sh
138+ fi
139+
121140 git fetch --tags
122141 TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
123- source /root/.bashrc
124142 VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
143+
125144 export AS_RELEASE_VERSION=$VERSION_NUMBER
126145
127- if command -v nvcc &> /dev/null
128- then
129- export AS_CUDA_SM="'70;75;80;86;89;90a'"
130- bash scripts/release/python_manylinux_build_cuda.sh
131- else
146+ echo "ENABLE_CUDA value: $ENABLE_CUDA"
147+
148+ if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
132149 bash scripts/release/python_manylinux_build.sh
150+ else
151+ if [ "$ENABLE_CUDA" -eq "1" ];
152+ then
153+ export AS_PLATFORM="cuda"
154+ export AS_CUDA_SM="'70;75;80;86;89;90a'"
155+ bash scripts/release/python_manylinux_build_cuda.sh
156+ else
157+ bash scripts/release/python_manylinux_build.sh
158+ fi
133159 fi
134160
135161 - name : Upload wheels
136- uses : actions/upload-artifact@v3
162+ uses : actions/upload-artifact@v4
137163 with :
138164 name : python-manylinux-wheels-${{ matrix.arch }}
139165 path : python/wheelhouse/*-manylinux*.whl
140-
141- # test:
142- # strategy:
143- # matrix:
144- # arch: [X64, ARM64]
145- # image: ["test-ubuntu-x86:v1", "test-centos-arm:v1"]
146- # exclude:
147- # - arch: X64
148- # image: "test-centos-arm:v1"
149- # - arch: ARM64
150- # image: "test-ubuntu-x86:v1"
151- # runs-on: [self-hosted, Linux, "${{ matrix.arch }}"]
152- # container:
153- # image: registry-1.docker.io/dashinfer/${{ matrix.image }}
154- # volumes:
155- # - /mnt/data0/models/modelscope:/github/home/.cache/modelscope
156- # options: "--ipc=host --cap-add SYS_NICE --cap-add SYS_PTRACE"
157- # needs: build-wheels
158- # steps:
159- # - name: Check out code
160- # uses: actions/checkout@v3
161-
162- # - name: Download wheels
163- # uses: actions/download-artifact@v3
164- # with:
165- # name: python-manylinux-wheels-${{ matrix.arch }}
166- # path: python/wheelhouse
167-
168- # - name: Test manylinux wheels
169- # run: |
170- # TAG_NAME=$(git describe --tags $(git rev-list --tags --max-count=1))
171- # VERSION_NUMBER=$(echo "$TAG_NAME" | sed 's/^v//')
172- # AS_RELEASE_VERSION=$VERSION_NUMBER bash scripts/release/python_manylinux_test.sh
173166
174167 publish :
175168 runs-on : [self-hosted, Linux]
0 commit comments