mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Stop building nativert in OSS (#164463)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164463 Approved by: https://github.com/albanD, https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
9eb89a4ad5
commit
1bb68271b7
@ -556,12 +556,13 @@ if(USE_CUDA OR USE_ROCM)
|
||||
append_filelist("libtorch_cuda_core_sources" Caffe2_GPU_HIP_JIT_FUSERS_SRCS)
|
||||
endif()
|
||||
|
||||
if(USE_CUDA)
|
||||
append_filelist("libtorch_nativert_cuda_sources" Caffe2_GPU_SRCS)
|
||||
endif()
|
||||
if(USE_ROCM)
|
||||
append_filelist("libtorch_nativert_cuda_sources" Caffe2_HIP_SRCS)
|
||||
endif()
|
||||
# NativeRT is disabled
|
||||
# if(USE_CUDA)
|
||||
# append_filelist("libtorch_nativert_cuda_sources" Caffe2_GPU_SRCS)
|
||||
# endif()
|
||||
# if(USE_ROCM)
|
||||
# append_filelist("libtorch_nativert_cuda_sources" Caffe2_HIP_SRCS)
|
||||
# endif()
|
||||
|
||||
if(USE_CUDA)
|
||||
list(APPEND Caffe2_GPU_CU_SRCS ${Caffe2_GPU_HIP_JIT_FUSERS_SRCS})
|
||||
@ -1360,7 +1361,8 @@ if(BUILD_TEST)
|
||||
)
|
||||
else()
|
||||
add_subdirectory(${TORCH_ROOT}/test/cpp/jit ${CMAKE_BINARY_DIR}/test_jit)
|
||||
add_subdirectory(${TORCH_ROOT}/test/cpp/nativert ${CMAKE_BINARY_DIR}/test_nativert)
|
||||
# NativeRT is disabled
|
||||
# add_subdirectory(${TORCH_ROOT}/test/cpp/nativert ${CMAKE_BINARY_DIR}/test_nativert)
|
||||
add_subdirectory(${TORCH_ROOT}/test/inductor ${CMAKE_BINARY_DIR}/test_inductor)
|
||||
if(USE_DISTRIBUTED)
|
||||
add_subdirectory(${TORCH_ROOT}/test/cpp/c10d ${CMAKE_BINARY_DIR}/test_cpp_c10d)
|
||||
|
@ -12,6 +12,7 @@ import torch
|
||||
import torch._dynamo as torchdynamo
|
||||
from torch._C._nativert import PyModelRunner
|
||||
from torch._dynamo.test_case import TestCase
|
||||
from torch._environment import is_fbcode
|
||||
from torch._subclasses.fake_tensor import FakeTensor
|
||||
from torch.nativert.backends._lower_utils import (
|
||||
lower_exported_program,
|
||||
@ -197,6 +198,7 @@ def make_dynamic_cls(cls, strict=False):
|
||||
|
||||
@unittest.skipIf(IS_WINDOWS, "Windows isn't supported for this case")
|
||||
@unittest.skipIf(not torchdynamo.is_dynamo_supported(), "dynamo isn't support")
|
||||
@unittest.skipIf(not is_fbcode(), "FBcode only for now")
|
||||
class TestNativeRT(TestCase):
|
||||
@staticmethod
|
||||
def get_module():
|
||||
@ -342,13 +344,12 @@ class TestNativeRT(TestCase):
|
||||
pathlib.Path(filename).unlink(missing_ok=True)
|
||||
|
||||
|
||||
tests = [
|
||||
test_export.TestExport,
|
||||
]
|
||||
for test in tests:
|
||||
make_dynamic_cls(test, strict=True)
|
||||
make_dynamic_cls(test, strict=False)
|
||||
del test
|
||||
if is_fbcode():
|
||||
for test in [test_export.TestExport]:
|
||||
make_dynamic_cls(test, strict=True)
|
||||
make_dynamic_cls(test, strict=False)
|
||||
del test
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from torch._dynamo.test_case import run_tests
|
||||
|
Reference in New Issue
Block a user