Repository navigation
refactor(optimizer): move Stage 1 modules into pass1/ and pass2/ (#958 step 1) - #960
Merged
Merged
Conversation
Move only (#958 step 1): per_computation_candidates and realization to pass1/, asap_aware_cse, workload_candidates and memo to pass2/, function_rules to accuracy/, and the two state_configurations files renamed by role (memo::shared_configurations, memo::rules::shared_configuration_readers). Callers use the new paths; no re-exports at the old ones. Generated by the move script in the PR body, then cargo fmt. Co-Authored-By: Claude Opus 5.5 <[email protected]>
zzylol
force-pushed
the
refactor/958-step1-move
branch
from
October 29, 2026 04:14
53dad60 to
0584da4
Compare
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.
Part of #958 (step 1).
Why
Stage 1 (
crates/logical-asap-optimization/src) has no stage structure. Pass 1 and Pass 2 modules sit side by side at the top level with accuracy helpers, and two different files are both namedstate_configurations.rs. #958 (decided 2026-10-27) reorganizes the crate by pass. Step 1 is the move alone, so later steps (the deployment-input split, the single memo-based Pass 2, Stage 1 finishing the memo) land in the right place and review as behavior changes only.What
A move-only change, with no behavior change:
pass1/, Pass 2 intopass2/, and the per-function accuracy composition rule intoaccuracy/.state_configurations.rsfiles are renamed by what they hold.How
The commit is exactly this script's output on
origin/main(97b192bf), followed bycargo fmt --all, then rebased without conflicts onto37dacce2(#956 touches no moved file). Compared with the first version, the script also rewrites relative doc paths (memo/...,memo.rs, barememo::paths) indocs/**/*.md.958-step1-move.shThe script does four things:
git mvthe files;crate::Xandasap_logical_asap_optimization::Xpaths, including items of groupeduse …::{…}imports;moddeclarations fromlib.rsinto the newpass1.rsandpass2.rs, with their doc comments;Key code interfaces added / modified
Module paths only. No item changes its name, signature or visibility, except that the crate-private
function_rulesbecomespub(crate)underaccuracy.asap_logical_asap_optimization::per_computation_candidatesasap_logical_asap_optimization::pass1::per_computation_candidatesasap_logical_asap_optimization::realizationasap_logical_asap_optimization::pass1::realization(summary_candidatesstays re-exported at the crate root, unchanged)asap_logical_asap_optimization::asap_aware_cseasap_logical_asap_optimization::pass2::asap_aware_cseasap_logical_asap_optimization::workload_candidatesasap_logical_asap_optimization::pass2::workload_candidatesasap_logical_asap_optimization::memoasap_logical_asap_optimization::pass2::memoasap_logical_asap_optimization::memo::state_configurations(finite shared sizes and pane configurations)asap_logical_asap_optimization::pass2::memo::shared_configurationsmemo::rules::state_configurations(private: expands readers at those configurations)pass2::memo::rules::shared_configuration_readersfunction_rulesaccuracy::function_rules(pub(crate))The new module files:
The following stay where they are:
accuracy,test_supportand the crate-root re-exports;deployment_capabilities, which moves in Reorganize by stage: one memo-based Pass 2, Stage 1 finishes the memo, deployment inputs split by stage, asap-planner as the only entry point #958 step 2;maintained_population, which the open population-rule PR deletes (Offer maintained-population top-k candidates in Pass 1 #681).Usage: a caller that read
asap_logical_asap_optimization::memo::state_groups::expand_concrete_summary_state_groupsnow readsasap_logical_asap_optimization::pass2::memo::state_groups::expand_concrete_summary_state_groups. Planning a workload end to end (asap_planner::e2e_plan,stage_pipeline) is unchanged.Major algorithm changes
None.
Before this PR
All Stage 1 modules sat at the top level of the crate:
per_computation_candidates.rs,realization.rs,function_rules.rs,asap_aware_cse.rs,workload_candidates.rs,memo.rsandmemo/.memo/state_configurations.rsandmemo/rules/state_configurations.rsheld different things under one name.After this PR
src/pass1/{per_computation_candidates, realization}.rssrc/pass2/{asap_aware_cse, workload_candidates}.rssrc/pass2/memo.rsandsrc/pass2/memo/…, withshared_configurations.rsandrules/shared_configuration_readers.rssrc/accuracy/function_rules.rsVerification
Run on the regenerated commit (base
97b192bf), before the conflict-free rebase onto37dacce2:cargo build --workspace --all-targets: clean;cargo test -p asap-logical-asap-optimization --lib: 235 passed;cargo test -p asap-plan-selection --lib: 379 passed;cargo clippy --workspace --all-targets -- -D warningsandcargo fmt --all --check: clean.git diff -M --stat origin/main: 111 files, every moved file a rename ({ => pass1}/…,{ => pass2}/…,{ => accuracy}/function_rules.rs). The other changed lines are new paths, imports, andcargo fmtreflows of lines whose path length changed.A grep over
crates,docs,toolsand the root*.mdfiles finds no old path (crate::memo,workload_candidates,asap_aware_cse,state_configurations, oldsrc/…file paths).🤖 Generated with Claude Code