File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1511,14 +1511,19 @@ def try_constrain_with_arg_repset(
15111511 if not arg_current_repset .any_in_common (source_repset ):
15121512 return False
15131513
1514+ # Compute the narrowed repset (intersection of current arg and source).
1515+ narrowed = arg_current_repset .make_intersect (source_repset )
1516+
15141517 if self .sync_primary_io_repr :
1515- if not self .get_out_repset (0 ).has_compatible_packed_dim_info_set (
1516- source_repset
1517- ):
1518+ # Check that the narrowed result is compatible with the output.
1519+ # Using the intersection rather than the raw source_repset avoids
1520+ # rejecting valid constraints where the source has extra layouts
1521+ # (e.g. ANY_TEXTURE includes HP/CP) that don't exist in the output
1522+ # but also don't appear in the intersection.
1523+ if not self .get_out_repset (0 ).has_compatible_packed_dim_info_set (narrowed ):
15181524 return False
15191525
15201526 # If this point is reached, then it is possible to constrain
1521- narrowed = arg_current_repset .make_intersect (source_repset )
15221527 self .args_repset_list [arg_i ] = narrowed
15231528
15241529 # Propagate to other synced args via packed-dim compatibility
You can’t perform that action at this time.
0 commit comments