Reapply D77381084 / #156964: Rename torch::standalone to headeronly (#157251)

Was reverted due to internal failure which should be fixed now. I believe Jane wants this reapplied and picked to release, and she's out this week.

Original summary:

headeronly is more clear, let's change the name before anyone depends on standalone

Differential Revision: [D77520173](https://our.internmc.facebook.com/intern/diff/D77520173/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/157251
Approved by: https://github.com/janeyx99, https://github.com/Skylion007, https://github.com/desertfire
This commit is contained in:
Scott Wolchok
2025-06-30 10:15:56 -07:00
committed by PyTorch MergeBot
parent 3dda80e990
commit fee2377f9e
11 changed files with 13 additions and 13 deletions

View File

@ -87,7 +87,7 @@ include_patterns = [
'torch/csrc/**/*.cpp',
'torch/nativert/**/*.h',
'torch/nativert/**/*.cpp',
'torch/standalone/**/*.h',
'torch/headeronly/**/*.h',
'test/cpp/**/*.h',
'test/cpp/**/*.cpp',
]
@ -241,7 +241,7 @@ include_patterns = [
'torch/nativert/*.cpp',
'torch/nativert/**/*.h',
'torch/nativert/**/*.cpp',
'torch/standalone/**/*.h',
'torch/headeronly/**/*.h',
]
exclude_patterns = [
# The negative filters below are to exclude files that include onnx_pb.h or

View File

@ -944,7 +944,7 @@ def define_buck_targets(
[
("torch/csrc/api/include", "torch/**/*.h"),
("", "torch/csrc/**/*.h"),
("", "torch/standalone/**/*.h"),
("", "torch/headeronly/**/*.h"),
("", "torch/script.h"),
("", "torch/library.h"),
("", "torch/custom_class.h"),

View File

@ -5,7 +5,7 @@
#include <c10/macros/cmake_macros.h>
#endif // C10_USING_CUSTOM_GENERATED_MACROS
#include <torch/standalone/macros/Export.h>
#include <torch/headeronly/macros/Export.h>
// This one is being used by libtorch.so
#ifdef CAFFE2_BUILD_MAIN_LIB

View File

@ -13,7 +13,7 @@ def define_targets(rules):
local_defines = ["C10_BUILD_MAIN_LIB"],
visibility = ["//visibility:public"],
deps = [
"//torch/standalone:torch_standalone_headers",
"//torch/headeronly:torch_headeronly",
],
)

View File

@ -74,7 +74,7 @@ def define_c10_ovrsource(name, is_mobile):
],
}),
exported_deps = [
"//xplat/caffe2/torch/standalone:torch_standalone_headers",
"//xplat/caffe2/torch/headeronly:torch_headeronly",
":ovrsource_c10_cmake_macros.h",
"//arvr/third-party/gflags:gflags",
"//third-party/cpuinfo:cpuinfo",

View File

@ -34,7 +34,7 @@ def define_targets(rules):
visibility = ["//visibility:public"],
deps = [
":bit_cast",
"//torch/standalone:torch_standalone_headers",
"//torch/headeronly:torch_headeronly",
"//c10/macros",
"@fmt",
"@moodycamel//:moodycamel",
@ -92,7 +92,7 @@ def define_targets(rules):
],
),
deps = [
"//torch/standalone:torch_standalone_headers",
"//torch/headeronly:torch_headeronly",
],
visibility = ["//visibility:public"],
)

View File

@ -1299,7 +1299,7 @@ target_include_directories(torch_cpu PRIVATE ${ATen_CPU_INCLUDE})
target_include_directories(torch_cpu PRIVATE
${TORCH_SRC_DIR}/csrc
${TORCH_SRC_DIR}/standalone)
${TORCH_SRC_DIR}/headeronly)
target_include_directories(torch_cpu PRIVATE
${TORCH_ROOT}/third_party/miniz-3.0.2)
@ -1320,7 +1320,7 @@ target_include_directories(torch_cpu PRIVATE
install(DIRECTORY
"${TORCH_SRC_DIR}/csrc"
"${TORCH_SRC_DIR}/standalone"
"${TORCH_SRC_DIR}/headeronly"
DESTINATION ${TORCH_INSTALL_INCLUDE_DIR}/torch
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")

View File

@ -1,6 +1,6 @@
#include <gtest/gtest.h>
#include <torch/standalone/macros/Export.h>
#include <torch/headeronly/macros/Export.h>
namespace torch {
namespace aot_inductor {

View File

@ -48,5 +48,5 @@ maximum
minimum
size
# torch/standalone/macros/Export.h
# torch/headeronly/macros/Export.h
C10_API

View File

@ -1,7 +1,7 @@
load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "torch_standalone_headers",
name = "torch_headeronly",
hdrs = glob([
"**/*.h"
]),