12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
import os
15
- import sys
16
15
from multiprocessing import Process
17
16
from unittest import mock
18
17
from unittest .mock import ANY , Mock , call , patch
19
18
20
19
import pytest
21
20
import torch
22
21
from lightning .fabric .plugins import ClusterEnvironment
23
- from lightning .fabric .utilities .imports import _TORCH_GREATER_EQUAL_2_2
24
22
from lightning .pytorch import Trainer
25
23
from lightning .pytorch .demos .boring_classes import BoringModel
26
24
from lightning .pytorch .strategies import DDPStrategy
@@ -196,11 +194,6 @@ def on_fit_start(self) -> None:
196
194
assert torch .equal (self .layer .weight .data , self .tied_layer .weight .data )
197
195
198
196
199
- @pytest .mark .xfail (
200
- # https://github.com/pytorch/pytorch/issues/116056
201
- sys .platform == "win32" and _TORCH_GREATER_EQUAL_2_2 ,
202
- reason = "Windows + DDP issue in PyTorch 2.2" ,
203
- )
204
197
def test_memory_sharing_disabled ():
205
198
"""Test that the multiprocessing launcher disables memory sharing on model parameters and buffers to avoid race
206
199
conditions on model updates."""
@@ -221,11 +214,6 @@ def test_check_for_missing_main_guard():
221
214
launcher .launch (function = Mock ())
222
215
223
216
224
- @pytest .mark .xfail (
225
- # https://github.com/pytorch/pytorch/issues/116056
226
- sys .platform == "win32" and _TORCH_GREATER_EQUAL_2_2 ,
227
- reason = "Windows + DDP issue in PyTorch 2.2" ,
228
- )
229
217
def test_fit_twice_raises ():
230
218
model = BoringModel ()
231
219
trainer = Trainer (
0 commit comments