diff --git a/bench/sf1000-repro/README.md b/bench/sf1000-repro/README.md index efd442b3e7..d71c9f442a 100644 --- a/bench/sf1000-repro/README.md +++ b/bench/sf1000-repro/README.md @@ -27,6 +27,11 @@ pixi run bash bench/sf1000-repro/build-libcudf.sh DATA=/path/to/tpch_parquet_sf1000 pixi run bash bench/sf1000-repro/run.sh ``` +The build helper takes `nvJitLink.h` and `libnvJitLink.so.13` from Pixi's +`libnvjitlink-dev`/`libnvjitlink` packages; it does not require a system CUDA +toolkit. To check those inputs without cloning or compiling cuDF, run +`SIRIUS_CUDA_PREFLIGHT_ONLY=1 pixi run --frozen bash bench/sf1000-repro/build-libcudf.sh`. + For the TPC-H **official power/throughput run** (RF1/RF2 refresh functions, Power@Size / Throughput@Size / QphH@Size) with this same performance stack, use `run-power.sh` — it runs on a native `.duckdb` dataset (the MVCC refresh path needs it) with the mixed-tier pin layout in diff --git a/bench/sf1000-repro/build-libcudf.sh b/bench/sf1000-repro/build-libcudf.sh index 6db28c95a5..d85dadf232 100755 --- a/bench/sf1000-repro/build-libcudf.sh +++ b/bench/sf1000-repro/build-libcudf.sh @@ -14,7 +14,34 @@ CUDF_SRC="${CUDF_SRC:-$HOME/cudf-src}" SHIM="${SHIM:-$HOME/cudf-shim}" BRANCH=perf/sirius-sf1000-repro -[ -n "${CONDA_PREFIX:-}" ] || { echo "ERROR: run inside the pixi env (pixi run bash $0)"; exit 1; } +[ -n "${PIXI_PROJECT_ROOT:-}" ] && [ -n "${PIXI_ENVIRONMENT_NAME:-}" ] && + [ -d "${CONDA_PREFIX:-}" ] && + [ "$(realpath "$CONDA_PREFIX")" = "$(realpath "$PIXI_PROJECT_ROOT/.pixi/envs/$PIXI_ENVIRONMENT_NAME")" ] || { + echo "ERROR: run inside the Sirius pixi env (pixi run --frozen bash $0)" >&2 + exit 1 +} + +# jitify2_preprocess needs the development header, not just libnvJitLink's +# runtime. Both must come from the same Pixi environment as cuDF and NVCC. +NVJITLINK_HEADER= +for include_dir in "$CONDA_PREFIX/include" "$CONDA_PREFIX/targets/$(uname -m)-linux/include"; do + if [ -f "$include_dir/nvJitLink.h" ]; then + NVJITLINK_HEADER=$include_dir/nvJitLink.h + break + fi +done +[ -n "$NVJITLINK_HEADER" ] || { + echo "ERROR: Pixi libnvjitlink-dev is missing nvJitLink.h; run pixi install --frozen" >&2 + exit 1 +} +[ -f "$CONDA_PREFIX/lib/libnvJitLink.so.13" ] || { + echo "ERROR: Pixi libnvjitlink is missing libnvJitLink.so.13; run pixi install --frozen" >&2 + exit 1 +} +if [ "${SIRIUS_CUDA_PREFLIGHT_ONLY:-0}" = 1 ]; then + echo "Pixi CUDA development inputs are present in $CONDA_PREFIX" + exit 0 +fi if [ ! -d "$CUDF_SRC/.git" ]; then echo "==> cloning felipeblazing/cudf @ $BRANCH" @@ -26,15 +53,11 @@ else git -C "$CUDF_SRC" checkout -q FETCH_HEAD fi -# The pixi env ships the libnvjitlink RUNTIME but not its dev header, and jitify2_preprocess -# needs nvJitLink.h. Symlink JUST that header (plus the .so name jitify expects) rather than -# putting the whole system CUDA include tree ahead of conda's -- that would cause version skew. +# Keep the jitify2 shim, but link only inputs from the activated Pixi prefix. echo "==> nvJitLink shim at $SHIM" mkdir -p "$SHIM/include" "$SHIM/lib" -SYS_CUDA=$(ls -d /usr/local/cuda-13.*/targets/*/include 2>/dev/null | head -1) -[ -n "$SYS_CUDA" ] || { echo "ERROR: no system CUDA 13.x include dir for nvJitLink.h"; exit 1; } -ln -sf "$SYS_CUDA/nvJitLink.h" "$SHIM/include/nvJitLink.h" -ln -sf "$(ls "$CONDA_PREFIX"/lib/libnvJitLink.so.13* | head -1)" "$SHIM/lib/libnvJitLink.so" +ln -sf "$NVJITLINK_HEADER" "$SHIM/include/nvJitLink.h" +ln -sf "$CONDA_PREFIX/lib/libnvJitLink.so.13" "$SHIM/lib/libnvJitLink.so" # CRITICAL: append to $CXXFLAGS / $LDFLAGS, never replace them. Passing a bare # -DCMAKE_CXX_FLAGS= clobbers conda's flags, dropping -isystem $CONDA_PREFIX/include; CMake then diff --git a/pixi.lock b/pixi.lock index b2bdd9c6b8..11420277c2 100644 --- a/pixi.lock +++ b/pixi.lock @@ -722,6 +722,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvcomp-dev-5.3.0.16-h7bcfba5_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvfatbin-13.4.92-hd2095e1_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvjitlink-13.4.92-hd2095e1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvjitlink-dev-13.4.92-hd2095e1_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvptxcompiler-dev-13.4.92-ha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.34-pthreads_hcf972fe_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libopentelemetry-cpp-1.27.0-h3133023_1.conda @@ -986,6 +987,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libnvcomp-dev-5.3.0.16-he387df4_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libnvfatbin-13.4.92-hae6cbe8_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libnvjitlink-13.4.92-hae6cbe8_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libnvjitlink-dev-13.4.92-hae6cbe8_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libnvptxcompiler-dev-13.4.92-h579c4fd_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libopenblas-0.3.34-pthreads_hdd72021_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-aarch64/libopentelemetry-cpp-1.27.0-hbe47268_1.conda @@ -1397,6 +1399,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvcomp-dev-5.3.0.16-h7bcfba5_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvfatbin-13.3.29-hecca717_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvjitlink-13.4.92-hd2095e1_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvjitlink-dev-13.4.92-hd2095e1_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libnvptxcompiler-dev-13.3.73-ha770c72_1.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libopenblas-0.3.34-pthreads_hf13c14d_2.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/libopentelemetry-cpp-1.27.0-h3133023_1.conda diff --git a/pixi.toml b/pixi.toml index 4a7ddba4be..cdb19b5ce9 100644 --- a/pixi.toml +++ b/pixi.toml @@ -23,6 +23,7 @@ bc = "*" cmake = "4.*" cuda-nvcc = "*" cuda-nvml-dev = "*" +cuda-sanitizer-api = "*" cxx-compiler = "*" make = "*" ninja = "*" @@ -88,6 +89,7 @@ platforms = ["linux-64-cuda13", "linux-aarch64-cuda13"] cuda-version = "13.4.*" libcudf = "==26.08.01" libcuvs = "==26.08.01" +libnvjitlink-dev = "*" [feature.cuda13.activation.env] # GPU architectures: Turing through Blackwell (75, 80, 86, 89, 90a, 100f, 120a, 120) @@ -117,6 +119,7 @@ cuda-version = "13.3.*" libcudf = "==26.08.01" libcuvs = "==26.08.01" librmm = "26.08.*" +libnvjitlink-dev = "*" gcc_linux-64 = "14.*" gxx_linux-64 = "14.*" patchelf = "*" diff --git a/test/scripts/sanitizer_gate_22.sh b/test/scripts/sanitizer_gate_22.sh index 1afa7c9b3c..dad8d64b71 100755 --- a/test/scripts/sanitizer_gate_22.sh +++ b/test/scripts/sanitizer_gate_22.sh @@ -65,10 +65,16 @@ set -euo pipefail -CUDA_BIN=$(ls -1 /usr/local/cuda*/bin/compute-sanitizer 2>/dev/null | head -1) -if [[ -z "${CUDA_BIN}" ]]; then - echo "[p22-sanitizer-gate] ERROR: compute-sanitizer not found under /usr/local/cuda*/bin/" - echo "[p22-sanitizer-gate] HINT: install CUDA toolkit, or set CUDA_BIN env override" +if [[ -z "${PIXI_PROJECT_ROOT:-}" || -z "${PIXI_ENVIRONMENT_NAME:-}" || -z "${CONDA_PREFIX:-}" || + ! -d "${CONDA_PREFIX:-}" || + "$(realpath "${CONDA_PREFIX:-/nonexistent}")" != "$(realpath "${PIXI_PROJECT_ROOT:-/nonexistent}/.pixi/envs/${PIXI_ENVIRONMENT_NAME:-missing}")" ]]; then + echo "[p22-sanitizer-gate] ERROR: run inside the Sirius Pixi environment" + exit 2 +fi +CUDA_BIN="${CONDA_PREFIX}/bin/compute-sanitizer" +if [[ ! -x "${CUDA_BIN}" ]]; then + echo "[p22-sanitizer-gate] ERROR: Pixi compute-sanitizer missing at ${CUDA_BIN}" + echo "[p22-sanitizer-gate] HINT: run pixi install --frozen" exit 2 fi @@ -79,7 +85,7 @@ TIMEOUT_SEC="${P22_TIMEOUT_SEC:-600}" if [[ ! -x "${UNIT}" ]]; then echo "[p22-sanitizer-gate] ERROR: unittest binary not found or not executable at ${UNIT}" - echo "[p22-sanitizer-gate] HINT: build first (mcp__project-commands__run_command build)" + echo "[p22-sanitizer-gate] HINT: build the Sirius unit tests in this Pixi environment" echo "[p22-sanitizer-gate] HINT: or set P22_UNITTEST_BIN env override" exit 2 fi