Skip to content
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

[Backport 2.7]: PRs #3201, #3523, #3547, #3580 (#3536) #3600

Merged
merged 20 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 7 additions & 7 deletions ci/matrix.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
workflows:

Check notice on line 1 in ci/matrix.yaml

View workflow job for this annotation

GitHub Actions / Build workflow from matrix

Merging consumers for duplicate producer '[C++17 GCC13] Build(amd64)' in 'CUB CTK12.5 nvcc GCC'

Check notice on line 1 in ci/matrix.yaml

View workflow job for this annotation

GitHub Actions / Build workflow from matrix

Original consumers: [C++17 GCC13] HostLaunch(amd64, V100), [C++17 GCC13] DeviceLaunch(amd64, V100), [C++17 GCC13] GraphCapture(amd64, V100), [C++17 GCC13] TestGPU(amd64, V100)

Check notice on line 1 in ci/matrix.yaml

View workflow job for this annotation

GitHub Actions / Build workflow from matrix

Duplicate consumers: [C++17 GCC13] SmallGMem(amd64, V100)

Check notice on line 1 in ci/matrix.yaml

View workflow job for this annotation

GitHub Actions / Build workflow from matrix

Merged consumers: [C++17 GCC13] HostLaunch(amd64, V100), [C++17 GCC13] DeviceLaunch(amd64, V100), [C++17 GCC13] GraphCapture(amd64, V100), [C++17 GCC13] TestGPU(amd64, V100), [C++17 GCC13] SmallGMem(amd64, V100)
# If any jobs appear here, they will be executed instead of `pull_request' for PRs.
# This is useful for limiting resource usage when a full matrix is not needed.
# The branch protection checks will fail when using this override workflow.
Expand Down Expand Up @@ -219,13 +219,13 @@

# testing -> Runner with GPU is in a nv-gh-runners testing pool
gpus:
v100: { sm: 70 } # 32 GB, 40 runners
t4: { sm: 75, testing: true } # 16 GB, 8 runners
rtx2080: { sm: 75, testing: true } # 8 GB, 8 runners
rtxa6000: { sm: 86, testing: true } # 48 GB, 12 runners
l4: { sm: 89, testing: true } # 24 GB, 48 runners
rtx4090: { sm: 89, testing: true } # 24 GB, 10 runners
h100: { sm: 90 } # 80 GB, 16 runners
v100: { sm: 70 } # 32 GB, 40 runners
t4: { sm: 75 } # 16 GB, 10 runners
rtx2080: { sm: 75 } # 8 GB, 12 runners
rtxa6000: { sm: 86 } # 48 GB, 12 runners
l4: { sm: 89 } # 24 GB, 48 runners
rtx4090: { sm: 89 } # 24 GB, 10 runners
h100: { sm: 90 } # 80 GB, 16 runners

# Tags are used to define a `matrix job` in the workflow section.
#
Expand Down
33 changes: 18 additions & 15 deletions ci/test_pycuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,28 @@ print_environment_details

fail_if_no_gpu

readonly prefix="${BUILD_DIR}/python/"
export PYTHONPATH="${prefix}:${PYTHONPATH:-}"
begin_group "⚙️ Existing site-packages"
pip freeze
end_group "⚙️ Existing site-packages"

pushd ../python/cuda_cooperative >/dev/null
for module in cuda_parallel cuda_cooperative; do

run_command "⚙️ Pip install cuda_cooperative" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "🚀 Pytest cuda_cooperative" python -m pytest -v ./tests
pushd "../python/${module}" >/dev/null

popd >/dev/null
TEMP_VENV_DIR="/tmp/${module}_venv"
rm -rf "${TEMP_VENV_DIR}"
python -m venv "${TEMP_VENV_DIR}"
. "${TEMP_VENV_DIR}/bin/activate"
echo 'cuda-cccl @ file:///home/coder/cccl/python/cuda_cccl' > /tmp/cuda-cccl_constraints.txt
run_command "⚙️ Pip install ${module}" pip install -c /tmp/cuda-cccl_constraints.txt .[test]
begin_group "⚙️ ${module} site-packages"
pip freeze
end_group "⚙️ ${module} site-packages"
run_command "🚀 Pytest ${module}" python -m pytest -v ./tests
deactivate

pushd ../python/cuda_parallel >/dev/null
popd >/dev/null

# Temporarily install the package twice to populate include directory as part of the first installation
# and to let manifest discover these includes during the second installation. Do not forget to remove the
# second installation after https://github.com/NVIDIA/cccl/issues/2281 is addressed.
run_command "⚙️ Pip install cuda_parallel once" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "⚙️ Pip install cuda_parallel twice" pip install --force-reinstall --upgrade --target "${prefix}" .[test]
run_command "🚀 Pytest cuda_parallel" python -m pytest -v ./tests

popd >/dev/null
done

print_time_summary
1 change: 1 addition & 0 deletions ci/update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ update_file "$CUDAX_CMAKE_VERSION_FILE" "set(cudax_VERSION_MAJOR \([0-9]\+\))" "
update_file "$CUDAX_CMAKE_VERSION_FILE" "set(cudax_VERSION_MINOR \([0-9]\+\))" "set(cudax_VERSION_MINOR $minor)"
update_file "$CUDAX_CMAKE_VERSION_FILE" "set(cudax_VERSION_PATCH \([0-9]\+\))" "set(cudax_VERSION_PATCH $patch)"

update_file "$CUDA_CCCL_VERSION_FILE" "^__version__ = \"\([0-9.]\+\)\"" "__version__ = \"$major.$minor.$patch\""
update_file "$CUDA_COOPERATIVE_VERSION_FILE" "^__version__ = \"\([0-9.]\+\)\"" "__version__ = \"$pymajor.$pyminor.$major.$minor.$patch\""
update_file "$CUDA_PARALLEL_VERSION_FILE" "^__version__ = \"\([0-9.]\+\)\"" "__version__ = \"$pymajor.$pyminor.$major.$minor.$patch\""

Expand Down
28 changes: 14 additions & 14 deletions libcudacxx/test/utils/libcudacxx/test/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1385,19 +1385,19 @@ def configure_modules(self):

def configure_substitutions(self):
sub = self.config.substitutions
cxx_path = pipes.quote(self.cxx.path)
cxx_path = shlex.quote(self.cxx.path)
# Configure compiler substitutions
sub.append(('%cxx', cxx_path))
sub.append(('%libcxx_src_root', self.libcudacxx_src_root))
# Configure flags substitutions
flags_str = ' '.join([pipes.quote(f) for f in self.cxx.flags])
compile_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.compile_flags])
link_flags_str = ' '.join([pipes.quote(f) for f in self.cxx.link_flags])
all_flags = '%s %s %s' % (flags_str, compile_flags_str, link_flags_str)
sub.append(('%flags', flags_str))
sub.append(('%compile_flags', compile_flags_str))
sub.append(('%link_flags', link_flags_str))
sub.append(('%all_flags', all_flags))
flags_str = " ".join([shlex.quote(f) for f in self.cxx.flags])
compile_flags_str = " ".join([shlex.quote(f) for f in self.cxx.compile_flags])
link_flags_str = " ".join([shlex.quote(f) for f in self.cxx.link_flags])
all_flags = "%s %s %s" % (flags_str, compile_flags_str, link_flags_str)
sub.append(("%flags", flags_str))
sub.append(("%compile_flags", compile_flags_str))
sub.append(("%link_flags", link_flags_str))
sub.append(("%all_flags", all_flags))
if self.cxx.isVerifySupported():
verify_str = ' ' + ' '.join(self.cxx.verify_flags) + ' '
sub.append(('%verify', verify_str))
Expand All @@ -1422,11 +1422,11 @@ def configure_substitutions(self):
# Configure run env substitution.
sub.append(('%run', '%t.exe'))
# Configure not program substitutions
not_py = os.path.join(self.libcudacxx_src_root, 'test', 'utils', 'not.py')
not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))
sub.append(('not ', not_str))
if self.get_lit_conf('libcudacxx_gdb'):
sub.append(('%libcxx_gdb', self.get_lit_conf('libcudacxx_gdb')))
not_py = os.path.join(self.libcudacxx_src_root, "test", "utils", "not.py")
not_str = "%s %s " % (shlex.quote(sys.executable), shlex.quote(not_py))
sub.append(("not ", not_str))
if self.get_lit_conf("libcudacxx_gdb"):
sub.append(("%libcxx_gdb", self.get_lit_conf("libcudacxx_gdb")))

def can_use_deployment(self):
# Check if the host is on an Apple platform using clang.
Expand Down
1 change: 0 additions & 1 deletion python/cuda_cooperative/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cuda/_include
env
*egg-info
1 change: 0 additions & 1 deletion python/cuda_cooperative/MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions python/cuda_cooperative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Please visit the documentation here: https://nvidia.github.io/cccl/python.html.
## Local development

```bash
pip3 install -e ../cuda_cccl
pip3 install -e .[test]
pytest -v ./tests/
```
4 changes: 2 additions & 2 deletions python/cuda_cooperative/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

[build-system]
requires = ["packaging", "setuptools>=61.0.0", "wheel"]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"
2 changes: 1 addition & 1 deletion python/cuda_cooperative/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

Expand Down
1 change: 0 additions & 1 deletion python/cuda_parallel/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
cuda/_include
env
*egg-info
*so
1 change: 0 additions & 1 deletion python/cuda_parallel/MANIFEST.in

This file was deleted.

1 change: 1 addition & 0 deletions python/cuda_parallel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Please visit the documentation here: https://nvidia.github.io/cccl/python.html.
## Local development

```bash
pip3 install -e ../cuda_cccl
pip3 install -e .[test]
pytest -v ./tests/
```
4 changes: 2 additions & 2 deletions python/cuda_parallel/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

[build-system]
requires = ["packaging", "setuptools>=61.0.0", "wheel"]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"
9 changes: 4 additions & 5 deletions python/cuda_parallel/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
# Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED.
#
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import os
import shutil
import subprocess
from pathlib import Path

from setuptools import Command, Extension, setup, find_packages, find_namespace_packages
from setuptools.command.build_py import build_py
Expand Down Expand Up @@ -84,8 +83,8 @@ def build_extension(self, ext):
'-DCMAKE_BUILD_TYPE=Release',
]

if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
build_temp_path = Path(self.build_temp)
build_temp_path.mkdir(parents=True, exist_ok=True)

subprocess.check_call(['cmake', cccl_path] +
cmake_args, cwd=self.build_temp)
Expand Down
Loading