Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
101 changes: 100 additions & 1 deletion .github/workflows/velox_backend_x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,38 @@
name: Velox Backend (x86)

on:
workflow_dispatch:
inputs:
table_cache_benchmark_rows:
description: 'Rows for ColumnarTableCacheLazyDeserBenchmark manual evidence runs'
required: false
default: '5000000'
type: string
table_cache_benchmark_partitions:
description: 'Partitions for ColumnarTableCacheLazyDeserBenchmark manual evidence runs'
required: false
default: '32'
type: string
table_cache_benchmark_iterations:
description: 'Iterations for ColumnarTableCacheLazyDeserBenchmark manual evidence runs'
required: false
default: '3'
type: string
table_cache_benchmark_phases:
description: 'Comma-separated phases for ColumnarTableCacheLazyDeserBenchmark manual evidence runs'
required: false
default: 'build,read1,read4,readAll,filter'
type: string
table_cache_benchmark_include_legacy_baseline:
description: 'Whether to include the eager V2 modes (without-stats + with-stats) alongside the V3 lazy modes; false runs only the two V3 modes'
required: false
default: 'true'
type: string
table_cache_benchmark_max_ram_pct:
description: 'JVM -XX:MaxRAMPercentage for the benchmark; heap auto-sizes to the runner RAM and the benchmark auto-scales rows to fit it (small runner => fewer rows, large runner => full request)'
required: false
default: '70.0'
type: string
pull_request:
paths:
- '.github/workflows/velox_backend_x86.yml'
Expand Down Expand Up @@ -1188,13 +1220,80 @@ jobs:
cd ./cpp/build && ctest -V
- name: Run CPP benchmark test
run: |
$MVN_CMD clean test -Pspark-3.5 -Pbackends-velox -pl backends-velox -am \
$MVN_CMD clean install -Pspark-3.5 -Pbackends-velox -pl backends-velox -am \
-DtagsToInclude="org.apache.gluten.tags.GenerateExample" -Dtest=none -DfailIfNoTests=false -Dexec.skip
# This test depends on files generated by the above mvn test.
./cpp/build/velox/benchmarks/generic_benchmark --with-shuffle --partitioning hash --threads 1 --iterations 1 \
--conf $(realpath backends-velox/generated-native-benchmark/conf_12_0_*.ini) \
--plan $(realpath backends-velox/generated-native-benchmark/plan_12_0_*.json) \
--data $(realpath backends-velox/generated-native-benchmark/data_12_0_*_0.parquet),$(realpath backends-velox/generated-native-benchmark/data_12_0_*_1.parquet)
- name: Run table cache lazy deserialization benchmark
if: github.event_name == 'workflow_dispatch'
# Large manual-evidence runs (e.g. 100M rows x 4 cache modes) rebuild the cache many times
# in the build phase; allow up to 5h. The result file is tee'd incrementally and uploaded
# via always(), so even a timeout still yields the phases that completed.
timeout-minutes: 300
env:
TABLE_CACHE_BENCHMARK_ROWS: ${{ inputs.table_cache_benchmark_rows || '5000000' }}
TABLE_CACHE_BENCHMARK_PARTITIONS: ${{ inputs.table_cache_benchmark_partitions || '32' }}
TABLE_CACHE_BENCHMARK_ITERATIONS: ${{ inputs.table_cache_benchmark_iterations || '3' }}
TABLE_CACHE_BENCHMARK_PHASES: ${{ inputs.table_cache_benchmark_phases || 'build,read1,read4,readAll,filter' }}
TABLE_CACHE_BENCHMARK_INCLUDE_LEGACY_BASELINE: ${{ inputs.table_cache_benchmark_include_legacy_baseline || 'true' }}
TABLE_CACHE_BENCHMARK_MAX_RAM_PCT: ${{ inputs.table_cache_benchmark_max_ram_pct || '70.0' }}
run: |
set -o pipefail
mkdir -p benchmarks
RESULT_FILE=benchmarks/ColumnarTableCacheLazyDeserBenchmark-results.txt
{
echo "ColumnarTableCacheLazyDeserBenchmark GHA config"
echo "commit=${GITHUB_SHA}"
echo "event=${GITHUB_EVENT_NAME}"
echo "run_id=${GITHUB_RUN_ID}"
echo "run_attempt=${GITHUB_RUN_ATTEMPT}"
echo "run_url=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
echo "ref=${GITHUB_REF}"
echo "head_commit=$(git rev-parse HEAD)"
echo "head_parent=$(git rev-parse HEAD^ 2>/dev/null || true)"
echo "head_ref=${GITHUB_HEAD_REF}"
echo "base_ref=${GITHUB_BASE_REF}"
echo "workflow=${GITHUB_WORKFLOW}"
echo "job=${GITHUB_JOB}"
echo "runner_os=${RUNNER_OS}"
echo "runner_arch=${RUNNER_ARCH}"
echo "java_home=${JAVA_HOME:-}"
echo "uname=$(uname -a)"
echo "cpu_count=$(nproc 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || echo unknown)"
echo "spark_profile=spark-3.5"
echo "scala_profile=scala-2.12"
echo "backend=velox"
echo "rows=${TABLE_CACHE_BENCHMARK_ROWS}"
echo "partitions=${TABLE_CACHE_BENCHMARK_PARTITIONS}"
echo "iterations=${TABLE_CACHE_BENCHMARK_ITERATIONS}"
echo "phases=${TABLE_CACHE_BENCHMARK_PHASES}"
echo "includeLegacyBaseline=${TABLE_CACHE_BENCHMARK_INCLUDE_LEGACY_BASELINE}"
echo "max_ram_pct=${TABLE_CACHE_BENCHMARK_MAX_RAM_PCT}"
echo "mem_total=$(free -h 2>/dev/null | awk '/^Mem:/{print $2}' || echo unknown)"
java -version 2>&1
} | tee "${RESULT_FILE}"
export MAVEN_OPTS="-Xss128m -XX:MaxRAMPercentage=${TABLE_CACHE_BENCHMARK_MAX_RAM_PCT} -XX:ReservedCodeCacheSize=2g \
-Dspark.test.home=/opt/shims/spark35/spark_home/ \
-Dspark.gluten.benchmark.rows=${TABLE_CACHE_BENCHMARK_ROWS} \
-Dspark.gluten.benchmark.partitions=${TABLE_CACHE_BENCHMARK_PARTITIONS} \
-Dspark.gluten.benchmark.iterations=${TABLE_CACHE_BENCHMARK_ITERATIONS} \
-Dspark.gluten.benchmark.phases=${TABLE_CACHE_BENCHMARK_PHASES} \
-Dspark.gluten.benchmark.includeLegacyBaseline=${TABLE_CACHE_BENCHMARK_INCLUDE_LEGACY_BASELINE}"
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/cpp/build/releases \
$MVN_CMD test-compile exec:java -Pspark-3.5 -Pbackends-velox -pl backends-velox \
-Dexec.classpathScope=test \
-Dexec.mainClass=org.apache.spark.sql.execution.benchmark.ColumnarTableCacheLazyDeserBenchmark \
| tee -a "${RESULT_FILE}"
- name: Upload table cache lazy deserialization benchmark results
if: github.event_name == 'workflow_dispatch' && always()
uses: actions/upload-artifact@v4
with:
name: table-cache-lazy-deserialization-benchmark
path: benchmarks/ColumnarTableCacheLazyDeserBenchmark-results.txt
if-no-files-found: ignore
- name: Run UDF test
run: |
yum install -y java-17-openjdk-devel
Expand Down
Loading
Loading