Skip to content

Commit

Permalink
Merge pull request cupy#368 from kmaehashi/add-python312
Browse files Browse the repository at this point in the history
Add support for Python 3.12 wheel
  • Loading branch information
takagi authored and kmaehashi committed Oct 23, 2023
1 parent 0bc0e0c commit 7ecaa82
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .pfnci/build_submit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ submit_job() {

# wheels (Windows)
for CUDA in 10.2 11.0 11.1 11.x 12.x; do
for PYTHON in 3.8 3.9 3.10 3.11; do
for PYTHON in 3.8 3.9 3.10 3.11 3.12; do
submit_job cupy-wheel-win ".pfnci\\wheel-windows\\main.bat ${CUDA} ${PYTHON} ${BRANCH} ${JOB_GROUP}"
done
done
Expand Down
2 changes: 1 addition & 1 deletion .pfnci/config.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ configs {
time_limit {
seconds: 10800
}
command: ".pfnci\\wheel-windows\\main.bat 12.x 3.11"
command: ".pfnci\\wheel-windows\\main.bat 12.x 3.12"
}
}
configs {
Expand Down
2 changes: 2 additions & 0 deletions .pfnci/wheel-windows/_flexci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function ActivatePython($version) {
$pydir = "Python310"
} elseif ($version -eq "3.11") {
$pydir = "Python311"
} elseif ($version -eq "3.12") {
$pydir = "Python312"
} else {
throw "Unsupported Python version: $version"
}
Expand Down
13 changes: 7 additions & 6 deletions check_release_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
CP39 = 'cp39-cp39'
CP310 = 'cp310-cp310'
CP311 = 'cp311-cp311'
CP312 = 'cp312-cp312'
LINUX = 'manylinux2014_x86_64'
LINUX_V11 = 'manylinux1_x86_64'
LINUX_AARCH64 = 'manylinux2014_aarch64'
Expand All @@ -24,18 +25,18 @@
sdist_project = 'cupy'

_v13_cuda_matrix = list(itertools.product(
(CP39, CP310, CP311), (LINUX, WINDOWS)))
(CP39, CP310, CP311, CP312), (LINUX, WINDOWS)))
_v13_aarch64_matrix = list(itertools.product(
(CP39, CP310, CP311), (LINUX_AARCH64,)))
(CP39, CP310, CP311, CP312), (LINUX_AARCH64,)))
_v13_rocm_matrix = list(itertools.product(
(CP39, CP310, CP311), (LINUX,)))
(CP39, CP310, CP311, CP312), (LINUX,)))

_v12_cuda_matrix = list(itertools.product(
(CP38, CP39, CP310, CP311), (LINUX, WINDOWS)))
(CP38, CP39, CP310, CP311, CP312), (LINUX, WINDOWS)))
_v12_aarch64_matrix = list(itertools.product(
(CP38, CP39, CP310, CP311), (LINUX_AARCH64,)))
(CP38, CP39, CP310, CP311, CP312), (LINUX_AARCH64,)))
_v12_rocm_matrix = list(itertools.product(
(CP38, CP39, CP310, CP311), (LINUX,)))
(CP38, CP39, CP310, CP311, CP312), (LINUX,)))

pypi_wheel_projects = {
# v12.x
Expand Down
7 changes: 6 additions & 1 deletion dist_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# Tools to be used for build.
CYTHON_VERSION = '0.29.36'
FASTRLOCK_VERSION = '0.8.1'
FASTRLOCK_VERSION = '0.8.2'

# Key-value of sdist build settings.
# See descriptions of WHEEL_LINUX_CONFIGS for details.
Expand Down Expand Up @@ -333,4 +333,9 @@
'python_tag': 'cp311',
'abi_tag': 'cp311',
},
'3.12': {
'pyenv': '3.12.0',
'python_tag': 'cp312',
'abi_tag': 'cp312',
},
}
5 changes: 3 additions & 2 deletions dist_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ctypes
import ctypes.util
import imp
import os

from dist_config import WHEEL_PYTHON_VERSIONS
Expand Down Expand Up @@ -39,7 +38,9 @@ def wheel_name(pkg_name, version, python_version, platform_tag):

def get_version_from_source_tree(source_tree):
version_file_path = '{}/cupy/_version.py'.format(source_tree)
return imp.load_source('_version', version_file_path).__version__
with open(version_file_path) as f:
exec(f.read())
return locals()['__version__']


def get_system_cuda_version(cudart_name='cudart'):
Expand Down

0 comments on commit 7ecaa82

Please sign in to comment.