Commit 48703dc
Han Wang
fix(pt_expt): clear default device during spin .pt2 export in tests
AOTInductor internally creates tensors using PyTorch's default device.
When pt/__init__.py sets torch.set_default_device("cuda:9999999") as a
test sentinel, spin .pt2 compilation fails on CPU-only CI with "Torch
not compiled with CUDA enabled". Clear the default device around
deserialize_to_file calls in spin test fixtures, matching the pattern
already used in non-spin .pt2 tests.1 parent 590244a commit 48703dc
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| |||
355 | 362 | | |
356 | 363 | | |
357 | 364 | | |
358 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
359 | 371 | | |
360 | 372 | | |
361 | 373 | | |
| |||
414 | 426 | | |
415 | 427 | | |
416 | 428 | | |
417 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
| |||
0 commit comments