diff --git a/ci/build_pynvbench_wheel_for_cuda.sh b/ci/build_cuda_bench_wheel_for_cuda.sh similarity index 97% rename from ci/build_pynvbench_wheel_for_cuda.sh rename to ci/build_cuda_bench_wheel_for_cuda.sh index b95d43b..596d535 100755 --- a/ci/build_pynvbench_wheel_for_cuda.sh +++ b/ci/build_cuda_bench_wheel_for_cuda.sh @@ -78,7 +78,7 @@ python -m pip wheel --no-deps --verbose --wheel-dir dist . # Temporarily rename wheel to include CUDA version to avoid collision during multi-CUDA build # The merge script will combine these into a single wheel -for wheel in dist/pynvbench-*.whl; do +for wheel in dist/cuda_bench-*.whl; do if [[ -f "$wheel" ]]; then base_name=$(basename "$wheel" .whl) new_name="${base_name}.cu${cuda_version_major}.whl" @@ -89,4 +89,4 @@ done # Move wheel to output directory mkdir -p /workspace/wheelhouse -mv dist/pynvbench-*.cu*.whl /workspace/wheelhouse/ +mv dist/cuda_bench-*.cu*.whl /workspace/wheelhouse/ diff --git a/ci/build_multi_cuda_wheel.sh b/ci/build_multi_cuda_wheel.sh index 058dd31..12cfc6a 100755 --- a/ci/build_multi_cuda_wheel.sh +++ b/ci/build_multi_cuda_wheel.sh @@ -43,7 +43,7 @@ if [[ -z "${HOST_WORKSPACE:-}" ]]; then echo "Setting HOST_WORKSPACE to: $HOST_WORKSPACE" fi -# pynvbench must be built in a container that can produce manylinux wheels, +# cuda-bench must be built in a container that can produce manylinux wheels, # and has the CUDA toolkit installed. We use the rapidsai/ci-wheel image for this. # We build separate wheels using separate containers for each CUDA version, # then merge them into a single wheel. @@ -75,7 +75,7 @@ for ctk in 12 13; do --mount type=bind,source=${HOST_WORKSPACE},target=/workspace/ \ --env py_version=${py_version} \ $image \ - /workspace/ci/build_pynvbench_wheel_for_cuda.sh + /workspace/ci/build_cuda_bench_wheel_for_cuda.sh # Prevent GHA runners from exhausting available storage with leftover images: if [[ -n "${GITHUB_ACTIONS:-}" ]]; then docker rmi -f $image @@ -134,13 +134,13 @@ cd wheelhouse_merged # Unpack CUDA 12 wheel (this will be our base) $PYTHON -m wheel unpack "$cu12_wheel" -base_dir=$(find . -maxdepth 1 -type d -name "pynvbench-*" | head -1) +base_dir=$(find . -maxdepth 1 -type d -name "cuda_bench-*" | head -1) # Unpack CUDA 13 wheel into a temporary subdirectory mkdir cu13_tmp cd cu13_tmp $PYTHON -m wheel unpack "$cu13_wheel" -cu13_dir=$(find . -maxdepth 1 -type d -name "pynvbench-*" | head -1) +cu13_dir=$(find . -maxdepth 1 -type d -name "cuda_bench-*" | head -1) # Copy the cu13/ directory from CUDA 13 wheel into the base wheel cp -r "$cu13_dir"/cuda/bench/cu13 "../$base_dir/cuda/bench/" @@ -159,7 +159,7 @@ cd .. # Install auditwheel and repair the merged wheel $PYTHON -m pip install --break-system-packages auditwheel -for wheel in wheelhouse_merged/pynvbench-*.whl; do +for wheel in wheelhouse_merged/cuda_bench-*.whl; do echo "Repairing merged wheel: $wheel" $PYTHON -m auditwheel repair \ --exclude 'libcuda.so.1' \ @@ -177,12 +177,12 @@ rm -rf wheelhouse/* # Clean existing wheelhouse mkdir -p wheelhouse # Move only the final repaired merged wheel -if ls wheelhouse_final/pynvbench-*.whl 1> /dev/null 2>&1; then - mv wheelhouse_final/pynvbench-*.whl wheelhouse/ +if ls wheelhouse_final/cuda_bench-*.whl 1> /dev/null 2>&1; then + mv wheelhouse_final/cuda_bench-*.whl wheelhouse/ echo "Final merged wheel moved to wheelhouse" else echo "No final repaired wheel found, moving unrepaired merged wheel" - mv wheelhouse_merged/pynvbench-*.whl wheelhouse/ + mv wheelhouse_merged/cuda_bench-*.whl wheelhouse/ fi # Clean up temporary directories diff --git a/ci/test_pynvbench.sh b/ci/test_cuda_bench.sh similarity index 98% rename from ci/test_pynvbench.sh rename to ci/test_cuda_bench.sh index 5345151..87923d0 100755 --- a/ci/test_pynvbench.sh +++ b/ci/test_cuda_bench.sh @@ -74,7 +74,7 @@ echo "::group::🧪 Testing CUDA ${cuda_version} wheel on ${cuda_image}" --env cuda_version=${cuda_version} \ --env cuda_extra="${cuda_extra}" \ $cuda_image \ - /workspace/ci/test_pynvbench_inner.sh + /workspace/ci/test_cuda_bench_inner.sh # Prevent GHA runners from exhausting available storage with leftover images: if [[ -n "${GITHUB_ACTIONS:-}" ]]; then docker rmi -f $cuda_image diff --git a/ci/test_pynvbench_inner.sh b/ci/test_cuda_bench_inner.sh similarity index 65% rename from ci/test_pynvbench_inner.sh rename to ci/test_cuda_bench_inner.sh index 4303a5d..fca2147 100755 --- a/ci/test_pynvbench_inner.sh +++ b/ci/test_cuda_bench_inner.sh @@ -1,7 +1,7 @@ #!/bin/bash set -euo pipefail -# Target script for `docker run` command in test_pynvbench.sh +# Target script for `docker run` command in test_cuda_bench.sh # The /workspace pathnames are hard-wired here. # Install GCC 13 toolset (needed for builds that might happen during testing) @@ -24,15 +24,15 @@ echo "CUDA version: $(nvcc --version | grep release)" # Wheel should be in /workspace/wheelhouse (downloaded by workflow or built locally) WHEELHOUSE_DIR="/workspace/wheelhouse" -# Find the pynvbench wheel (multi-CUDA wheel) +# Find the cuda-bench wheel (multi-CUDA wheel) # Prefer manylinux wheels, fall back to any wheel -PYNVBENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/pynvbench-*manylinux*.whl 2>/dev/null | head -1)" -if [[ -z "$PYNVBENCH_WHEEL_PATH" ]]; then - PYNVBENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/pynvbench-*.whl 2>/dev/null | head -1)" +CUDA_BENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/cuda_bench-*manylinux*.whl 2>/dev/null | head -1)" +if [[ -z "$CUDA_BENCH_WHEEL_PATH" ]]; then + CUDA_BENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/cuda_bench-*.whl 2>/dev/null | head -1)" fi -if [[ -z "$PYNVBENCH_WHEEL_PATH" ]]; then - echo "Error: No pynvbench wheel found in ${WHEELHOUSE_DIR}" +if [[ -z "$CUDA_BENCH_WHEEL_PATH" ]]; then + echo "Error: No cuda-bench wheel found in ${WHEELHOUSE_DIR}" echo "Contents of ${WHEELHOUSE_DIR}:" ls -la ${WHEELHOUSE_DIR}/ || true exit 1 @@ -42,9 +42,9 @@ fi CUDA_EXTRA="${cuda_extra:-cu${cuda_version}}" TEST_EXTRA="test-cu${cuda_version}" -echo "Installing wheel: $PYNVBENCH_WHEEL_PATH with extras: ${TEST_EXTRA}" -python -m pip install "${PYNVBENCH_WHEEL_PATH}[${TEST_EXTRA}]" +echo "Installing wheel: $CUDA_BENCH_WHEEL_PATH with extras: ${TEST_EXTRA}" +python -m pip install "${CUDA_BENCH_WHEEL_PATH}[${TEST_EXTRA}]" # Run tests cd "/workspace/python/test/" -python -m pytest -v test_nvbench.py +python -m pytest -v test_cuda_bench.py diff --git a/python/cuda/bench/__init__.py b/python/cuda/bench/__init__.py index a47bb39..c02c14c 100644 --- a/python/cuda/bench/__init__.py +++ b/python/cuda/bench/__init__.py @@ -23,11 +23,11 @@ from cuda.pathfinder import ( # type: ignore[import-not-found] ) try: - __version__ = importlib.metadata.version("pynvbench") + __version__ = importlib.metadata.version("cuda-bench") except Exception as e: __version__ = "0.0.0dev" warnings.warn( - "Could not retrieve version of pynvbench package dynamically from its metadata. " + "Could not retrieve version of cuda-bench package dynamically from its metadata. " f"Exception {e} was raised. " f"Version is set to fall-back value '{__version__}' instead." ) @@ -47,7 +47,7 @@ def _get_cuda_major_version(): except ImportError: raise ImportError( "cuda-bindings is required for runtime CUDA version detection. " - "Install with: pip install pynvbench[cu12] or pip install pynvbench[cu13]" + "Install with: pip install cuda-bench[cu12] or pip install cuda-bench[cu13]" ) @@ -59,7 +59,7 @@ try: _nvbench_module = importlib.import_module(_module_fullname) except ImportError as e: raise ImportError( - f"No pynvbench extension found for CUDA {_cuda_major}.x. " + f"No cuda-bench extension found for CUDA {_cuda_major}.x. " f"This wheel may not include support for your CUDA version. " f"Supported CUDA versions: 12, 13. " f"Original error: {e}" diff --git a/python/pyproject.toml b/python/pyproject.toml index 284af82..4d288ac 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -3,7 +3,7 @@ requires = ["scikit-build-core>=0.10", "setuptools_scm"] build-backend = "scikit_build_core.build" [project] -name = "pynvbench" +name = "cuda-bench" description = "CUDA Kernel Benchmarking Package" authors = [{ name = "NVIDIA Corporation" }] license = { text = "Apache-2.0 WITH LLVM-exception" } @@ -36,10 +36,10 @@ cu12 = ["cuda-bindings>=12.0.0,<13.0.0", "nvidia-cuda-cupti-cu12"] cu13 = ["cuda-bindings>=13.0.0,<14.0.0", "nvidia-cuda-cupti>=13.0"] # Test dependencies for CUDA 12 -test-cu12 = ["pynvbench[cu12]", "pytest", "cupy-cuda12x", "numba"] +test-cu12 = ["cuda-bench[cu12]", "pytest", "cupy-cuda12x", "numba"] # Test dependencies for CUDA 13 -test-cu13 = ["pynvbench[cu13]", "pytest", "cupy-cuda13x", "numba"] +test-cu13 = ["cuda-bench[cu13]", "pytest", "cupy-cuda13x", "numba"] # Generic test dependencies (defaults to CUDA 12) test = ["pytest", "cupy-cuda12x", "numba"]