Skip to content

Commit bbbe6c1

Browse files
authored
Merge pull request #76 from keichi/add-cuda13-wheel
Add CUDA 13 wheel build
2 parents 2ffcf12 + 963b2fb commit bbbe6c1

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed

.github/workflows/main.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,41 @@ jobs:
145145
yum install -y cuda-compiler-12-9 libcublas-devel-12-9 cuda-cudart-devel-12-9 cuda-driver-devel-12-9
146146
CIBW_TEST_SKIP: "*"
147147
CIBW_ENVIRONMENT: >
148-
CMAKE_ARGS='-DKEDM_ENABLE_GPU=ON -DKokkos_ARCH_VOLTA70=ON'
148+
CMAKE_ARGS='-DKEDM_ENABLE_GPU=ON -DKokkos_ARCH_AMPERE80=ON'
149149
PATH=/usr/local/cuda/bin:$PATH
150150
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} --exclude libcublas.so.12 --exclude libcublasLt.so.12 --exclude libcuda.so.1 {wheel}
151151
- uses: actions/upload-artifact@v4
152152
with:
153153
name: wheels-cuda12x
154154
path: ./wheelhouse/*.whl
155155

156+
build-wheels-cuda13x:
157+
runs-on: ubuntu-22.04
158+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
159+
steps:
160+
- uses: actions/checkout@v4
161+
- name: Replace project name with kedm-cuda13x
162+
run: sed -i 's/name = "kedm"/name = "kedm-cuda13x"/' pyproject.toml
163+
- name: Build wheels
164+
uses: pypa/cibuildwheel@v3.3.0
165+
env:
166+
CIBW_BUILD: cp3*-manylinux_x86_64
167+
CIBW_SKIP: cp38-* cp39-*
168+
CIBW_BEFORE_ALL_LINUX: >
169+
yum install -y yum-utils &&
170+
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo &&
171+
yum install -y cuda-compiler-13-0 libcublas-devel-13-0 cuda-cudart-devel-13-0 cuda-driver-devel-13-0 devtoolset-11-gcc-c++
172+
CIBW_TEST_SKIP: "*"
173+
CIBW_ENVIRONMENT: >
174+
CMAKE_ARGS='-DKEDM_ENABLE_GPU=ON -DKokkos_ARCH_AMPERE80=ON'
175+
PATH=/usr/local/cuda/bin:$PATH
176+
CXX=/opt/rh/devtoolset-11/root/bin/g++
177+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: auditwheel repair -w {dest_dir} --exclude libcublas.so.13 --exclude libcublasLt.so.13 --exclude libcuda.so.1 {wheel}
178+
- uses: actions/upload-artifact@v4
179+
with:
180+
name: wheels-cuda13x
181+
path: ./wheelhouse/*.whl
182+
156183
build-wheels-linux:
157184
runs-on: ubuntu-22.04
158185
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
@@ -195,7 +222,7 @@ jobs:
195222
path: ./wheelhouse/*.whl
196223

197224
publish-wheels:
198-
needs: [build-wheels-linux, build-wheels-macos, build-wheels-cuda12x]
225+
needs: [build-wheels-linux, build-wheels-macos, build-wheels-cuda12x, build-wheels-cuda13x]
199226
runs-on: ubuntu-latest
200227
permissions:
201228
id-token: write

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ CPU (Linux and macOS)
2323
pip3 install kedm
2424
```
2525

26-
NVIDIA GPU (CUDA 12.0 or later)
26+
NVIDIA GPU (CUDA 12)
2727

2828
```
2929
pip3 install kedm-cuda12x
3030
```
3131

32+
NVIDIA GPU (CUDA 13)
33+
34+
```
35+
pip3 install kedm-cuda13x
36+
```
37+
3238
## Citing
3339

3440
Please cite the following papers if you find kEDM useful:

docs/setup.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ Prebuilt wheels
55
---------------
66

77
The easiest way to install kEDM is to use the prebuilt wheels. Prebuilt wheels
8-
for Linux (x86_64) and macOS (x86_64 and arm64) are available on PyPI. Note that
9-
these wheels are not built for GPUs. If you want to use GPUs, you need to
10-
install :ref:`from source <pip-source>`.
8+
for Linux (x86_64) and macOS (x86_64 and arm64) are available on PyPI. GPU
9+
wheels are distributed as separate packages, one for each CUDA major version.
1110

1211
Requirements
1312
============
@@ -18,10 +17,24 @@ Requirements
1817
Installation
1918
============
2019

20+
CPU (Linux and macOS):
21+
2122
.. code-block:: bash
2223
2324
$ pip3 install kedm
2425
26+
NVIDIA GPU (CUDA 12):
27+
28+
.. code-block:: bash
29+
30+
$ pip3 install kedm-cuda12x
31+
32+
NVIDIA GPU (CUDA 13):
33+
34+
.. code-block:: bash
35+
36+
$ pip3 install kedm-cuda13x
37+
2538
.. _pip-source:
2639

2740
Source

0 commit comments

Comments
 (0)