mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Do not build PyTorch with caffe2 by default (#66658)
Summary: CAFFE2 has been deprecated for a while, but still included in every PyTorch build. We should stop building it by default, although CI should still validate that caffe2 code is buildable. Build even fewer dependencies when compiling mobile builds without Caffe2 Introduce `TEST_CAFFE2` in torch.common.utils Skip `TestQuantizedEmbeddingOps` and `TestJit.test_old_models_bc` is code is compiled without Caffe2 Should be landed after https://github.com/pytorch/builder/pull/864 Pull Request resolved: https://github.com/pytorch/pytorch/pull/66658 Reviewed By: driazati, seemethere, janeyx99 Differential Revision: D31669156 Pulled By: malfet fbshipit-source-id: 1cc45e2d402daf913a4685eb9f841cc3863e458d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4fe8055b9f
commit
77beccaedb
27
setup.py
27
setup.py
@ -824,23 +824,24 @@ def configure_extension_build():
|
||||
|
||||
# These extensions are built by cmake and copied manually in build_extensions()
|
||||
# inside the build_ext implementation
|
||||
extensions.append(
|
||||
Extension(
|
||||
name=str('caffe2.python.caffe2_pybind11_state'),
|
||||
sources=[]),
|
||||
)
|
||||
if cmake_cache_vars['USE_CUDA']:
|
||||
if cmake_cache_vars['BUILD_CAFFE2']:
|
||||
extensions.append(
|
||||
Extension(
|
||||
name=str('caffe2.python.caffe2_pybind11_state_gpu'),
|
||||
sources=[]),
|
||||
)
|
||||
if cmake_cache_vars['USE_ROCM']:
|
||||
extensions.append(
|
||||
Extension(
|
||||
name=str('caffe2.python.caffe2_pybind11_state_hip'),
|
||||
name=str('caffe2.python.caffe2_pybind11_state'),
|
||||
sources=[]),
|
||||
)
|
||||
if cmake_cache_vars['USE_CUDA']:
|
||||
extensions.append(
|
||||
Extension(
|
||||
name=str('caffe2.python.caffe2_pybind11_state_gpu'),
|
||||
sources=[]),
|
||||
)
|
||||
if cmake_cache_vars['USE_ROCM']:
|
||||
extensions.append(
|
||||
Extension(
|
||||
name=str('caffe2.python.caffe2_pybind11_state_hip'),
|
||||
sources=[]),
|
||||
)
|
||||
|
||||
cmdclass = {
|
||||
'bdist_wheel': wheel_concatenate,
|
||||
|
Reference in New Issue
Block a user