Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
14 changes: 0 additions & 14 deletions ci/test-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"_notes": "DRIVER: 'earliest' does not work with CUDA 12.9.1 and LOCAL_CTK: 0 does not work with CUDA 12.0.1",
"linux": {
"pull-request": [
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.10", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.10", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.11", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
Expand All @@ -17,8 +15,6 @@
{ "ARCH": "amd64", "PY_VER": "3.13t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.14", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "13.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "13.0.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.11", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" },
Expand All @@ -32,11 +28,6 @@
{ "ARCH": "arm64", "PY_VER": "3.14t", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" }
],
"nightly": [
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "earliest" },
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "11.8.0", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "12.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.10", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "earliest" },
{ "ARCH": "amd64", "PY_VER": "3.10", "CUDA_VER": "11.8.0", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.10", "CUDA_VER": "12.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
Expand All @@ -57,11 +48,6 @@
{ "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "12.0.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "amd64", "PY_VER": "3.13", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "l4", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "earliest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "11.8.0", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.9", "CUDA_VER": "12.9.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "11.8.0", "LOCAL_CTK": "0", "GPU": "a100", "DRIVER": "earliest" },
{ "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "11.8.0", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
{ "ARCH": "arm64", "PY_VER": "3.10", "CUDA_VER": "12.0.1", "LOCAL_CTK": "1", "GPU": "a100", "DRIVER": "latest" },
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from ..cynvjitlink cimport *

Expand Down
32 changes: 28 additions & 4 deletions cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t, uintptr_t

Expand All @@ -16,6 +16,8 @@ from cuda.pathfinder import load_nvidia_dynamic_lib
# Extern
###############################################################################

# You must 'from .utils import NotSupportedError' before using this template

cdef extern from "<dlfcn.h>" nogil:
void* dlopen(const char*, int)
char* dlerror()
Expand All @@ -30,14 +32,32 @@ cdef extern from "<dlfcn.h>" nogil:

const void* RTLD_DEFAULT 'RTLD_DEFAULT'

cdef int get_cuda_version():
cdef void* handle = NULL
cdef int err, driver_ver = 0

# Load driver to check version
handle = dlopen('libcuda.so.1', RTLD_NOW | RTLD_GLOBAL)
if handle == NULL:
err_msg = dlerror()
raise NotSupportedError(f'CUDA driver is not found ({err_msg.decode()})')
cuDriverGetVersion = dlsym(handle, "cuDriverGetVersion")
if cuDriverGetVersion == NULL:
raise RuntimeError('Did not find cuDriverGetVersion symbol in libcuda.so.1')
err = (<int (*)(int*) noexcept nogil>cuDriverGetVersion)(&driver_ver)
if err != 0:
raise RuntimeError(f'cuDriverGetVersion returned error code {err}')

return driver_ver



###############################################################################
# Wrapper init
###############################################################################

cdef object __symbol_lock = threading.Lock()
cdef bint __py_nvjitlink_init = False
cdef void* __cuDriverGetVersion = NULL

cdef void* __nvJitLinkCreate = NULL
cdef void* __nvJitLinkDestroy = NULL
Expand All @@ -60,12 +80,16 @@ cdef void* load_library() except* with gil:
return <void*>handle


cdef int __check_or_init_nvjitlink() except -1 nogil:
cdef int _init_nvjitlink() except -1 nogil:
global __py_nvjitlink_init

cdef void* handle = NULL

with gil, __symbol_lock:
# Recheck the flag after obtaining the locks
if __py_nvjitlink_init:
return 0

# Load function
global __nvJitLinkCreate
__nvJitLinkCreate = dlsym(RTLD_DEFAULT, 'nvJitLinkCreate')
Expand Down Expand Up @@ -173,7 +197,7 @@ cdef inline int _check_or_init_nvjitlink() except -1 nogil:
if __py_nvjitlink_init:
return 0

return __check_or_init_nvjitlink()
return _init_nvjitlink()

cdef dict func_ptrs = None

Expand Down
16 changes: 10 additions & 6 deletions cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t

Expand All @@ -15,7 +15,7 @@ from libc.stddef cimport wchar_t
from libc.stdint cimport uintptr_t
from cpython cimport PyUnicode_AsWideCharString, PyMem_Free

from .utils import NotSupportedError
# You must 'from .utils import NotSupportedError' before using this template

cdef extern from "windows.h" nogil:
ctypedef void* HMODULE
Expand Down Expand Up @@ -61,10 +61,10 @@ cdef int get_cuda_version():
raise NotSupportedError('CUDA driver is not found')
cuDriverGetVersion = GetProcAddress(handle, 'cuDriverGetVersion')
if cuDriverGetVersion == NULL:
raise RuntimeError('something went wrong')
raise RuntimeError('Did not find cuDriverGetVersion symbol in nvcuda.dll')
err = (<int (*)(int*) noexcept nogil>cuDriverGetVersion)(&driver_ver)
if err != 0:
raise RuntimeError('something went wrong')
raise RuntimeError(f'cuDriverGetVersion returned error code {err}')

return driver_ver

Expand Down Expand Up @@ -93,10 +93,14 @@ cdef void* __nvJitLinkGetInfoLog = NULL
cdef void* __nvJitLinkVersion = NULL


cdef int __check_or_init_nvjitlink() except -1 nogil:
cdef int _init_nvjitlink() except -1 nogil:
global __py_nvjitlink_init

with gil, __symbol_lock:
# Recheck the flag after obtaining the locks
if __py_nvjitlink_init:
return 0

# Load library
handle = load_nvidia_dynamic_lib("nvJitLink")._handle_uint

Expand Down Expand Up @@ -151,7 +155,7 @@ cdef inline int _check_or_init_nvjitlink() except -1 nogil:
if __py_nvjitlink_init:
return 0

return __check_or_init_nvjitlink()
return _init_nvjitlink()


cdef dict func_ptrs = None
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/_internal/nvvm.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from ..cynvvm cimport *

Expand Down
16 changes: 11 additions & 5 deletions cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t, uintptr_t

Expand All @@ -16,6 +16,8 @@ from cuda.pathfinder import load_nvidia_dynamic_lib
# Extern
###############################################################################

# You must 'from .utils import NotSupportedError' before using this template

cdef extern from "<dlfcn.h>" nogil:
void* dlopen(const char*, int)
char* dlerror()
Expand Down Expand Up @@ -49,13 +51,13 @@ cdef int get_cuda_version():
return driver_ver



###############################################################################
# Wrapper init
###############################################################################

cdef object __symbol_lock = threading.Lock()
cdef bint __py_nvvm_init = False
cdef void* __cuDriverGetVersion = NULL

cdef void* __nvvmGetErrorString = NULL
cdef void* __nvvmVersion = NULL
Expand All @@ -77,12 +79,16 @@ cdef void* load_library() except* with gil:
return <void*>handle


cdef int __check_or_init_nvvm() except -1 nogil:
cdef int _init_nvvm() except -1 nogil:
global __py_nvvm_init

cdef void* handle = NULL

with gil, __symbol_lock:
# Recheck the flag after obtaining the locks
if __py_nvvm_init:
return 0

# Load function
global __nvvmGetErrorString
__nvvmGetErrorString = dlsym(RTLD_DEFAULT, 'nvvmGetErrorString')
Expand Down Expand Up @@ -179,11 +185,11 @@ cdef int __check_or_init_nvvm() except -1 nogil:
return 0


cdef int _check_or_init_nvvm() except -1 nogil:
cdef inline int _check_or_init_nvvm() except -1 nogil:
if __py_nvvm_init:
return 0

return __check_or_init_nvvm()
return _init_nvvm()


cdef dict func_ptrs = None
Expand Down
16 changes: 10 additions & 6 deletions cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t

Expand All @@ -15,7 +15,7 @@ from libc.stddef cimport wchar_t
from libc.stdint cimport uintptr_t
from cpython cimport PyUnicode_AsWideCharString, PyMem_Free

from .utils import NotSupportedError
# You must 'from .utils import NotSupportedError' before using this template

cdef extern from "windows.h" nogil:
ctypedef void* HMODULE
Expand Down Expand Up @@ -61,10 +61,10 @@ cdef int get_cuda_version():
raise NotSupportedError('CUDA driver is not found')
cuDriverGetVersion = GetProcAddress(handle, 'cuDriverGetVersion')
if cuDriverGetVersion == NULL:
raise RuntimeError('something went wrong')
raise RuntimeError('Did not find cuDriverGetVersion symbol in nvcuda.dll')
err = (<int (*)(int*) noexcept nogil>cuDriverGetVersion)(&driver_ver)
if err != 0:
raise RuntimeError('something went wrong')
raise RuntimeError(f'cuDriverGetVersion returned error code {err}')

return driver_ver

Expand Down Expand Up @@ -92,10 +92,14 @@ cdef void* __nvvmGetProgramLogSize = NULL
cdef void* __nvvmGetProgramLog = NULL


cdef int __check_or_init_nvvm() except -1 nogil:
cdef int _init_nvvm() except -1 nogil:
global __py_nvvm_init

with gil, __symbol_lock:
# Recheck the flag after obtaining the locks
if __py_nvvm_init:
return 0

# Load library
handle = load_nvidia_dynamic_lib("nvvm")._handle_uint

Expand Down Expand Up @@ -147,7 +151,7 @@ cdef inline int _check_or_init_nvvm() except -1 nogil:
if __py_nvvm_init:
return 0

return __check_or_init_nvvm()
return _init_nvvm()


cdef dict func_ptrs = None
Expand Down
3 changes: 2 additions & 1 deletion cuda_bindings/cuda/bindings/cufile.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import numpy as _numpy
from cpython cimport buffer as _buffer
from cpython.memoryview cimport PyMemoryView_FromMemory
from enum import IntEnum as _IntEnum
cimport cpython

import cython

Expand Down Expand Up @@ -1254,7 +1255,7 @@ cpdef str get_parameter_string(int param, int len):
with nogil:
status = cuFileGetParameterString(<_StringConfigParameter>param, desc_str, len)
check_status(status)
return _desc_str_.decode()
return cpython.PyUnicode_FromString(desc_str)


cpdef set_parameter_size_t(int param, size_t value):
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/cynvjitlink.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t, uint32_t

Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/cynvjitlink.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from ._internal cimport nvjitlink as _nvjitlink

Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/cynvvm.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.


###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/cynvvm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from ._internal cimport nvvm as _nvvm

Expand Down
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/nvjitlink.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
#
# This code was automatically generated across versions from 12.0.1 to 12.9.1. Do not modify it directly.
# This code was automatically generated across versions from 12.0.1 to 13.0.2. Do not modify it directly.

from libc.stdint cimport intptr_t, uint32_t

Expand Down
Loading
Loading