Commit 7cb8295
authored
[Backend Tester] Seed based on test name (pytorch#13313)
Set a manual seed for pytorch based on the test base name (test case not
including flow / etc.). This makes test results stable between runs and
between backends/flows. This is useful for comparing accuracy between
backends, for example.
I validated this change by running convolution tests for xnnpack twice.
I validated that the output accuracy statistics were identical.1 parent b213fc4 commit 7cb8295
File tree
3 files changed
+45
-4
lines changed- backends/test/suite
- tests
3 files changed
+45
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
294 | | - | |
| 296 | + | |
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
298 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
43 | 65 | | |
44 | 66 | | |
45 | 67 | | |
| |||
59 | 81 | | |
60 | 82 | | |
61 | 83 | | |
| 84 | + | |
| 85 | + | |
62 | 86 | | |
63 | 87 | | |
64 | 88 | | |
| |||
237 | 261 | | |
238 | 262 | | |
239 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
240 | 270 | | |
241 | 271 | | |
242 | 272 | | |
| |||
254 | 284 | | |
255 | 285 | | |
256 | 286 | | |
257 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
258 | 291 | | |
259 | 292 | | |
260 | 293 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments