Commit 392e1f0
[feat] QAD 5090: env-gate attention torch.compile via FASTVIDEO_DISABLE_ATTENTION_COMPILE
DistributedAttention.forward (and the VSA subclass) are hard-decorated with
@torch.compiler.disable, which keeps attention out of the surrounding
torch.compile graph unconditionally. That blocks the inference compile path
even after the FP4 linear and SageAttention3 graph-break fixes land, since
the attention forward itself can never be traced.
Make the disable conditional on FASTVIDEO_DISABLE_ATTENTION_COMPILE:
- unset / "1" / "true" (default): keep torch.compiler.disable — current behavior
- "0" / "false" / "no" / "off": drop it so attention can fold into the graph
The env var is read at import time (decorators are applied at class
definition), which is the right granularity for the multiproc spawn path:
each worker re-imports and inherits the parent's env.
Co-authored-by: Loay Rashid <42599591+loaydatrain@users.noreply.github.com>
Co-authored-by: Kaiqin Kong <k1kong@ucsd.edu>
Co-authored-by: William Lin <SolitaryThinker@users.noreply.github.com>1 parent 0a96eb5 commit 392e1f0
1 file changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
16 | 38 | | |
17 | 39 | | |
18 | 40 | | |
| |||
56 | 78 | | |
57 | 79 | | |
58 | 80 | | |
59 | | - | |
| 81 | + | |
60 | 82 | | |
61 | 83 | | |
62 | 84 | | |
| |||
146 | 168 | | |
147 | 169 | | |
148 | 170 | | |
149 | | - | |
| 171 | + | |
150 | 172 | | |
151 | 173 | | |
152 | 174 | | |
| |||
0 commit comments