mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Remove Caffe2 code from tool scripts (#134941)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/134941 Approved by: https://github.com/ezyang
This commit is contained in:
@ -64,21 +64,10 @@ if args.output_directory:
|
||||
out_dir = args.output_directory
|
||||
|
||||
includes = [
|
||||
"caffe2/operators/*",
|
||||
"caffe2/sgd/*",
|
||||
"caffe2/image/*",
|
||||
"caffe2/transforms/*",
|
||||
"caffe2/video/*",
|
||||
"caffe2/distributed/*",
|
||||
"caffe2/queue/*",
|
||||
"caffe2/contrib/aten/*",
|
||||
"binaries/*",
|
||||
"caffe2/**/*_test*",
|
||||
"caffe2/core/*",
|
||||
"caffe2/db/*",
|
||||
"caffe2/utils/*",
|
||||
"caffe2/contrib/gloo/*",
|
||||
"caffe2/contrib/nccl/*",
|
||||
"c10/cuda/*",
|
||||
"c10/cuda/test/CMakeLists.txt",
|
||||
"modules/*",
|
||||
@ -118,8 +107,6 @@ for new_dir in args.extra_include_dir:
|
||||
includes.append(abs_new_dir)
|
||||
|
||||
ignores = [
|
||||
"caffe2/operators/depthwise_3x3_conv_op_cudnn.cu",
|
||||
"caffe2/operators/pool_op_cudnn.cu",
|
||||
"*/hip/*",
|
||||
# These files are compatible with both cuda and hip
|
||||
"aten/src/ATen/core/*",
|
||||
|
@ -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]
|
||||
@ -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