Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
37fe411
Benchmarking cudf tpch python bindings using air speed velocity package
Avinash-Raj Nov 5, 2025
d7b478b
support for record and append samples for same machine
Avinash-Raj Nov 5, 2025
60a740d
Made asv graphs to work after changing the environment type to virtua…
Avinash-Raj Nov 6, 2025
e014278
Added support for --interleav-rounds
Avinash-Raj Nov 10, 2025
c897210
fixed bash turning uppercase to lowercase issue
Avinash-Raj Nov 10, 2025
b42e16c
add support for publishing existsing benchmark results
Avinash-Raj Nov 10, 2025
d5b2453
added script to benchmark range of velox commits
Avinash-Raj Nov 10, 2025
8c36b27
added .sccache_auth dir to gitignore
Avinash-Raj Nov 10, 2025
1fe82ab
Added asv_benchmark readme files
Avinash-Raj Nov 10, 2025
998d9a4
Added interleave-rounds option
Avinash-Raj Nov 10, 2025
26cbfe4
combined multiple readme files into one
Avinash-Raj Nov 10, 2025
de03e71
updated asv_benchmarks readme.md file
Avinash-Raj Nov 10, 2025
4041a1c
removed COMMIT_RANGE_BENCHMARKING.md
Avinash-Raj Nov 10, 2025
68869ae
Added TPCH python bindings as velox patches
Avinash-Raj Nov 13, 2025
f0c4cf2
support for range and endpoints mode in run_asv_commit_range.sh script
Avinash-Raj Nov 13, 2025
4764f6a
rebuild velox deps image if incase of velox build failure
Avinash-Raj Nov 13, 2025
8bdeffa
added sccache version to the range script
Avinash-Raj Nov 14, 2025
1050671
final working commit
Avinash-Raj Nov 18, 2025
3a32633
updated asv benchmarks readme
Avinash-Raj Nov 18, 2025
8109439
Fixed commit iteration failed to process/benchmark more than 2 commits.
Avinash-Raj Nov 20, 2025
ac15358
Upadated the range script to rebuild adapters image for each commit
Avinash-Raj Nov 20, 2025
064bcbc
Updated readme
Avinash-Raj Nov 20, 2025
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ benchmark_output

# Generated Presto Config
presto/docker/config/generated/
velox/asv_benchmarks/results/
velox/asv_benchmarks/.asv/
**/.sccache-auth/
58 changes: 58 additions & 0 deletions velox/asv_benchmarks/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# ASV Benchmarks Docker Ignore File
# Excludes unnecessary files from Docker build context

# ASV generated files and directories
.asv/
*.html

# Python cache and build artifacts
__pycache__/
*.py[cod]
*$py.class
*.so
*.egg
*.egg-info/
dist/
build/
.eggs/

# Virtual environments
venv/
env/
ENV/

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Git
.git/
.gitignore

# Documentation (already in image)
*.md
docs/

# Test files (not needed for benchmark runs)
tests/
test_*.py
*_test.py

# Jupyter notebooks
*.ipynb
.ipynb_checkpoints/

# Coverage reports
htmlcov/
.coverage
.coverage.*
coverage.xml
*.cover

# Logs
*.log

108 changes: 108 additions & 0 deletions velox/asv_benchmarks/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Dockerfile for Velox ASV Benchmarks with Cython Python Bindings
# This dockerfile builds Cython-based Python bindings for TPC-H benchmarks and runs ASV
#
# Build from the velox-adapters-build image which already has Velox compiled
# with CUDF support

FROM velox-adapters-build:latest

# Install Python development dependencies for Cython bindings
RUN dnf install -y \
python3-devel \
python3-pip \
&& dnf clean all

# Upgrade pip and install Python packages
RUN python3 -m pip install --upgrade pip setuptools wheel

# Install Cython, ASV, and other Python dependencies
RUN python3 -m pip install \
'Cython>=0.29' \
numpy \
asv \
&& python3 -m pip cache purge

# Get build configuration from environment
ARG BUILD_BASE_DIR=/opt/velox-build
ARG BUILD_TYPE=release
ARG TPCH_DATA_PATH=/workspace/velox/velox-benchmark-data

# Set environment variables for runtime
ENV VELOX_ROOT=/workspace/velox \
VELOX_BUILD_DIR=${BUILD_BASE_DIR}/${BUILD_TYPE} \
BUILD_BASE_DIR=${BUILD_BASE_DIR} \
BUILD_TYPE=${BUILD_TYPE} \
TPCH_DATA_PATH=${TPCH_DATA_PATH} \
PYTHONUNBUFFERED=1

# Update LD_LIBRARY_PATH to include Python bridge library location
ENV LD_LIBRARY_PATH=${BUILD_BASE_DIR}/${BUILD_TYPE}/velox/experimental/cudf/benchmarks/python/cpp/tpch:${BUILD_BASE_DIR}/${BUILD_TYPE}/lib:${BUILD_BASE_DIR}/${BUILD_TYPE}/_deps/cudf-build:${BUILD_BASE_DIR}/${BUILD_TYPE}/_deps/rmm-build:${BUILD_BASE_DIR}/${BUILD_TYPE}/_deps/rapids_logger-build:${BUILD_BASE_DIR}/${BUILD_TYPE}/_deps/kvikio-build:${BUILD_BASE_DIR}/${BUILD_TYPE}/_deps/nvcomp_proprietary_binary-src/lib64:${LD_LIBRARY_PATH}

# Set working directory
WORKDIR /workspace/velox

# Configure git to trust the repository (for ASV git operations)
RUN git config --global --add safe.directory /workspace/velox

# Build the Python bindings at image build time
# This runs the CMake build for the C++ bridge and then builds the Cython extensions
RUN --mount=type=bind,source=velox,target=/workspace/velox,ro \
<<EOF
set -euxo pipefail

# Copy Python bindings source to a writable location
# We need this because build.sh builds "in-place" and the mounted source is read-only
echo "Copying Python bindings source to writable location..."
mkdir -p /tmp/python-bindings
cp -r /workspace/velox/velox/experimental/cudf/benchmarks/python/* /tmp/python-bindings/

# Build both C++ bridge and Cython bindings using the official build.sh script
echo "Building C++ bridge and Cython bindings using build.sh..."
cd /tmp/python-bindings

# Set environment variables for build.sh
export VELOX_ROOT=/workspace/velox
export VELOX_BUILD_DIR=${VELOX_BUILD_DIR}

# Run the official build script
bash build.sh

# Verify the C++ wrapper library was built
WRAPPER_LIB="${VELOX_BUILD_DIR}/velox/experimental/cudf/benchmarks/python/cpp/tpch/libpython_benchmark_bridge_tpch.so"
if [ ! -f "${WRAPPER_LIB}" ]; then
echo "ERROR: Failed to build C++ wrapper library: ${WRAPPER_LIB}"
exit 1
fi

# Verify .so files were created
if ! ls cudf_tpch_benchmark*.so 1> /dev/null 2>&1; then
echo "ERROR: Failed to build Cython bindings - .so file not found"
exit 1
fi

echo "✓ C++ bridge and Cython bindings built successfully"

# Install the Python package using pip
# Use --no-build-isolation because extensions are already built by build.sh
echo "Installing Python bindings package..."
pip3 install --no-build-isolation --no-deps .

# Verify installation
python3 -c "import cudf_tpch_benchmark; print('✓ Package installed successfully')" || {
echo "ERROR: Failed to import installed package"
exit 1
}

echo "✓ Python bindings installed to system Python"

EOF

# Copy and setup entrypoint script
COPY velox-testing/velox/asv_benchmarks/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Expose port for viewing results
EXPOSE 8080

# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]
Loading