Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions backends/vulkan/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1511,14 +1511,19 @@ def try_constrain_with_arg_repset(
if not arg_current_repset.any_in_common(source_repset):
return False

# Compute the narrowed repset (intersection of current arg and source).
narrowed = arg_current_repset.make_intersect(source_repset)

if self.sync_primary_io_repr:
if not self.get_out_repset(0).has_compatible_packed_dim_info_set(
source_repset
):
# Check that the narrowed result is compatible with the output.
# Using the intersection rather than the raw source_repset avoids
# rejecting valid constraints where the source has extra layouts
# (e.g. ANY_TEXTURE includes HP/CP) that don't exist in the output
# but also don't appear in the intersection.
if not self.get_out_repset(0).has_compatible_packed_dim_info_set(narrowed):
return False

# If this point is reached, then it is possible to constrain
narrowed = arg_current_repset.make_intersect(source_repset)
self.args_repset_list[arg_i] = narrowed

# Propagate to other synced args via packed-dim compatibility
Expand Down
Loading