mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Revert "Consistently use c10_ovrsource in arvr mode everywhere (#164128)"
This reverts commit efd7fd5ed5ac7ec03201a546a09fb19ec59de431. Reverted https://github.com/pytorch/pytorch/pull/164128 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/164128#issuecomment-3352544006))
This commit is contained in:
@ -156,7 +156,7 @@ ROOT = "//" if IS_OSS else "//xplat/caffe2"
|
||||
# for targets in subfolders
|
||||
ROOT_PATH = "//" if IS_OSS else "//xplat/caffe2/"
|
||||
|
||||
C10 = "//c10:c10" if IS_OSS else ("//xplat/caffe2/c10:c10_ovrsource" if is_arvr_mode() else "//xplat/caffe2/c10:c10")
|
||||
C10 = "//c10:c10" if IS_OSS else "//xplat/caffe2/c10:c10"
|
||||
|
||||
# a dictionary maps third party library name to fbsource and oss target
|
||||
THIRD_PARTY_LIBS = {
|
||||
|
@ -16,21 +16,11 @@ cuda_supported_platforms = [
|
||||
"ovr_config//os:windows-cuda",
|
||||
]
|
||||
|
||||
# rocktenn apparently has its own copy of glog that comes with libmp.dll, so we
|
||||
# had better not try to use glog from c10 lest the glog symbols not be eliminated.
|
||||
C10_USE_GLOG = native.read_config("c10", "use_glog", "1") == "1"
|
||||
|
||||
# If you don't use any functionality that relies on static initializer in c10 (the
|
||||
# most notable ones are the allocators), you can turn off link_whole this way.
|
||||
# In practice, this is only used by rocktenn as well.
|
||||
C10_LINK_WHOLE = native.read_config("c10", "link_whole", "1") == "1"
|
||||
|
||||
def define_c10_ovrsource(name, is_mobile):
|
||||
pp_flags = []
|
||||
if is_mobile:
|
||||
pp_flags.append("-DC10_MOBILE=1")
|
||||
if C10_USE_GLOG:
|
||||
pp_flags.append("-DC10_USE_GLOG")
|
||||
pp_flags = ["-DC10_MOBILE=1"]
|
||||
else:
|
||||
pp_flags = []
|
||||
|
||||
oxx_static_library(
|
||||
name = name,
|
||||
@ -41,7 +31,6 @@ def define_c10_ovrsource(name, is_mobile):
|
||||
"util/*.cpp",
|
||||
]),
|
||||
compatible_with = cpu_supported_platforms,
|
||||
link_whole = C10_LINK_WHOLE,
|
||||
compiler_flags = select({
|
||||
"DEFAULT": [],
|
||||
"ovr_config//compiler:cl": [
|
||||
@ -88,7 +77,6 @@ def define_c10_ovrsource(name, is_mobile):
|
||||
"//arvr/third-party/gflags:gflags",
|
||||
"//third-party/cpuinfo:cpuinfo",
|
||||
"//third-party/fmt:fmt",
|
||||
# For some godforsaken reason, this is always required even when not C10_USE_GLOG
|
||||
"//third-party/glog:glog",
|
||||
],
|
||||
)
|
||||
|
Reference in New Issue
Block a user