Back out "Temporary fix for remote gpu execution issue" (#63983)
authorRong Rong (AI Infra) <rongr@fb.com>
Wed, 25 Aug 2021 21:34:40 +0000 (14:34 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 25 Aug 2021 21:37:01 +0000 (14:37 -0700)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63983

Test for fixes in D30545351. it should resolve the remote execution flag being populated incorrectly issue.

Test Plan: CI

Reviewed By: malfet, seemethere

Differential Revision: D30549443

fbshipit-source-id: b3895909f5cd654ba163b77950872b332fbad3fe

torch/testing/_internal/common_device_type.py

index b5d6127..8ec6e71 100644 (file)
@@ -12,7 +12,7 @@ import os
 import torch
 from torch.testing._internal.common_utils import TestCase, TEST_WITH_ROCM, TEST_MKL, \
     skipCUDANonDefaultStreamIf, TEST_WITH_ASAN, TEST_WITH_UBSAN, TEST_WITH_TSAN, \
-    IS_SANDCASTLE, IS_FBCODE, DeterministicGuard, TEST_SKIP_NOARCH
+    IS_SANDCASTLE, IS_FBCODE, IS_REMOTE_GPU, DeterministicGuard, TEST_SKIP_NOARCH
 from torch.testing._internal.common_cuda import _get_torch_cuda_version
 from torch.testing import \
     (get_all_dtypes)
@@ -469,9 +469,13 @@ def get_device_type_test_bases():
     test_bases: List[Any] = list()
 
     if IS_SANDCASTLE or IS_FBCODE:
-        # temporarily disable IS_REMOTE_GPU, see T99020845
-        test_bases.append(CPUTestBase)
-        test_bases.append(MetaTestBase)
+        if IS_REMOTE_GPU:
+            # Skip if sanitizer is enabled
+            if not TEST_WITH_ASAN and not TEST_WITH_TSAN and not TEST_WITH_UBSAN:
+                test_bases.append(CUDATestBase)
+        else:
+            test_bases.append(CPUTestBase)
+            test_bases.append(MetaTestBase)
     else:
         test_bases.append(CPUTestBase)
         if not TEST_SKIP_NOARCH: