Repository navigation
feat(knobs): add strict --knob validation, --sweep-knobs, and --knob-candidates - #150
Open
SamuelReeder wants to merge 1 commit into
Open
SamuelReeder wants to merge 1 commit into
SamuelReeder wants to merge 1 commit into
Conversation
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.
Stack
users/sareeder/perf-integrity-fixes→main): Performance-integrity bug fixes (timing unification, compare gates, runtime guards, telemetry, analytical v2, DVC setup)users/sareeder/perf-integrity→users/sareeder/perf-integrity-fixes):ALMIOPEN-3437— Calibrated cold-cache sweep, VRAM-safe rotating buffers, and versioned input recipesusers/sareeder/knob-sweeps→users/sareeder/perf-integrity): Strict--knobvalidation,--sweep-knobs, and--knob-candidatesSummary
Adds strict hipDNN knob pinning and exact candidate-tuple knob sweeping on top of #143:
--knob KEY=VAL[,...](parser.py,knob_sweep.py,executor.py,common/exceptions.py,suite_runner_cli.py): Validates explicit knob IDs and domains strictly against the engine's exposed knobs before priming/building (Executor.validate_knobs()); raisesInvalidKnobErrorand exits with code2on invalid user-pinned knobs or unreadable/malformed--knob-candidatesfiles.--sweep-knobs,--knob-candidates PATH): Runs the unpinned baseline first, then benchmarks each exact candidate tuple for each--engine(engine[cand_id]), skipping individual engine-rejected candidates without aborting the sweep.suite_results.py,oracle.py,hipdnn_tuned_child.py,profiling_orchestrator.py,internal_profiling.py): Recordsrun.config.knobs,run.config.sweep_knobs,engine.plan_name, andengine.knobs; forwards base knobs to hipDNN--oraclechildren (merged underglobal.benchmarking=1) and profiling children (--knob).AGENTS.md,docs/usage.md,docs/results-schema.md,sample_configs/config.toml.example): Documents the new flags, exit code2rules, and schema keys.Risk Assessment
Risk Level: 2 / 5 — Opt-in CLI feature (
--knob,--sweep-knobs,--knob-candidates) across 19 files; default unpinned runs only populateengine.plan_name(when exposed) andengine.knobs = null.Device / Architecture Coverage
gfx90a(MI210, local): Verified--sweep-knobs --knob-candidatesonMIOPEN_ENGINEwith--validate pytorch(baseline + candidate passed,plan_nameandknobsrecorded) and verified invalid--knob bogus_nonexistent=1exits2with the exposed knob list.Testing Summary
black --check(25.12.0): passed on all 42 modified/added Python files across the stack.PYTHONPATH=src .workspace/.venv/bin/python -m pytest tests/unit -m "not gpu" -q): 2,301 passed, 1 skipped, 0 failed.Testing Checklist
black --check(25.12.0) on all modified/added Python files2,301 passed, 1 skipped)gfx90a) targeted GPU checks (--sweep-knobs, invalid--knobexit 2)gpu-tests (gfx950, full suite)CI lane