Maybe fix to test script

This commit is contained in:
Ashwin Srinath
2025-12-03 12:47:43 -05:00
parent d1efef03bc
commit 9746aa14df

View File

@@ -1,6 +1,9 @@
#!/bin/bash
set -euo pipefail
# Enable verbose output for debugging
set -x
ci_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$ci_dir/pyenv_helper.sh"
@@ -39,17 +42,35 @@ fi
# Determine CUDA major version from environment
cuda_major_version=$(nvcc --version | grep release | awk '{print $6}' | tr -d ',' | cut -d '.' -f 1 | cut -d 'V' -f 2)
# Setup Python environment
setup_python_env "${py_version}"
# Setup Python environment (skip if we're already in ci-wheel container with correct Python)
echo "Checking for Python ${py_version}..."
if command -v python &> /dev/null; then
actual_py_version=$(python --version 2>&1 | awk '{print $2}' | cut -d. -f1,2)
echo "Found Python version: ${actual_py_version}"
if [[ "${actual_py_version}" == "${py_version}" ]]; then
echo "Python ${py_version} already available, skipping pyenv setup"
python -m pip install --upgrade pip
else
echo "Python version mismatch (found ${actual_py_version}, need ${py_version})"
echo "Setting up Python ${py_version} with pyenv"
setup_python_env "${py_version}"
fi
else
echo "Python not found, setting up with pyenv"
setup_python_env "${py_version}"
fi
echo "Python setup complete, version: $(python --version)"
# Wheel should be in /workspace/wheelhouse (downloaded by workflow or built locally)
WHEELHOUSE_DIR="/workspace/wheelhouse"
# Find and install pynvbench wheel
PYNVBENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/pynvbench-*+cu${cuda_version}*.whl 2>/dev/null | head -1)"
# Look for .cu${cuda_version} in the version string (e.g., pynvbench-0.0.1.dev1+g123.cu12-...)
PYNVBENCH_WHEEL_PATH="$(ls ${WHEELHOUSE_DIR}/pynvbench-*.cu${cuda_version}-*.whl 2>/dev/null | head -1)"
if [[ -z "$PYNVBENCH_WHEEL_PATH" ]]; then
echo "Error: No pynvbench wheel found in ${WHEELHOUSE_DIR}"
echo "Looking for: pynvbench-*+cu${cuda_version}*.whl"
echo "Looking for: pynvbench-*.cu${cuda_version}-*.whl"
echo "Contents of ${WHEELHOUSE_DIR}:"
ls -la ${WHEELHOUSE_DIR}/ || true
exit 1