[compiler toolkit] Port joint_ac_pass from simplefsdp #2051
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.
This PR integrates the changes in #1970 to compiler toolkit (applying
joint_ac_passon the joint graph graph to tag nodes based onreshard_after_forwardflag)Also did some refactor for applying graph passes in compiler toolkit experiments. We will have two kinds of passes
joint_custom_passes: these are passes to be applied on the captured joint graph before partitioner. By default we
validate_flex_attn_annotation_passandfsdp_reshard_after_fwd_passcompiler_passes: there are passes to be applied on partitioned fwd and bwd graphs as backend optimizations. By default there is none. We can indicate
autobucketing_reordering_passandregional_inductor_passusing configs.