-
Notifications
You must be signed in to change notification settings - Fork 221
chore: add pixi for cuda-core and cuda-bindings #1226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3b73782
f78132e
137b09b
67570fe
c14d5f9
5d52069
a6cd565
4419374
4f77cc0
414c538
885eb3b
74bd73c
fba67a4
cd60970
6b749db
0c1e645
cc83541
b1834b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,3 +182,6 @@ cython_debug/ | |
|
|
||
| # Dont ignore | ||
| !.github/actions/build/ | ||
| # pixi environments | ||
| .pixi/* | ||
| !.pixi/config.toml | ||
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| [workspace] | ||
| channels = ["conda-forge"] | ||
| platforms = ["linux-64", "linux-aarch64", "win-64"] | ||
| preview = ["pixi-build"] | ||
|
|
||
| [workspace.build-variants] | ||
| python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"] | ||
|
|
||
| [dependencies] | ||
| cuda-bindings = { path = "." } | ||
| pip = "*" # installed to the workspace for convenience | ||
|
|
||
| [feature.test.dependencies] | ||
| pytest = ">=6.2.4" | ||
| pytest-benchmark = ">=3.4.1" | ||
| pyglet = ">=2.1.9" | ||
| numpy = "*" | ||
|
|
||
| [feature.cython-tests.dependencies] | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| cython = "*" # for tests that exercise APIs from cython | ||
| setuptools = "*" # for distutils | ||
| gxx = "*" # to compile the generated code | ||
| # These are necessary because running the Cython tests requires compiling | ||
| # *after* the package is built, and the Cython tests depend on CUDA headers | ||
| # transitively (through cuda-bindings) | ||
| cuda-cudart-dev = "*" | ||
| cuda-profiler-api = "*" | ||
|
|
||
| [feature.cython-tests.target.linux-64.dependencies] | ||
| cuda-crt-dev_linux-64 = "*" | ||
|
|
||
| [feature.cython-tests.target.linux-aarch64.dependencies] | ||
| cuda-crt-dev_linux-aarch64 = "*" | ||
|
|
||
| [feature.cython-tests.target.win-64.dependencies] | ||
| cuda-crt-dev_win-64 = "*" | ||
|
|
||
| # For finding headers when building the Cython tests | ||
| [feature.cython-tests.target.linux-64.activation.env] | ||
| CUDA_HOME = "$CONDA_PREFIX/targets/x86_64-linux" | ||
|
|
||
| [feature.cython-tests.target.linux-aarch64.activation.env] | ||
| CUDA_HOME = "$CONDA_PREFIX/targets/sbsa-linux" | ||
|
|
||
| [feature.cython-tests.target.win-64.activation.env] | ||
| CUDA_HOME = '%CONDA_PREFIX%\Library' | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [feature.cu13.system-requirements] | ||
| cuda = "13" | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [feature.cu13.dependencies] | ||
| # TODO: make cuda-version a build-variant | ||
| cuda-version = "13.*" | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [environments] | ||
| cu13 = { features = ["cu13", "test", "cython-tests"], solve-group = "cu13" } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am a bit unhappy having to pass |
||
|
|
||
| # TODO: check if these can be extracted from pyproject.toml | ||
| [package] | ||
| name = "cuda-bindings" | ||
| version = "13.0.2" | ||
cpcloud marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [package.build] | ||
| backend = { name = "pixi-build-python", version = "*" } | ||
|
|
||
| [package.build.config] | ||
| env = { CUDA_PYTHON_PARSER_CACHING = "1", CUDA_PYTHON_PARALLEL_LEVEL = "$(nproc)" } | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| noarch = false | ||
| compilers = ["c", "cxx"] | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [package.build.target.linux-64.config.env] | ||
| CUDA_HOME = "$PREFIX/targets/x86_64-linux" | ||
|
|
||
| [package.build.target.linux-aarch64.config.env] | ||
| CUDA_HOME = "$PREFIX/targets/sbsa-linux" | ||
|
|
||
| [package.build.target.win-64.config.env] | ||
| CUDA_HOME = '%PREFIX%\Library' | ||
|
|
||
| # TODO: revisit this | ||
| # [package.build-dependencies] | ||
| # ccache = "*" | ||
|
|
||
| [package.host-dependencies] | ||
| python = "*" | ||
| pip = "*" | ||
| setuptools = ">=77" | ||
| cython = ">=3.1,<3.2" | ||
| pyclibrary = ">=0.1.7" | ||
| cuda-cudart-static = "*" | ||
| cuda-nvrtc-dev = "*" | ||
| cuda-profiler-api = "*" | ||
| cuda-nvvm = "*" | ||
|
|
||
| [package.target.linux-64.host-dependencies] | ||
| cuda-crt-dev_linux-64 = "*" | ||
| libcufile-dev = "*" | ||
|
|
||
| [package.target.linux-aarch64.host-dependencies] | ||
| cuda-crt-dev_linux-aarch64 = "*" | ||
| libcufile-dev = "*" | ||
|
|
||
| [package.target.win-64.host-dependencies] | ||
| cuda-crt-dev_win-64 = "*" | ||
|
|
||
| [package.run-dependencies] | ||
| python = "*" | ||
| cuda-pathfinder = ">=1.1,<2" | ||
| cuda-bindings = { path = "." } | ||
| libnvjitlink = "*" | ||
| cuda-nvrtc = "*" | ||
| cuda-nvvm = "*" | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [package.target.linux.run-dependencies] | ||
| libcufile = "*" | ||
|
|
||
| [target.linux.tasks.build-cython-tests] | ||
| cmd = ["$PIXI_PROJECT_ROOT/tests/cython/build_tests.sh"] | ||
|
|
||
| [target.linux.tasks.run-cython-tests] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a point to the complexity of creating a separate task just to run the cython tests and then making that a dependency of the Why not just run
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, Cython tests aren't auto-discoverable from the project root. We added a rule to exclude them. Feel free to simplify the task dependency. I only wanted to make sure it runs as intended, and thought adding 3 lines of code was not too bad. |
||
| cmd = ["pytest", "$PIXI_PROJECT_ROOT/tests/cython/"] | ||
| depends-on = [{ task = "build-cython-tests" }] | ||
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [target.linux.tasks.test] | ||
| cmd = ["pytest", "$PIXI_PROJECT_ROOT"] | ||
| depends-on = [{ task = "run-cython-tests" }] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,9 @@ build-backend = "setuptools.build_meta" | |
| [project] | ||
| name = "cuda-bindings" | ||
| description = "Python bindings for CUDA" | ||
| authors = [{name = "NVIDIA Corporation", email = "[email protected]"},] | ||
| authors = [ | ||
| { name = "NVIDIA Corporation", email = "[email protected]" }, | ||
| ] | ||
| license = "LicenseRef-NVIDIA-SOFTWARE-LICENSE" | ||
| requires-python = ">=3.10" | ||
| classifiers = [ | ||
|
|
@@ -22,13 +24,8 @@ classifiers = [ | |
| "Programming Language :: Python :: 3.14", | ||
| "Environment :: GPU :: NVIDIA CUDA", | ||
| ] | ||
| dynamic = [ | ||
| "version", | ||
| "readme", | ||
| ] | ||
| dependencies = [ | ||
| "cuda-pathfinder ~=1.1", | ||
| ] | ||
| dynamic = ["version", "readme"] | ||
| dependencies = ["cuda-pathfinder ~=1.1"] | ||
|
|
||
| [project.optional-dependencies] | ||
| all = [ | ||
|
|
@@ -43,7 +40,7 @@ test = [ | |
| "numpy>=1.21.1", | ||
| "pytest>=6.2.4", | ||
| "pytest-benchmark>=3.4.1", | ||
| "pyglet>=2.1.9" | ||
| "pyglet>=2.1.9", | ||
| ] | ||
|
|
||
| [project.urls] | ||
|
|
@@ -69,3 +66,8 @@ archs = "native" | |
| archs = "AMD64" | ||
| before-build = "pip install delvewheel" | ||
| repair-wheel-command = "delvewheel repair --namespace-pkg cuda -w {dest_dir} {wheel}" | ||
|
|
||
| [tool.pytest.ini_options] | ||
| required_plugins = "pytest-benchmark" | ||
| addopts = "--benchmark-disable" | ||
| norecursedirs = ["tests/cython", "examples"] | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.