1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414import os
15- import sys
1615from multiprocessing import Process
1716from unittest import mock
1817from unittest .mock import ANY , Mock , call , patch
1918
2019import pytest
2120import torch
2221from lightning .fabric .plugins import ClusterEnvironment
23- from lightning .fabric .utilities .imports import _TORCH_GREATER_EQUAL_2_2
2422from lightning .pytorch import Trainer
2523from lightning .pytorch .demos .boring_classes import BoringModel
2624from lightning .pytorch .strategies import DDPStrategy
@@ -196,11 +194,6 @@ def on_fit_start(self) -> None:
196194 assert torch .equal (self .layer .weight .data , self .tied_layer .weight .data )
197195
198196
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- )
204197def test_memory_sharing_disabled ():
205198 """Test that the multiprocessing launcher disables memory sharing on model parameters and buffers to avoid race
206199 conditions on model updates."""
@@ -221,11 +214,6 @@ def test_check_for_missing_main_guard():
221214 launcher .launch (function = Mock ())
222215
223216
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- )
229217def test_fit_twice_raises ():
230218 model = BoringModel ()
231219 trainer = Trainer (
0 commit comments