Repository navigation
remove is_causal flag - #172245
remove is_causal flag#172245liangel-02 wants to merge 11 commits into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/172245
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8a32c4d with merge base fb5eb91 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
deprecating `is_causal` flag since this can be expressed with `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 [ghstack-poisoned]
deprecating `is_causal` flag since this can be expressed with `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 [ghstack-poisoned]
| batch_size, self.num_heads, seq_len, seq_len | ||
| ) | ||
|
|
||
| is_causal = window_size[1] == 0 |
There was a problem hiding this comment.
it shoudl probably window right = 0 and left == -1? right
| @parametrize("scale", [None, 0.1]) | ||
| @parametrize("window_size", [(-1, 4)]) | ||
| def test_varlen_vs_sdpa(self, device, dtype, is_causal, scale, window_size): | ||
| @parametrize("window_size", [(-1, -1), (-1, 0), (-1, 4)]) |
There was a problem hiding this comment.
or more common window size is some look back so (4, 0)
|
@liangel-02 to make 2.11 release notes a bit easier could you mark this topic: bc breaking and update the PR desc per the guidelines in https://docs.google.com/document/d/14OmgGBr1w6gl1VO47GGGdwrIaUNr92DFhQbY_NEk8mQ/edit?tab=t.0#heading=h.xh2g8i1hef88 please |
deprecating `is_causal` flag in `varlen_attn` since this can be expressed with `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
deprecating `is_causal` flag in `varlen_attn` since this can be expressed with `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 jobs have failed, first few of them are: trunk / linux-jammy-cuda13.0-py3.10-gcc11 / test (default, 3, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu), trunk / linux-jammy-cuda12.8-py3.10-gcc11 / test (default, 3, 5, lf.linux.g6.4xlarge.experimental.nvidia.gpu) Details for Dev Infra teamRaised by workflow job |
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
the `is_causal` flag is now deprecated in `varlen_attn`. to express causal attention, use `window_size = (-1, 0)` Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #172245 * #172238 cc albanD mruberry jbschlosser walterddr mikaylagawarecki [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
`is_causal` flag has been deprecated in `varlen_attn`, use `window_size = [-1, 0]` instead, see [this PR](pytorch/pytorch#172245) *Test* <img width="1225" height="496" alt="Screenshot 2026-01-21 at 11 55 59 AM" src="https://github.com/user-attachments/assets/125c56af-76ed-4f6f-a433-da4d9a631dab" />
`is_causal` flag has been deprecated in `varlen_attn`, use `window_size = [-1, 0]` instead, see [this PR](pytorch/pytorch#172245) *Test* <img width="1225" height="496" alt="Screenshot 2026-01-21 at 11 55 59 AM" src="https://github.com/user-attachments/assets/125c56af-76ed-4f6f-a433-da4d9a631dab" />
`is_causal` flag has been deprecated in `varlen_attn`, use `window_size = [-1, 0]` instead, see [this PR](pytorch/pytorch#172245) *Test* <img width="1225" height="496" alt="Screenshot 2026-01-21 at 11 55 59 AM" src="https://github.com/user-attachments/assets/125c56af-76ed-4f6f-a433-da4d9a631dab" />
`is_causal` flag has been deprecated in `varlen_attn`, use `window_size = [-1, 0]` instead, see [this PR](pytorch/pytorch#172245) *Test* <img width="1225" height="496" alt="Screenshot 2026-01-21 at 11 55 59 AM" src="https://github.com/user-attachments/assets/125c56af-76ed-4f6f-a433-da4d9a631dab" />
the
is_causalflag is now deprecated invarlen_attn. to express causal attention, usewindow_size = (-1, 0)Stack from ghstack (oldest at bottom):
cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki