Skip to content

Commit 85199dd

Browse files
authored
[ET-VK] Fix force_fp16 texture bias being silently rejected for CONTIGUOUS_ANY ops
Differential Revision: D100004702 Pull Request resolved: #18770
1 parent 4afd7f9 commit 85199dd

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

backends/vulkan/utils.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)