mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
extract out a caffe2 macros library (#98156)
Slowly carving out the minimal caffe2 dependencies to build PyTorch. Differential Revision: [D44609764](https://our.internmc.facebook.com/intern/diff/D44609764/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D44609764/)! Pull Request resolved: https://github.com/pytorch/pytorch/pull/98156 Approved by: https://github.com/ezyang, https://github.com/PaliC
This commit is contained in:
committed by
PyTorch MergeBot
parent
f6272ce79d
commit
950431c334
13
BUILD.bazel
13
BUILD.bazel
@ -1261,7 +1261,7 @@ cc_library(
|
||||
copts = CAFFE2_COPTS,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":caffe2_core_macros_h",
|
||||
":caffe2_core_macros",
|
||||
"//c10:headers",
|
||||
"//caffe2/proto:caffe2_pb",
|
||||
],
|
||||
@ -1292,7 +1292,8 @@ genrule(
|
||||
|
||||
cc_library(
|
||||
name = "caffe2_headers",
|
||||
hdrs = glob([
|
||||
hdrs = glob(
|
||||
[
|
||||
"caffe2/contrib/aten/*.h",
|
||||
"caffe2/contrib/gloo/*.h",
|
||||
"caffe2/core/*.h",
|
||||
@ -1326,7 +1327,11 @@ cc_library(
|
||||
"caffe2/utils/math/*.h",
|
||||
"caffe2/utils/threadpool/*.h",
|
||||
"modules/**/*.h",
|
||||
]) + if_cuda(glob([
|
||||
],
|
||||
exclude = [
|
||||
"caffe2/core/macros.h",
|
||||
],
|
||||
) + if_cuda(glob([
|
||||
"caffe2/**/*.cuh",
|
||||
"caffe2/image/*.h",
|
||||
])) + [":generated_caffe2_aten_op_headers"],
|
||||
@ -1337,6 +1342,7 @@ cc_library(
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":caffe2_core_macros",
|
||||
":caffe2_for_aten_headers",
|
||||
"//caffe2/proto:caffe2_pb",
|
||||
"//caffe2/proto:cc_proto",
|
||||
@ -1395,6 +1401,7 @@ cc_library(
|
||||
linkstatic = 1,
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":caffe2_core_macros",
|
||||
":caffe2_dnnlowp_avx2_ops",
|
||||
":caffe2_headers",
|
||||
":caffe2_perfkernels_avx",
|
||||
|
Reference in New Issue
Block a user