Skip to content

Commit 3ee5d59

Browse files
committed
Update
[ghstack-poisoned]
1 parent 3b4fa85 commit 3ee5d59

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

.ci/scripts/wheel/test_cpp_sdk.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,12 @@ def test_consumer_is_relocatable(work_dir: Path) -> None:
553553
shutil.copy2(consumer, deployed / "consumer")
554554
# Every directory the wheel ships a library in, not just lib/. The CUDA delegate records a
555555
# dependency on a library under backends/cuda/, so copying lib/ alone produced a deployment
556-
# that cannot start, and this check could not see it.
557-
for source in ("lib", "backends/cuda"):
558-
directory = package_dir / source
559-
if not directory.is_dir():
560-
continue
561-
for library in sorted(directory.glob("lib*.so*")):
562-
if library.is_file() and not library.is_symlink():
563-
shutil.copy2(library, deployed / library.name)
556+
# that cannot start, and this check could not see it. Searched for rather than named, because
557+
# a backend that ships its own library in a new directory would otherwise be left out of the
558+
# copy and this check would pass on a deployment that cannot start.
559+
for library in sorted(package_dir.rglob("lib*.so*")):
560+
if library.is_file() and not library.is_symlink():
561+
shutil.copy2(library, deployed / library.name)
564562

565563
moved = deployed / "consumer"
566564
# Strip the absolute entry the build left behind, so only $ORIGIN can resolve the
@@ -839,6 +837,11 @@ def test_every_shipped_header_compiles(work_dir: Path) -> None:
839837
# package: a platform that is not the one being built for, or a third-party library the wheel does not
840838
# carry. They ship because a source build includes them, and holding them to this rule would report a
841839
# defect with no available fix.
840+
#
841+
# Not the same list as the packaging one that decides which headers ship at all. That list removes a
842+
# header no shipped header includes; this one keeps a header that has to ship because something else
843+
# includes it, and skips only the attempt to compile it on its own. A header belongs in exactly one of
844+
# the two.
842845
needs_more_than_the_wheel = (
843846
# These ship because other shipped headers include them, so they cannot be left out, and they do
844847
# not compile on their own: each needs a third-party library the wheel links but publishes no

docs/source/using-executorch-cpp.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ targets you need instead.
184184

185185
### Building from source
186186

187-
188187
ExecuTorch uses CMake as the primary build system. Inclusion of the module and tensor APIs are controlled by the `EXECUTORCH_BUILD_EXTENSION_MODULE` and `EXECUTORCH_BUILD_EXTENSION_TENSOR` CMake options. As these APIs may not be supported on embedded systems, they are disabled by default when building from source. The low-level API surface is always included. To link, add the `executorch` target as a CMake dependency, along with `executorch_backends`, `executorch_extensions`, and `extension_kernels`, to link all configured backends, extensions, and kernels.
189188

190189
```

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,15 @@
9494
# helper or removed the utility everything needs.
9595
#
9696
# Only headers that nothing else the wheel installs includes belong here. A header other shipped headers
97-
# pull in must keep shipping even when it cannot be compiled on its own.
97+
# pull in must keep shipping even when it cannot be compiled on its own. Those are the ones listed
98+
# separately in the release test's own exemptions, which skip the compile check for a header that has to
99+
# ship anyway. The two lists are deliberately different: this one decides what ships, that one decides
100+
# what is compiled on its own.
98101
_UNSHIPPABLE_HEADERS = frozenset(
99102
{
100103
# Needs a header generated when the schema is compiled, which in turn needs the FlatBuffers C++
101104
# headers. Those are a third-party library this wheel does not vendor.
102105
"runtime/executor/tensor_parser.h",
103-
# A test helper, needing a test framework the wheel does not ship.
104-
"runtime/core/testing_util/error_matchers.h",
105106
# Reads processor details through cpuinfo, whose headers the wheel does not publish.
106107
"extension/threadpool/cpuinfo_utils.h",
107108
# Holds a pthreadpool member by value, so it needs that library's header, which the wheel does not

tools/cmake/executorch-wheel-config.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,6 @@ elseif(_executorch_runtime_library)
353353
# target twice is an error, so only define it once and set the properties
354354
# either way.
355355
if(TARGET executorch::runtime)
356-
# This file ran already in the same configure, because another subproject
357-
# also called find_package. Redefining the target would be an error, so keep
358-
# the one that is already there.
359356
message(
360357
STATUS "executorch: executorch::runtime is already defined, reusing it"
361358
)

0 commit comments

Comments
 (0)