Commit e1cf5ab
committed
[bugfix]: pin the CPU platform in the FP8 tests and stop writing MASTER_PORT
Fixes three problems in the tests added by the previous commit.
The block-wiring fixture swapped in a hand-written platform stub that defined
only is_mps and get_attn_backend_cls. Constructing the block reaches
set_weight_attrs, which calls current_platform.is_tpu on every linear, so the
test raised AttributeError inside the attention to_q before the feed-forward
was built and before either FP8 assertion ran. It now pins the real
CpuPlatform, which answers the whole current Platform interface rather than
the two methods that happened to be needed.
The two-rank test wrote MASTER_ADDR and MASTER_PORT into the environment.
test_gpu_tests_preserve_a_launcher_assigned_rendezvous_port scans every file
under fastvideo/tests and fails on a written MASTER_PORT, because that
clobbers the port the CI runner leased to the lane. The rendezvous now goes
through init_method, and the os import is gone with it.
The loader guard test passed device=cpu, which does not change the global
platform. maybe_load_fsdp_model turns FSDP off on MPS, so on a Mac the guard
sat inside a branch that never ran and the test failed later for an unrelated
reason. It pins CpuPlatform too, so every host takes the same path.1 parent 62d986d commit e1cf5ab
2 files changed
Lines changed: 28 additions & 30 deletions
Lines changed: 13 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 79 | + | |
92 | 80 | | |
93 | 81 | | |
94 | 82 | | |
| |||
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
| 77 | + | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
| |||
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
111 | 121 | | |
112 | 122 | | |
113 | 123 | | |
| |||
0 commit comments