-
Notifications
You must be signed in to change notification settings - Fork 68
Llu/reshape #5403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Llu/reshape #5403
Conversation
|
Review updated until commit 0327f67 Description
Changes walkthrough 📝
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
c16004d to
30bcca8
Compare
|
!test |
|
!test |
|
!test |
Add PERMISSIVE_RESIZE graph support to IdModel and incompatible reshape detection to fix issue #5358
Summary
This PR adds
PERMISSIVE_RESIZEgraph building capability to IdModel and implements a topology checker to detect incompatible reshape patterns that cannot be fused together.Changes
1. IdModel: PERMISSIVE_RESIZE Graph Support
buildPermissiveResizeGraph()method toIdModelclassresize->in()to the resize output ID. This map is regardless of extent (e.g., domains with extent 36, 24, and 12 can all be mapped together)maybeMapThroughExprs2. Incompatible Reshape Detection
SchedulerTopologyChecker::hasIncompatibleReshapes()functiontruewhen rfactor IDs are mapped together (sameValGroup) but have different transformations (differentExprGroups)The ids ( iS6{24}rf and iS12{12}rf) in the first disjoint set are used in the same expr set. However the ids in the 2nd set are used in different expr sets, which means different transforms.
Technical Details
PERMISSIVE_RESIZE connects resize inputs and outputs regardless of extent changes and propagates those mappings through transformations based on matching operations (e.g., same split factor), not matching extents. This can map many downstream domains together, revealing when domains with a shared origin later undergo incompatible transformations. The incompatibility check then prevents fusion in cases where domains are mapped via resize (same origin) but diverge in their subsequent transformations (making unified scheduling invalid).