Skip to content

Commit b69a6fa

Browse files
committed
Build and publish wheels for CUDA 11.x and 12.x
1 parent 04fe5f0 commit b69a6fa

File tree

2 files changed

+53
-4
lines changed

2 files changed

+53
-4
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
- name: Run Python unit tests
9090
run: pytest python
9191

92-
build-macos-cpu:
92+
build-macos:
9393
strategy:
9494
matrix:
9595
cxx: [clang++, g++-12]
@@ -135,6 +135,54 @@ jobs:
135135
run: ctest
136136
working-directory: build
137137

138+
build-wheels-cuda11x:
139+
runs-on: ubuntu-22.04
140+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
141+
steps:
142+
- uses: actions/checkout@v3
143+
with:
144+
submodules: true
145+
- name: Build wheels
146+
uses: joerick/[email protected]
147+
env:
148+
CIBW_BUILD: cp3*-manylinux_x86_64
149+
CIBW_BEFORE_ALL_LINUX: >
150+
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo &&
151+
yum install -y cuda-compiler-11-8 libcublas-devel-11-8 cuda-cudart-devel-11-8 cuda-driver-devel-11-8
152+
CIBW_TEST_SKIP: "*"
153+
CIBW_ENVIRONMENT: >
154+
CMAKE_ARGS='-DKEDM_ENABLE_GPU=ON -DKokkos_ARCH_VOLTA70=ON'
155+
PATH=/usr/local/cuda/bin:$PATH
156+
KEDM_PACKAGE_NAME=kedm-cuda11x
157+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} --exclude libcublas.so.11 --exclude libcublasLt.so.11 --exclude libcuda.so.1 {wheel}
158+
- uses: actions/upload-artifact@v3
159+
with:
160+
path: ./wheelhouse/*.whl
161+
162+
build-wheels-cuda12x:
163+
runs-on: ubuntu-22.04
164+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
165+
steps:
166+
- uses: actions/checkout@v3
167+
with:
168+
submodules: true
169+
- name: Build wheels
170+
uses: joerick/[email protected]
171+
env:
172+
CIBW_BUILD: cp3*-manylinux_x86_64
173+
CIBW_BEFORE_ALL_LINUX: >
174+
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo &&
175+
yum install -y cuda-compiler-12-2 libcublas-devel-12-2 cuda-cudart-devel-12-2 cuda-driver-devel-12-2
176+
CIBW_TEST_SKIP: "*"
177+
CIBW_ENVIRONMENT: >
178+
CMAKE_ARGS='-DKEDM_ENABLE_GPU=ON -DKokkos_ARCH_VOLTA70=ON'
179+
PATH=/usr/local/cuda/bin:$PATH
180+
KEDM_PACKAGE_NAME=kedm-cuda12x
181+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} --exclude libcublas.so.12 --exclude libcublasLt.so.12 --exclude libcuda.so.1 {wheel}
182+
- uses: actions/upload-artifact@v3
183+
with:
184+
path: ./wheelhouse/*.whl
185+
138186
build-wheels:
139187
strategy:
140188
matrix:
@@ -147,7 +195,7 @@ jobs:
147195
with:
148196
submodules: true
149197
- name: Build wheels
150-
uses: joerick/cibuildwheel@v2.12.0
198+
uses: joerick/cibuildwheel@v2.14.0
151199
env:
152200
CIBW_BUILD: cp3*-manylinux_x86_64 cp3*-macosx*
153201
CIBW_ARCHS_MACOS: x86_64 arm64
@@ -163,7 +211,7 @@ jobs:
163211
path: ./wheelhouse/*.whl
164212

165213
publish-wheels:
166-
needs: [build-wheels]
214+
needs: [build-wheels, build-wheels-cuda11x, build-wheels-cuda12x]
167215
runs-on: ubuntu-latest
168216
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
169217
steps:

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import platform
23

34
from skbuild import setup
@@ -25,7 +26,7 @@
2526
]
2627

2728
setup(
28-
name="kedm",
29+
name=os.environ.get("KEDM_PACKAGE_NAME", "kedm"),
2930

3031
version=versioneer.get_version(),
3132
cmdclass=versioneer.get_cmdclass(),

0 commit comments

Comments
 (0)