feat(flydsl): skip strict COMMANDMENT correctness on translation runs#283
Open
peyron-amd wants to merge 2 commits into
Open
feat(flydsl): skip strict COMMANDMENT correctness on translation runs#283peyron-amd wants to merge 2 commits into
peyron-amd wants to merge 2 commits into
Conversation
A PyTorch->FlyDSL translation run already validates correctness with the op-aware scaled-tolerance translation harness. The downstream second/ COMMANDMENT harness then re-checks with a strict fixed tolerance and rejects otherwise-correct translated kernels. Gate that strict CORRECTNESS behind the GEAK_TRANSLATION_RUN signal: on a translation run it is skipped (correctness marked "skipped") while benchmarking still runs; non-translation runs are unchanged. - translate.py / preprocessor.py: set GEAK_TRANSLATION_RUN=1 on a successful translation and emit GEAK_RESULT_* markers so the benchmark phase can still parse latency/speedup from the translation harness - evaluation.py: skip strict CORRECTNESS, keep benchmark; preflight smoke-tests SETUP only on a translation run - baseline.py: skip the strict baseline correctness gate on translation runs - adapter.py: allow preprocess to proceed into optimization past a harness-verifier correctness rejection on a translation run - tests/postprocess/test_translation_gate.py: deterministic gate tests Note: depends on the FlyDSL translation->optimization pipeline fixes (per-run staging etc.) to be exercised end to end; the gate logic itself is covered by the included unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Skip strict COMMANDMENT correctness on PyTorch→FlyDSL translation runs
Problem
A PyTorch→FlyDSL translation run already validates correctness with the
op-aware, scaled-tolerance translation harness. The downstream
second / COMMANDMENT harness then re-checks the same kernel with a
strict fixed tolerance and rejects translated kernels that are
actually correct (numerically equivalent within the op-aware tolerance).
This blocks otherwise-good translations from proceeding to optimization.
Change
Gate the strict COMMANDMENT
CORRECTNESSphase behind theGEAK_TRANSLATION_RUNsignal:correctness: "skipped"), while benchmarking still runs so we keeplatency/speedup numbers.
--kernel-url): behavioris unchanged — the strict gate still applies.
Files
run/preprocess/translate.py/run/preprocess/preprocessor.pyGEAK_TRANSLATION_RUN=1on a successful translation; emitGEAK_RESULT_*markers so the benchmark phase can still parse latency/speedup from the translation harnessrun/postprocess/evaluation.pyCORRECTNESS, keep benchmark; preflight smoke-tests[SETUP]only on a translation runrun/preprocess_v3/baseline.pyrun/preprocess_v3/adapter.pytests/postprocess/test_translation_gate.pyTesting
tests/postprocess/test_translation_gate.pycovers the gatinglogic standalone (translation runs skip strict correctness; non-translation
runs enforce it; preflight selects the right sections). These pass without
the full pipeline / GPU.
geakPyTorch→FlyDSL run (level3/1_MLP,claude-opus-4.6,
fullmode). Observed live:GEAK_TRANSLATION_RUN=1 — smoke-testing SETUP only (strict CORRECTNESS skipped),with the run proceeding into the optimization stage and benchmarking intact.
Dependency / ordering
This gate is only exercised end to end once translation reaches the second
harness, which relies on the FlyDSL translation→optimization pipeline fixes in
#275 (per-run
_opt_repostaging, reference-kernel staging, etc.). Thisbranch is intentionally a clean delta on top of #275 — it does not
include any #275 code. The two only touch the same files in distinct regions
(
translate.py,adapter.py), so they should merge cleanly; recommend landing#275 first, then this.