Commit 4c81937
Guard triangle_attention against passing mask and kv_lengths together
Raise ValueError in the public wrapper when both `mask` and `kv_lengths` are
supplied. They are mutually exclusive: `kv_lengths` selects the SM100f length
fast path, while a dense `mask` uses the fallback path. The guard sits before
the backend dispatch, so it surfaces the error early and needs no GPU. Add a
GPU-free regression test.
Signed-off-by: Jonathan Mitchell <jomitchell@nvidia.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 9eda5d5 commit 4c81937
2 files changed
Lines changed: 23 additions & 0 deletions
File tree
- cuequivariance_torch
- cuequivariance_torch/primitives
- tests/primitives
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
194 | 201 | | |
195 | 202 | | |
196 | 203 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
147 | 163 | | |
148 | 164 | | |
149 | 165 | | |
| |||
0 commit comments