Repository navigation
Add TPC-Havoc correctness runs to the Presto nightly (CPU, GPU, GPU without CPU fallback) - #431
karthikeyann wants to merge 2 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
bdice
left a comment
There was a problem hiding this comment.
Can we separate general fixes into a separate PR from the TPC-Havoc implementations?
94eb543 to
d7a2a0c
Compare
|
@bdice Split out as you asked. The general fixes are now in #425: memory from |
d7a2a0c to
5bbd209
Compare
765e032 to
3e39d06
Compare
|
@bdice Created issues facebookincubator/velox#19585 and facebookincubator/velox#19586 to track fixes for the GPU failures. |
Run the BenchBox TPC-Havoc suite (22 TPC-H base queries plus 220 semantically equivalent variants) against a running Presto cluster and validate every result by value against its base query, DuckDB on the same Parquet data, and optionally an earlier run (e.g. GPU vs CPU). - presto/scripts/run_tpc_havoc.sh + presto/testing/tpc_havoc/: runner with pinned BenchBox and a known-issues file (exit 1 only on new failures). Writes summary.json, summary.md (failures grouped by reason, with repro commands) and an HTML report; combined_report.py compares several runs in one HTML report. - start_native_gpu_presto.sh --no-cpu-fallback (cudf.allow_cpu_fallback=false) to measure GPU coverage. The client then only sees "Replacement with cuDF operator failed", so the runner reads the reason velox-cudf logged from the worker log (worker_reason) and groups failures by it. - nightly_summary.py: one Markdown summary of several runs (engine table, failures by reason with new ones first, repro commands, SQL) for the CI log and job summary, plus a short Slack message. - .github/workflows/presto-tpc-havoc.yml: CPU, GPU and GPU without CPU fallback at SF10 on an RTX PRO 6000 runner with CUDA 13.1; fails only on new failures; posts the summary to Slack with post_to_slack. presto.yml runs it next to presto-test, and only the scheduled nightly posts to Slack.
…by-one count The entry matched any Q22 mismatch against DuckDB at SF100. Match only the known difference (one cell in the count column, off by exactly 1), so any other Q22 difference is still reported as a new failure. Also document the alternative fix (round AVG in the DuckDB reference SQL like Presto), which is deliberately not applied so the difference stays visible.
3e39d06 to
1812534
Compare
patdevinwilson
left a comment
There was a problem hiding this comment.
Comparing full answers across CPU, GPU, and strict GPU is useful coverage, and the narrowly scoped known-issue entries help keep the nightly actionable. One gap: when a requested DuckDB reference fails, _check_against marks the comparison 'not-validated', and _classify_failures doesn't count that as a failure. So execution can pass while the independent correctness check disappears. Could a missing requested reference make the run incomplete/non-green, with an explicit exception for known reference limitations? Comparing variants with their base is still useful, but the same engine can be wrong consistently across both.
Description
Adds TPC-Havoc correctness runs for Presto and runs them in the Presto nightly. TPC-Havoc is the 22 TPC-H base queries plus 220 rewritten variants of them (10 per query, generated by BenchBox) that must return the same results. It exercises query shapes and grammar that plain TPC-H doesn't, to track Presto GPU stability and coverage.
The general config fixes this work needed on a 256-core host (memory from
MemTotal, workernofileulimits,task.max-drivers-per-taskcapped at 255) moved to #425. The CI runners are smaller, so this PR doesn't depend on it.What's included
presto/scripts/run_tpc_havoc.shandpresto/testing/tpc_havoc/: the runner.--duckdb-data-dir, with an optional result cache keyed by query, data dir and SQL),--reference-dir, e.g. GPU vs CPU).known_issues.yamllists the expected failures (query globs, engines, scale factors, message regex, optional minimalreproSQL), so the run exits 1 only on new failures.summary.jsonandsummary.md(failures grouped by reason, with repro commands).run_tpc_havoc.shonly sets up the venv and waits for the worker; all other options go straight torun_tpc_havoc.py.start_native_gpu_presto.sh --no-cpu-fallback: setscudf.allow_cpu_fallback=false, so operators cuDF can't execute fail instead of quietly running on the CPU. Runner engine label:gpu-no-fallback.!isPureCpuOperator Replacement with cuDF operator failed. For that error the runner reads the worker log lines written while the query ran (presto/scripts/presto_logs/worker_*.log, waiting at most 2 s) and records what velox-cudf logged (Validation failed at function: ...) asworker_reason. Failures are grouped by its category, e.g.switch(...)becomes "multi-branch CASE (switch) expression not supported".nightly_summary.py(standard library only): one Markdown summary of several runs, printed at the end of the job log and appended to the job summary..github/workflows/presto-tpc-havoc.yml:linux-amd64-gpu-rtxpro6000-latest-1with the CUDA 13.1 image.post_to_slack(default false), posts the summary to #swrapids-velox-cudf-nightly. It uses the same action and webhook secret (SLACK_WEBHOOK_NIGHTLY_STATUS_URL) asnightly-status-report.yml. The secret is declared as an optionalworkflow_callsecret.presto.ymlruns it next topresto-test, with the sameneedsandrun_testscondition.post_to_slackisgithub.event_name == 'schedule', so only the scheduled nightly posts (both the upstream and pinned variants); manual dispatches don't.presto-nightly.ymlalready forwards secrets withsecrets: inherit.Example Slack message
From a live GPU-without-fallback run of queries 1, 5 and 16, with
--known-issues ''so that every failure counts as new:With the default known issues, the same run reports no new failures and lists the 7 known reasons only in the job summary.
Results (presto master
b11f2053bbc, velox mainb2bff1217, 1 worker, SF10)FILTERon a window function, and 1 uses DuckDB'slist().EXTRACT(YEAR …)comes out as INT16 instead of BIGINT, so aCASEmixing it with another BIGINT fails incudf::copy_if_else.CASE.All of these are listed in
known_issues.yaml. GPU SF100 shows the same pass/fail set. At SF100 the DuckDB check of Q22 also differs: Presto roundsAVG(DECIMAL)to the input scale, while DuckDB uses DOUBLE. This is listed as a known engine difference.Testing
tpc_havoc_runner_test.py: 25 tests pass in under a second.Open questions
172276a3, installed from a source archive. A local BenchBox fix for the Q16_V6 variant isn't upstream yet, so Q16_V6 is listed as a known issue.