Skip to content

Commit 7512c61

Browse files
authored
Merge pull request #465 from kmaehashi/update-for-v14
Update tools for CuPy v14 release
2 parents 1ed76e3 + 259e78e commit 7512c61

File tree

9 files changed

+53
-122
lines changed

9 files changed

+53
-122
lines changed

.pfnci/build_submit.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ submit_job() {
2929
}
3030

3131
# wheels (Windows)
32-
for CUDA in 11.x 12.x 13.x; do
33-
for PYTHON in 3.10 3.11 3.12 3.13; do
32+
for CUDA in 12.x 13.x; do
33+
for PYTHON in 3.10 3.11 3.12 3.13 3.14; do
3434
submit_job cupy-wheel-win ".pfnci\\wheel-windows\\main.bat ${CUDA} ${PYTHON} ${BRANCH} ${JOB_GROUP}"
3535
done
3636
done

.pfnci/config.pbtxt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ configs {
1010
time_limit {
1111
seconds: 10800
1212
}
13-
command: ".pfnci/wheel-linux/main.sh 13.x 3.13"
13+
command: ".pfnci/wheel-linux/main.sh 13.x 3.14"
1414
}
1515
}
1616
configs {
@@ -24,7 +24,7 @@ configs {
2424
time_limit {
2525
seconds: 10800
2626
}
27-
command: ".pfnci/wheel-linux/main.sh rocm-5.0 3.9"
27+
command: ".pfnci/wheel-linux/main.sh rocm-7.0 3.12"
2828
environment_variables { key: "CUPY_RELEASE_SKIP_VERIFY" value: "1" }
2929
}
3030
}
@@ -41,7 +41,7 @@ configs {
4141
time_limit {
4242
seconds: 10800
4343
}
44-
command: ".pfnci\\wheel-windows\\main.bat 13.x 3.13"
44+
command: ".pfnci\\wheel-windows\\main.bat 13.x 3.14"
4545
}
4646
}
4747
configs {

.pfnci/wheel-windows/_flexci.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ function ActivatePython($version) {
99
$pydir = "Python312"
1010
} elseif ($version -eq "3.13") {
1111
$pydir = "Python313"
12+
} elseif ($version -eq "3.14") {
13+
$pydir = "Python314"
1214
} else {
1315
throw "Unsupported Python version: $version"
1416
}
@@ -62,6 +64,10 @@ function ActivateCUDA($version) {
6264
$Env:PATH = "$Env:CUDA_PATH\bin;$Env:CUDA_PATH\bin\x64;" + $Env:PATH
6365
}
6466

67+
function InstallZLIB() {
68+
Copy-Item -Path "C:\Development\ZLIB\zlibwapi.dll" -Destination "C:\Windows\System32"
69+
}
70+
6571
function IsPullRequestTest() {
6672
return ${Env:FLEXCI_BRANCH} -ne $null -and ${Env:FLEXCI_BRANCH}.StartsWith("refs/pull/")
6773
}

build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ esac
3939
# Set additional environment variables
4040
case ${CUDA} in
4141
rocm-* )
42-
# https://github.com/RadeonOpenCompute/ROCm#hardware-and-software-support
43-
# https://rocmdocs.amd.com/en/latest/ROCm_Compiler_SDK/ROCm-Native-ISA.html#processors
44-
export HCC_AMDGPU_TARGET=gfx801,gfx802,gfx803,gfx900,gfx906,gfx908,gfx1010,gfx1011,gfx1012
42+
# https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html
43+
export HCC_AMDGPU_TARGET=gfx908,gfx90a,gfx942,gfx950,gfx1030,gfx1100,gfx1101,gfx1200,gfx1201
4544
;;
4645
* )
4746
;;

builder/setup_python.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if [[ "$(rpm --eval '%{rhel}')" == "7" ]]; then
88
export CFLAGS="-I/usr/include/openssl11"
99
export CPPFLAGS="-I/usr/include/openssl11"
1010
export LDFLAGS="-L/usr/lib64/openssl11"
11+
else
12+
# Explicitly override "LDFLAGS" set in ROCm docker images.
13+
export LDFLAGS=""
1114
fi
1215

1316
# Install Python

check_release_assets.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
if TYPE_CHECKING:
1414
from collections.abc import Iterable, Mapping, Sequence
1515

16-
CP39 = 'cp39-cp39'
1716
CP310 = 'cp310-cp310'
1817
CP311 = 'cp311-cp311'
1918
CP312 = 'cp312-cp312'
@@ -34,30 +33,26 @@
3433
(CP310, CP311, CP312, CP313), (LINUX_AARCH64,)))
3534
_main_rocm_matrix: _MatrixType = list(itertools.product(
3635
(CP310, CP311, CP312, CP313), (LINUX,)))
37-
_v13_cuda_x86_matrix: _MatrixType = list(itertools.product(
38-
(CP39, CP310, CP311, CP312, CP313), (LINUX, WINDOWS)))
39-
_v13_cuda_aarch64_matrix: _MatrixType = list(itertools.product(
40-
(CP39, CP310, CP311, CP312, CP313), (LINUX_AARCH64,)))
41-
_v13_rocm_matrix: _MatrixType = list(itertools.product(
42-
(CP39, CP310, CP311, CP312, CP313), (LINUX,)))
36+
_v14_cuda_x86_matrix: _MatrixType = list(itertools.product(
37+
(CP310, CP311, CP312, CP313), (LINUX, WINDOWS)))
38+
_v14_cuda_aarch64_matrix: _MatrixType = list(itertools.product(
39+
(CP310, CP311, CP312, CP313), (LINUX_AARCH64,)))
40+
_v14_rocm_matrix: _MatrixType = list(itertools.product(
41+
(CP310, CP311, CP312, CP313), (LINUX,)))
4342

4443
pypi_wheel_projects = {
45-
# v14.x
46-
'14': [
47-
('cupy-cuda11x', _main_cuda_x86_matrix + _main_cuda_aarch64_matrix),
44+
# v15.x
45+
'15': [
4846
('cupy-cuda12x', _main_cuda_x86_matrix + _main_cuda_aarch64_matrix),
4947
('cupy-cuda13x', _main_cuda_x86_matrix + _main_cuda_aarch64_matrix),
50-
# ('cupy-rocm-6-2', _main_rocm_matrix),
48+
('cupy-rocm-7-0', _main_rocm_matrix),
5149
],
5250

53-
# v13.x
54-
'13': [
55-
('cupy-cuda11x', _v13_cuda_x86_matrix + _v13_cuda_aarch64_matrix),
56-
('cupy-cuda12x', _v13_cuda_x86_matrix + _v13_cuda_aarch64_matrix),
57-
('cupy-cuda13x', _v13_cuda_x86_matrix + _v13_cuda_aarch64_matrix),
58-
# ('cupy-rocm-4-3', _v13_rocm_matrix),
59-
# ('cupy-rocm-5-0', _v13_rocm_matrix),
60-
# ('cupy-rocm-6-2', _v13_rocm_matrix),
51+
# v14.x
52+
'14': [
53+
('cupy-cuda12x', _v14_cuda_x86_matrix + _v14_cuda_aarch64_matrix),
54+
('cupy-cuda13x', _v14_cuda_x86_matrix + _v14_cuda_aarch64_matrix),
55+
('cupy-rocm-7-0', _v14_rocm_matrix),
6156
],
6257
}
6358

dist.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def run_command_output(*cmd: str, cwd: str | None = None) -> str:
7474

7575

7676
def generate_wheel_metadata(
77-
libraries: list[str], cuda_version: str,
77+
libraries: list[str], cuda_version: str, workdir: str
7878
) -> dict[str, Any]:
7979
machine = platform.machine()
8080
if machine == 'AMD64': # Windows
@@ -93,7 +93,7 @@ def generate_wheel_metadata(
9393
for library in libraries:
9494
command += ['--library', library]
9595

96-
ret: dict[str, Any] = json.loads(run_command_output(*command))
96+
ret: dict[str, Any] = json.loads(run_command_output(*command, cwd=workdir))
9797
return ret
9898

9999

@@ -503,7 +503,7 @@ def build_linux(
503503
if target == 'wheel-linux':
504504
assert preloads_cuda_version is not None
505505
wheel_metadata = generate_wheel_metadata(
506-
preloads, preloads_cuda_version)
506+
preloads, preloads_cuda_version, workdir)
507507
log('Writing wheel metadata')
508508
with open(
509509
f'{workdir}/_wheel.json', 'w', encoding='UTF-8'
@@ -662,7 +662,8 @@ def build_windows(
662662

663663
# Create a wheel metadata file for preload.
664664
log('Creating wheel metadata')
665-
wheel_metadata = generate_wheel_metadata(preloads, cuda_version)
665+
wheel_metadata = generate_wheel_metadata(
666+
preloads, cuda_version, workdir)
666667
log('Writing wheel metadata')
667668
with open(f'{workdir}/_wheel.json', 'w', encoding='UTF-8') as f:
668669
json.dump(wheel_metadata, f)

dist_config.py

Lines changed: 18 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class _SDistConfig(TypedDict):
2424
# Key-value of sdist build settings.
2525
# See descriptions of WHEEL_LINUX_CONFIGS for details.
2626
SDIST_CONFIG: _SDistConfig = {
27-
'image': 'nvidia/cuda:11.2.2-devel-centos7',
27+
'image': 'nvidia/cuda:12.0.1-devel-centos7',
2828
# This image contains NCCL.
29-
'verify_image': 'nvidia/cuda:11.4.3-devel-{system}',
30-
'verify_systems': ['ubuntu18.04'],
29+
'verify_image': 'nvidia/cuda:12.0.1-devel-{system}',
30+
'verify_systems': ['ubuntu22.04'],
3131
}
3232

3333

@@ -66,55 +66,6 @@ class _WheelLinuxConfig(TypedDict):
6666
# - `system_packages`: a string of depending library names expanded into the
6767
# package manager command.
6868
WHEEL_LINUX_CONFIGS: dict[str, _WheelLinuxConfig] = {
69-
'11.x': {
70-
# CUDA Enhanced Compatibility wheel (for CUDA 11.2~11.x)
71-
'name': 'cupy-cuda11x',
72-
'kind': 'cuda',
73-
'platform_version': '11.2 - 11.8',
74-
# Use the latest CUDA version for build.
75-
'image': 'cupy/cupy-release-tools:cuda-runfile-11.8.0-centos7',
76-
'libs': [],
77-
'includes': [],
78-
'preloads': ['cutensor', 'nccl'],
79-
'verify_image': 'nvidia/cuda:{system}',
80-
'verify_systems': [
81-
# Test on all supported CUDA version variants.
82-
'11.2.2-runtime-ubuntu18.04',
83-
'11.3.1-runtime-ubuntu18.04',
84-
'11.4.3-runtime-ubuntu18.04',
85-
'11.5.2-runtime-ubuntu18.04',
86-
'11.6.2-runtime-ubuntu18.04',
87-
'11.7.1-runtime-ubuntu18.04',
88-
'11.8.0-runtime-ubuntu18.04',
89-
],
90-
'system_packages': '',
91-
},
92-
'11.x-aarch64': {
93-
# CUDA Enhanced Compatibility wheel (for CUDA 11.2~11.x)
94-
'name': 'cupy-cuda11x',
95-
'kind': 'cuda',
96-
'arch': 'aarch64',
97-
'platform_version': '11.2 - 11.8',
98-
# Use the latest image.
99-
'image': 'cupy/cupy-release-tools:cuda-runfile-11.8.0-el8',
100-
'libs': [],
101-
'includes': [],
102-
'preloads': ['nccl'],
103-
'preloads_cuda_version': '11.x',
104-
'builder_dockerfile': 'Dockerfile.el8',
105-
'verify_image': 'nvidia/cuda:{system}',
106-
'verify_systems': [
107-
# Test on all supported CUDA version variants.
108-
'11.2.2-runtime-ubi8',
109-
'11.3.1-runtime-ubi8',
110-
'11.4.3-runtime-ubi8',
111-
'11.5.2-runtime-ubi8',
112-
'11.6.2-runtime-ubi8',
113-
'11.7.1-runtime-ubi8',
114-
'11.8.0-runtime-ubi8',
115-
],
116-
'system_packages': '',
117-
},
11869
'12.x': {
11970
# CUDA Enhanced Compatibility wheel (for CUDA 12.x)
12071
'name': 'cupy-cuda12x',
@@ -129,7 +80,7 @@ class _WheelLinuxConfig(TypedDict):
12980
'verify_image': 'nvidia/cuda:{system}',
13081
'verify_systems': [
13182
# Test on all supported CUDA version variants.
132-
'12.0.1-runtime-ubuntu18.04',
83+
'12.0.1-runtime-ubuntu20.04',
13384
'12.1.1-runtime-ubuntu22.04',
13485
'12.2.0-runtime-ubuntu22.04',
13586
'12.3.0-runtime-ubuntu22.04',
@@ -207,27 +158,16 @@ class _WheelLinuxConfig(TypedDict):
207158
],
208159
'system_packages': '',
209160
},
210-
'rocm-4.3': {
211-
'name': 'cupy-rocm-4-3',
212-
'kind': 'rocm',
213-
'platform_version': '4.3',
214-
'image': 'rocm/dev-centos-7:4.3',
215-
'libs': [],
216-
'includes': [],
217-
'preloads': [],
218-
'verify_image': 'rocm/rocm-terminal:4.3',
219-
'verify_systems': ['default'],
220-
'system_packages': 'rocm-dev hipblas hipfft hipsparse rocsparse rocrand rocthrust rocsolver rocfft hipcub rocprim rccl' # NOQA
221-
},
222-
'rocm-5.0': {
223-
'name': 'cupy-rocm-5-0',
161+
'rocm-7.0': {
162+
'name': 'cupy-rocm-7-0',
224163
'kind': 'rocm',
225-
'platform_version': '5.0',
226-
'image': 'rocm/dev-centos-7:5.0',
164+
'platform_version': '7.0',
165+
'image': 'rocm/dev-almalinux-8:7.0-complete',
227166
'libs': [],
228167
'includes': [],
229168
'preloads': [],
230-
'verify_image': 'rocm/rocm-terminal:5.0',
169+
'builder_dockerfile': 'Dockerfile.el8',
170+
'verify_image': 'rocm/dev-ubuntu-24.04:7.0.2',
231171
'verify_systems': ['default'],
232172
'system_packages': 'rocm-hip-sdk hip-runtime-amd roctracer-dev' # NOQA
233173
},
@@ -250,15 +190,6 @@ class _WheelWindowsConfig(TypedDict):
250190
# - `cudart_lib`: name of CUDA Runtime DLL
251191
# - `check_version`: a function to check if the CUDA version is correct.
252192
WHEEL_WINDOWS_CONFIGS: dict[str, _WheelWindowsConfig] = {
253-
'11.x': {
254-
# CUDA Enhanced Compatibility wheel (for CUDA 11.2~11.x)
255-
'name': 'cupy-cuda11x',
256-
'kind': 'cuda',
257-
'libs': [],
258-
'preloads': ['cutensor'],
259-
'cudart_lib': 'cudart64_110', # binary compatible between CUDA 11.x
260-
'check_version': lambda x: 11080 <= x < 11090, # CUDA 11.8
261-
},
262193
'12.x': {
263194
# CUDA Enhanced Compatibility wheel (for CUDA 12.x)
264195
'name': 'cupy-cuda12x',
@@ -297,12 +228,10 @@ class _WheelWindowsConfig(TypedDict):
297228
This package (``cupy``) is a source distribution.
298229
For most users, use of pre-build wheel distributions are recommended:
299230
300-
- `cupy-cuda13x <https://pypi.org/project/cupy-cuda13x/>`_ (for CUDA 13.x)
301-
- `cupy-cuda12x <https://pypi.org/project/cupy-cuda12x/>`_ (for CUDA 12.x)
302-
- `cupy-cuda11x <https://pypi.org/project/cupy-cuda11x/>`_ (for CUDA 11.2 ~ 11.x)
231+
- `cupy-cuda13x <https://pypi.org/project/cupy-cuda13x/>`_ (for NVIDIA CUDA 13.x)
232+
- `cupy-cuda12x <https://pypi.org/project/cupy-cuda12x/>`_ (for NVIDIA CUDA 12.x)
303233
304-
- `cupy-rocm-5-0 <https://pypi.org/project/cupy-rocm-5-0/>`_ (for ROCm 5.0)
305-
- `cupy-rocm-4-3 <https://pypi.org/project/cupy-rocm-4-3/>`_ (for ROCm 4.3)
234+
- `cupy-rocm-7-0 <https://pypi.org/project/cupy-rocm-7-0/>`_ (for AMD ROCm 7.0)
306235
307236
Please see `Installation Guide <https://docs.cupy.dev/en/latest/install.html>`_ for the detailed instructions.
308237
''' # NOQA
@@ -344,11 +273,6 @@ class _WheelPythonConfig(TypedDict):
344273
# - `python_tag`: a CPython implementation tag
345274
# - `abi_tag`: a CPython ABI tag
346275
WHEEL_PYTHON_VERSIONS: dict[str, _WheelPythonConfig] = {
347-
'3.9': {
348-
'pyenv': '3.9.0',
349-
'python_tag': 'cp39',
350-
'abi_tag': 'cp39',
351-
},
352276
'3.10': {
353277
'pyenv': '3.10.0',
354278
'python_tag': 'cp310',
@@ -369,4 +293,9 @@ class _WheelPythonConfig(TypedDict):
369293
'python_tag': 'cp313',
370294
'abi_tag': 'cp313',
371295
},
296+
'3.14': {
297+
'pyenv': '3.14.2',
298+
'python_tag': 'cp314',
299+
'abi_tag': 'cp314',
300+
},
372301
}

verifier/Dockerfile.debian

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ RUN for VERSION in ${python_versions}; do \
3535

3636
# Install Python libraries.
3737
# The last version installed will be used to run the verifier agent.
38-
# Pin to NumPy v2.2.6 as NumPy v2.3+ wheels require glibc-2.28 where Ubuntu 18.04 uses glibc-2.27.
3938
RUN for VERSION in ${python_versions}; do \
4039
echo "Installing libraries on Python ${VERSION}..." && \
4140
pyenv global ${VERSION} && \
4241
pip install -U pip setuptools && \
4342
pip install pytest mock; \
44-
pip install "numpy==2.2.6" "scipy==1.15.3"; \
4543
done
4644

4745
# Install additional dependencies.

0 commit comments

Comments
 (0)