The batch runner scripts/evaluation/run_eval_batch.py enumerates translation pairs from
the manifest, sends each source kernel to a model for translation, and grades every
translation through the harness (build → run → verify). One JSON result file per task lands
under results/evaluation/<model>/.
source env_parbench/bin/activate
python3 scripts/evaluation/run_eval_batch.py \
--suite rodinia \
--direction cuda-to-omp \
--models <model-id> \
--pair-contracts config/pair_contracts_v2.json \
--project-root . \
--resume -v--directionisSRC-to-TGTover the APIscuda,omp,opencl,omp_target.--suitefilters to one suite. Always pass it: without it,--kernels nwmatches every suite that has a kernel namednw.--kernelscomposes with--suite.--modelstakes one or more model IDs fromMODEL_REGISTRYinscripts/evaluation/llm_evaluate.py; add your own entry there to evaluate a new model or provider (Anthropic, OpenAI/Azure, Together, and OpenAI-compatible endpoints are supported).--resume(the default) skips tasks whose result file already exists, so an interrupted batch continues where it stopped.--resumealso re-attempts tasks that ended inERRORorEXTRACTION_FAIL; use--no-resumeto re-run everything.--pair-contractsnames the pair-contract registry. Any batch containing cross-API tasks fails closed before the first model call if the registry is missing or incomplete. The contract declares the oracle and the run arguments for each source→target pair: verification always uses the target API's own oracle; the translated program's run arguments follow the program that actually runs (target-native arguments for kernel-only pairs, where only.clkernel files are rewritten and the target host binary is untouched; source arguments for full-program pairs, where the model keeps source argument parsing). Useconfig/pair_contracts_v2.json(current) for new runs;config/final_pair_contracts.jsonis the frozen registry behind the sealed NeurIPS evidence package and is kept only for provenance.
Useful variations: --augment-levels 0 1 2 evaluates augmented source variants
(L0 is the unmodified original), --max-retries 3 enables iterative repair with build-error
feedback, and --temperature 0.7 --num-samples 3 draws independent samples per task for
pass@k.
Two spec lists in harness/constants.py govern eligibility, and both are enforced by code
rather than by convention:
EXCLUDED_SPECS(10 specs): kernels whose baseline is broken in the current toolchain (KNOWN_FAIL). The batch runner'sresolve_excluded_specs(scripts/evaluation/run_eval_batch.py:118) removes them from every batch on entry; the CLI flag--excluded-specscan add exclusions but never remove one. Rationale: source-side, an unverified baseline makes a PASS meaningless; target-side, broken infrastructure makes the evaluation unfair.CORRECTNESS_INELIGIBLE_SPECS(13 specs): the 10 above plus the 3 mixbench specs, which run but expose no extractable computed value and therefore carry no correctness oracle. The analysis scripts drop any record whose source or target spec is in this list from every correctness denominator; mixbench records remain usable for performance-only analysis.
With --num-samples n at a sampling temperature above zero, each task gets n independent
translations. The analysis uses the unbiased estimator of Chen et al. (2021)
(pass_at_k in scripts/analysis/statistical_analysis.py:901):
pass@k = 1 - C(n-c, k) / C(n, k)
where c of the n samples passed. For n = k it reduces to any-of-k task success. The
paper's headline configuration is pass@3: three samples per task at temperature 0.7 with
model reasoning enabled.
Each result JSON's authoritative verdict is overall_status: PASS, BUILD_FAIL,
RUN_FAIL, VERIFY_FAIL, EXTRACTION_FAIL, or ERROR. The attempts[] array is the
per-attempt record (top-level run_status can be stale on multi-attempt tasks; ignore it).
Aggregate a finished batch with:
python3 scripts/evaluation/analyze_eval.py --project-root . --results-dir results/evaluationwhich writes eval_summary.json and eval_summary.md, including pass rates by direction,
model, and translation complexity.