Skip to content

Commit 987b1a2

Browse files
authored
[release/0.7 only] Fix check_c10_sync being out of sync (#12252)
pytorch/pytorch#157418 was picked to the PyTorch 2.8 branch and puts us out of sync with c10. This re-syncs. I did a mass find/replace of torch/standalone with torch/headeronly; hopefully that caught everything. `.ci/scripts/check_c10_sync.sh` now reports success.
1 parent 003b233 commit 987b1a2

File tree

8 files changed

+7
-7
lines changed

8 files changed

+7
-7
lines changed

.ci/scripts/check_c10_sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ pushd pytorch
1212
git checkout "$pytorch_pin"
1313
popd
1414
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/c10 pytorch/c10
15-
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/torch/standalone pytorch/torch/standalone
15+
"$(dirname "${BASH_SOURCE[0]}")"/compare_dirs.sh runtime/core/portable_type/c10/torch/headeronly pytorch/torch/headeronly

runtime/core/portable_type/c10/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ would cause all headers in that directory to be includeable with
1212
`runtime/core/portable_type/complex.h`, which would shadow the C99
1313
`complex.h` standard header.
1414

15-
`torch/standalone` has been added as an extra "even more bottom of
15+
`torch/headeronly` has been added as an extra "even more bottom of
1616
stack" directory in PyTorch, so we have to add it to our sync
1717
here. The extra "stutter" c10 directory causing `c10/torch/standlone`
1818
is unfortunately awkward; perhaps we can rename the top-level

runtime/core/portable_type/c10/c10/macros/Export.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <c10/macros/cmake_macros.h>
66
#endif // C10_USING_CUSTOM_GENERATED_MACROS
77

8-
#include <torch/standalone/macros/Export.h>
8+
#include <torch/headeronly/macros/Export.h>
99

1010
// This one is being used by libtorch.so
1111
#ifdef CAFFE2_BUILD_MAIN_LIB

runtime/core/portable_type/c10/c10/targets.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def define_common_targets():
125125
"@EXECUTORCH_CLIENTS",
126126
],
127127
exported_deps = [
128-
"//executorch/runtime/core/portable_type/c10/torch/standalone:torch_standalone_headers",
128+
"//executorch/runtime/core/portable_type/c10/torch/headeronly:torch_headeronly",
129129
] + select({
130130
"DEFAULT": [],
131131
# Half-inl.h depends on vec_half.h from ATen, but only when building for x86.

runtime/core/portable_type/c10/torch/standalone/TARGETS renamed to runtime/core/portable_type/c10/torch/headeronly/TARGETS

File renamed without changes.

runtime/core/portable_type/c10/torch/standalone/macros/Export.h renamed to runtime/core/portable_type/c10/torch/headeronly/macros/Export.h

File renamed without changes.

runtime/core/portable_type/c10/torch/standalone/targets.bzl renamed to runtime/core/portable_type/c10/torch/headeronly/targets.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def define_common_targets():
88
"""
99

1010
runtime.cxx_library(
11-
name = "torch_standalone_headers",
11+
name = "torch_headeronly",
1212
exported_headers = glob(["**/*.h"]),
13-
header_namespace = "torch/standalone",
13+
header_namespace = "torch/headeronly",
1414
)

scripts/build_apple_frameworks.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ sed -i '' '1i\
180180
' \
181181
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10/macros/Macros.h" \
182182
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10/macros/Export.h" \
183-
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch/standalone/macros/Export.h"
183+
"$HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch/headeronly/macros/Export.h"
184184

185185
cp -r $HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/c10 "$HEADERS_ABSOLUTE_PATH/"
186186
cp -r $HEADERS_ABSOLUTE_PATH/executorch/runtime/core/portable_type/c10/torch "$HEADERS_ABSOLUTE_PATH/"

0 commit comments

Comments
 (0)