Commit bc616dd
ssjia
[ET-VK] Fix force_fp16 texture bias being silently rejected for CONTIGUOUS_ANY ops
The `force_fp16` path in `TagMemoryMetaPass` applies `ANY_TEXTURE` to
bias ops toward texture storage. However, `try_constrain_with_arg_repset`
has a packed-dim compatibility check that requires ALL of the source
repset's PDIs to exist in the output repset. `ANY_TEXTURE` has 3 texture
layouts (WP, HP, CP) but `CONTIGUOUS_ANY` outputs only support WP, so
the check fails and the texture bias is silently dropped.
Without the bias, buffer storage cascades from ops that must use buffer
(e.g. embedding with vocab exceeding texture limits) into downstream ops
that could use texture, causing unnecessary buffer↔texture transitions.
Fix: check PDI compatibility against the intersection of arg and source
repsets (what would actually be applied) rather than the raw source. The
intersection of `ANY_TEXTURE ∩ CONTIGUOUS_ANY` = `WIDTH_PACKED_TEXTURE`,
which IS compatible with the output.
Authored by Claude.
Differential Revision: [D100004702](https://our.internmc.facebook.com/intern/diff/D100004702/)
ghstack-source-id: 364237332
Pull Request resolved: #187701 parent 4afd7f9 commit bc616dd
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
1514 | 1517 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
1518 | 1524 | | |
1519 | 1525 | | |
1520 | 1526 | | |
1521 | | - | |
1522 | 1527 | | |
1523 | 1528 | | |
1524 | 1529 | | |
| |||
0 commit comments