Skip to content

Commit 8362fc7

Browse files
committed
Updates Linux container and CUDA version
This commit updates Linux builds from the manylinux2014 container to the manylinux_2_28 container. The manylinux2014 container uses GCC 10.2, which produces code that runs substantially slower than more recent versions (~4 times in my tests). Code compiled on manylinux_2_28 should still run on most systems, so portability will not be greatly reduced. This commit also changes the version of the CUDA Toolkit used on the Linux builds from 11.6 to 12.4. This matches the Windows builds (where the more recent version was forced by the older version no longer being supported), and should result in the inclusion of code compiled for more recent GPU architectures.
1 parent 7c596d9 commit 8362fc7

3 files changed

Lines changed: 25 additions & 22 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-latest, windows-2022, macos-13, macos-14]
12+
os: [ubuntu-latest] #, windows-2022, macos-13, macos-14]
1313

1414
steps:
1515
- uses: actions/checkout@v5
@@ -25,14 +25,13 @@ jobs:
2525
shell: bash
2626

2727
- name: Build wheels
28-
uses: pypa/cibuildwheel@v3.1.4
28+
uses: pypa/cibuildwheel@v3.3.0
2929
env:
30-
# For Linux, install CUDA in the container. Note that manylinux2014
30+
# For Linux, install CUDA in the container. Note that manylinux_2_28
3131
# is specified in pyproject.toml
3232
CIBW_BEFORE_ALL_LINUX: >
33-
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo &&
34-
yum install -y cuda-nvcc-11-8 cuda-cudart-devel-11-8
35-
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:/usr/local/cuda-11.8/bin" CUDA_PATH="/usr/local/cuda-11.8/bin" CUDA_HOME="/usr/local/cuda-11.8" CUDA_ROOT="/usr/local/cuda-11.8" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-11.8/lib64" CUDACXX="/usr/local/cuda-11.8/bin/nvcc"
33+
curl -sL https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo -o /etc/yum.repos.d/cuda-rhel8.repo && dnf install -y cuda-nvcc-12-4 cuda-cudart-devel-12-4 gcc-toolset-13 && scl enable gcc-toolset-13 bash
34+
CIBW_ENVIRONMENT_LINUX: PATH="$PATH:/usr/local/cuda-12.4/bin" CUDA_PATH="/usr/local/cuda-12.4/bin" CUDA_HOME="/usr/local/cuda-12.4" CUDA_ROOT="/usr/local/cuda-12.4" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-12.4/lib64" CUDACXX="/usr/local/cuda-12.4/bin/nvcc" NVCC_PREPEND_FLAGS="--allow-unsupported-compiler" CMAKE_CUDA_FLAGS="--allow-unsupported-compiler"
3635
# For Windows, install CUDA
3736
CIBW_BEFORE_ALL_WINDOWS: >
3837
nuget install intelopenmp.devel.win -DirectDownload -NonInteractive &&
@@ -50,15 +49,15 @@ jobs:
5049
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
5150
path: ./wheelhouse/*.whl
5251

53-
build_sdist:
54-
name: Build source distribution
55-
runs-on: ubuntu-latest
56-
steps:
57-
- uses: actions/checkout@v5
58-
59-
- name: Build sdist
60-
run: pipx run build --sdist
61-
62-
- uses: actions/upload-artifact@v4
63-
with:
64-
path: dist/*.tar.gz
52+
# build_sdist:
53+
# name: Build source distribution
54+
# runs-on: ubuntu-latest
55+
# steps:
56+
# - uses: actions/checkout@v5
57+
#
58+
# - name: Build sdist
59+
# run: pipx run build --sdist
60+
#
61+
# - uses: actions/upload-artifact@v4
62+
# with:
63+
# path: dist/*.tar.gz

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
cmake_minimum_required(VERSION 3.18)
44
# If scikit-build-core sets SKBUILD_PROJECT_NAME / VERSION, prefer those.
55
if(DEFINED SKBUILD_PROJECT_NAME)
6-
project(${SKBUILD_PROJECT_NAME} LANGUAGES C)
6+
project(${SKBUILD_PROJECT_NAME} LANGUAGES C CXX)
77
else()
8-
project(deepwave LANGUAGES C)
8+
project(deepwave LANGUAGES C CXX)
99
endif()
1010

1111
# Detect and enable CUDA if present
12+
#if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0")
13+
# message(STATUS "GCC ${CMAKE_C_COMPILER_VERSION} detected – enabling nvcc unsupported compiler override")
14+
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -allow-unsupported-compiler")
15+
#endif()
1216
find_package(CUDAToolkit)
1317
if(CUDAToolkit_FOUND)
1418
enable_language(CUDA)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ build = "cp311-*"
3434
skip = ["*musllinux*"]
3535

3636
# Use an older manylinux image for better compatibility
37-
manylinux-x86_64-image = "manylinux2014"
38-
manylinux-aarch64-image = "manylinux2014"
37+
manylinux-x86_64-image = "manylinux_2_28"
38+
manylinux-aarch64-image = "manylinux_2_28"
3939

4040
build-verbosity = 1
4141

0 commit comments

Comments
 (0)