Skip to content

Commit

Permalink
Merge branch 'main' into cuda_12.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice authored Sep 19, 2024
2 parents a9a4831 + 14639d8 commit 9736d46
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 45 deletions.
4 changes: 0 additions & 4 deletions .github/actions/compute-matrix/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,18 @@ runs:
set -eo pipefail
export BUILD_MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'rockylinux8' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'rockylinux8' }
"
export TEST_MATRIX="
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'ubuntu20.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'ubuntu20.04', gpu: 'v100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.9', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'ubuntu20.04', gpu: 'a100', driver: 'latest' }
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
build-wheels:
needs:
- compute-matrix
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
with:
build_type: branch
script: "ci/build_wheel.sh"
matrix_filter: ${{ needs.compute-matrix.outputs.BUILD_MATRIX }}
build-conda:
needs:
- compute-matrix
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
with:
build_type: branch
script: "ci/build_conda.sh"
Expand All @@ -40,7 +40,7 @@ jobs:
needs:
- build-wheels
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -52,7 +52,7 @@ jobs:
needs:
- build-conda
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- test-wheels
- test-patch
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
with:
enable_check_generated_files: false
compute-matrix:
Expand All @@ -40,7 +40,7 @@ jobs:
build-conda:
needs:
- compute-matrix
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
with:
build_type: pull-request
script: "ci/build_conda.sh"
Expand All @@ -50,7 +50,7 @@ jobs:
- build-conda
- compute-matrix
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
with:
build_type: pull-request
script: "ci/test_conda.sh"
Expand All @@ -59,7 +59,7 @@ jobs:
needs:
- build-conda
- compute-matrix
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
with:
build_type: pull-request
script: "ci/test_patch.sh"
Expand All @@ -68,7 +68,7 @@ jobs:
build-wheels:
needs:
- compute-matrix
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
with:
build_type: pull-request
script: "ci/build_wheel.sh"
Expand All @@ -78,7 +78,7 @@ jobs:
- build-wheels
- compute-matrix
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.08
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
with:
build_type: pull-request
script: "ci/test_wheel.sh"
Expand Down
5 changes: 3 additions & 2 deletions .ycm_extra_conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

import os
import sys

from pathlib import Path

CONDA_PREFIX = os.environ["CONDA_PREFIX"]
Expand All @@ -22,7 +23,7 @@
]


def Settings(**kwargs):
def Settings(**kwargs): # noqa: N802
return {"flags": flags}


Expand Down
3 changes: 2 additions & 1 deletion ci/run_patched_numba_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
patch.patch_numba_linker()

if __name__ == "__main__":
from numba.testing._runtests import _main
import sys

from numba.testing._runtests import _main

sys.exit(0 if _main(sys.argv) else 1)
6 changes: 1 addition & 5 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ dependencies:
specific:
- output_types: conda
matrices:
- matrix:
py: "3.9"
packages:
- python=3.9
- matrix:
py: "3.10"
packages:
Expand All @@ -89,7 +85,7 @@ dependencies:
- python=3.12
- matrix:
packages:
- python>=3.9,<3.13
- python>=3.10,<3.13
run:
common:
- output_types: [conda, requirements, pyproject]
Expand Down
3 changes: 1 addition & 2 deletions examples/jit_link_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
# In addition to CUSource files, PTXSource objects can be used to link PTX from
# memory (not shown in this example).

import numpy as np
from numba import cuda
from pynvjitlink import patch

import numpy as np

patch.patch_numba_linker()

source = cuda.CUSource(
Expand Down
2 changes: 1 addition & 1 deletion pynvjitlink/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

from pynvjitlink.api import NvJitLinker, NvJitLinkError, nvjitlink_version
from pynvjitlink._version import __git_commit__, __version__
from pynvjitlink.api import NvJitLinker, NvJitLinkError, nvjitlink_version

__all__ = [
"NvJitLinkError",
Expand Down
4 changes: 2 additions & 2 deletions pynvjitlink/api.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

import weakref
from enum import Enum
from pynvjitlink import _nvjitlinklib

import weakref
from pynvjitlink import _nvjitlinklib


class InputType(Enum):
Expand Down
12 changes: 6 additions & 6 deletions pynvjitlink/patch.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
from functools import partial
from pynvjitlink.api import NvJitLinker, NvJitLinkError

import os
import pathlib
from functools import partial

from pynvjitlink.api import NvJitLinker, NvJitLinkError

_numba_version_ok = False
_numba_error = None
Expand All @@ -29,14 +29,14 @@
_numba_error = f"failed to import Numba: {ie}."

if _numba_version_ok:
from numba.core import config
from numba import cuda
from numba.core import config
from numba.cuda.cudadrv import nvrtc
from numba.cuda.cudadrv.driver import (
driver,
FILE_EXTENSION_MAP,
Linker,
LinkerError,
driver,
)
else:
# Prevent the definition of PatchedLinker failing if we have no Numba
Expand Down Expand Up @@ -223,7 +223,7 @@ def add_cu(self, cu, name):
ptx, log = nvrtc.compile(cu, name, cc)

if config.DUMP_ASSEMBLY:
print(("ASSEMBLY %s" % name).center(80, "-"))
print((f"ASSEMBLY {name}").center(80, "-"))
print(ptx)
print("=" * 80)

Expand Down
4 changes: 2 additions & 2 deletions pynvjitlink/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

import os
import pytest

import pytest
from numba import cuda
from pynvjitlink.patch import Archive, Cubin, CUSource, Fatbin, Object, PTXSource, LTOIR
from pynvjitlink.patch import LTOIR, Archive, Cubin, CUSource, Fatbin, Object, PTXSource


@pytest.fixture(scope="session")
Expand Down
10 changes: 5 additions & 5 deletions pynvjitlink/tests/test_patch.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION.

import pytest
import sys
from unittest.mock import patch as mock_patch

import pytest
from numba import cuda
from pynvjitlink import patch, NvJitLinkError
from pynvjitlink import NvJitLinkError, patch
from pynvjitlink.patch import (
PatchedLinker,
patch_numba_linker,
_numba_version_ok,
new_patched_linker,
patch_numba_linker,
required_numba_ver,
_numba_version_ok,
)
from unittest.mock import patch as mock_patch


def test_numba_patching_numba_not_ok():
Expand Down
3 changes: 1 addition & 2 deletions pynvjitlink/tests/test_pynvjitlink.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.

import pytest

import pynvjitlink
import pytest
from pynvjitlink import _nvjitlinklib
from pynvjitlink.api import InputType

Expand Down
2 changes: 1 addition & 1 deletion pynvjitlink/tests/test_pynvjitlink_api.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright (c) 2023-2024, NVIDIA CORPORATION. All rights reserved.

import pytest
import sys

import pytest
from pynvjitlink import NvJitLinker, NvJitLinkError


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ authors = [
{ name = "NVIDIA Corporation" },
]
license = { text = "Apache 2.0" }
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.

Expand Down

0 comments on commit 9736d46

Please sign in to comment.