mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
[BE] Rectify some references to caffe2 (#140204)
- Rename `tools.build_pytorch_libs.build_caffe2` to `tools.build_pytorch_libs.build_pytorch` - Delete number of `if BUILD_CAFFE2` conditions Pull Request resolved: https://github.com/pytorch/pytorch/pull/140204 Approved by: https://github.com/huydhn, https://github.com/r-barnes, https://github.com/atalman
This commit is contained in:
committed by
PyTorch MergeBot
parent
5107d244ee
commit
a2ac96cae0
@ -2,7 +2,6 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
import platform
|
||||
import shutil
|
||||
from glob import glob
|
||||
|
||||
from setuptools import distutils # type: ignore[import]
|
||||
@ -71,7 +70,7 @@ def _create_build_env() -> dict[str, str]:
|
||||
return my_env
|
||||
|
||||
|
||||
def build_caffe2(
|
||||
def build_pytorch(
|
||||
version: str | None,
|
||||
cmake_python_library: str | None,
|
||||
build_python: bool,
|
||||
@ -87,8 +86,3 @@ def build_caffe2(
|
||||
if cmake_only:
|
||||
return
|
||||
cmake.build(my_env)
|
||||
if build_python:
|
||||
caffe2_proto_dir = os.path.join(cmake.build_dir, "caffe2", "proto")
|
||||
for proto_file in glob(os.path.join(caffe2_proto_dir, "*.py")):
|
||||
if proto_file != os.path.join(caffe2_proto_dir, "__init__.py"):
|
||||
shutil.copy(proto_file, os.path.join("caffe2", "proto"))
|
||||
|
Reference in New Issue
Block a user