-
Notifications
You must be signed in to change notification settings - Fork 449
Open
Description
Summary
parse_flow_variables() and parse_tunable_variables() in tools/AutoTuner/src/autotuner/utils.py have explicit TODO: Tests. comments but currently lack any unit test coverage.
These are core parsing functions in the AutoTuner pipeline:
parse_flow_variables()— Invokesmake vars, then extracts environment variable names fromenv()patterns across Tcl scripts andvars.tcl. Used to determine the set of valid flow variables.parse_tunable_variables()— Readsvariables.yamland returns the set of variables marked withtunable: 1. Used to validate which variables the AutoTuner is allowed to tune.
Proposed Test Coverage
parse_tunable_variables() (7 tests)
- Returns a non-empty set
- Known tunable variables (e.g.,
CORE_UTILIZATION,CORE_AREA) are present - Non-tunable variables (e.g.,
EQUIVALENCE_CHECK,DETAILED_METRICS) are excluded - Correctly filters on
tunable: 1flag (with mock YAML) - Handles empty YAML and YAML with no tunable variables
parse_flow_variables() (6 tests)
- Exits on Makefile failure (non-zero return code)
- Exits when
vars.tclis not generated - Passes correct platform argument to
make - Extracts
env()patterns from Tcl files - Uppercases all variable names
- Deduplicates variables (returns a set)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels