Repository navigation
Commit cc00145
committed
Pin the other direction of the moved overflow boundary
The vendored range check moved in both directions, and only the direction that
starts refusing values had a test. Cover the quiet one: filling an int8 tensor with
127.5 used to be refused and now stores 127.
Test Plan:
Compiled the real header from before and after this change into the same probe and
ran both. Before: 127.5 into int8 and 255.5 into uint8 both report overflow, and 2^63
into int64 is accepted. After: the first two are accepted and 2^63 overflows. So the
boundary moved both ways, and the case added here fails against the previous header
rather than passing either way.
Placed in this file rather than the shared macro because the macro expands into eight
suites, and several of them reach the scalar through a path that rejects a fractional
value before any range check, where the case would not measure what it claims.
Decide ATen mode before the wrapper consumes it on the test path too
The library and binary paths were fixed to read the dependency list before the
shared patch removes it. The test path has the same shape and was missed: it still
called its own check afterwards, so a test naming an ATen dependency was pinned to
C++17 and would fail on ATen's headers.
Read it in the same place, and pass the answer down, so both paths agree.
Test Plan:
Ran the test path over the cases that matter, with the dependency list removed first
to match what the wrapper really does. Before this a test naming libtorch, c10 or
torch-core-cpp came away pinned to C++17; after, all three take C++20 from the
toolchain. A test named for ATen is unchanged, and a plain test still gets C++17,
which is what the embedded builds rely on.
No open source test target has this shape today, so this closes the same defect on a
path that is not yet exercised rather than repairing a red job.1 parent 6ffbf76 commit cc00145
2 files changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
343 | 345 | | |
344 | 346 | | |
345 | 347 | | |
346 | | - | |
| 348 | + | |
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| |||
0 commit comments