Skip to content

Commit 5f5f95b

Browse files
committed
Using system libs instead of additional (now, superfluous) sources
Removed pic patch Replaced FP16 source with dependency
1 parent e557ea4 commit 5f5f95b

File tree

2 files changed

+3
-39
lines changed

2 files changed

+3
-39
lines changed

X/XNNPACK/build_tarballs.jl

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,11 @@ pthreadpool_compat = [
2424
sources = [
2525
GitSource("https://github.com/google/XNNPACK.git", "79cd5f9e18ad0925ac9a050b00ea5a36230072db"),
2626
DirectorySource("./bundled"),
27-
GitSource("https://github.com/pytorch/cpuinfo.git", "5916273f79a21551890fd3d56fc5375a78d1598d"), # Referenced by https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/cmake/DownloadCpuinfo.cmake#L15 - conflicts with https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/WORKSPACE#L71
28-
GitSource("https://github.com/pytorch/cpuinfo.git", "d5e37adf1406cf899d7d9ec1d317c47506ccb970"; unpack_target="clog"), # Referenced by https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/WORKSPACE#L59
29-
GitSource("https://github.com/Maratyszcza/FP16.git", "0a92994d729ff76a58f692d3028ca1b64b145d91"), # Referenced by https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/WORKSPACE#L32
30-
GitSource("https://github.com/Maratyszcza/FXdiv.git", "b408327ac2a15ec3e43352421954f5b1967701d1"), # Referenced by https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/WORKSPACE#L42
31-
# psimd 072586a71b55b7f8c584153d223e95687148a900
32-
GitSource("https://github.com/Maratyszcza/pthreadpool.git", "b8374f80e42010941bda6c85b0e3f1a1bd77a1e0"), # Referenced by https://github.com/google/XNNPACK/blob/79cd5f9e18ad0925ac9a050b00ea5a36230072db/WORKSPACE#L50
3327
]
3428

3529
# Bash recipe for building across all platforms
3630
script = raw"""
3731
cd $WORKSPACE/srcdir/XNNPACK
38-
atomic_patch -p1 ../patches/xnnpack-pic.patch
3932
atomic_patch -p1 ../patches/xnnpack-soversion.patch
4033
atomic_patch -p1 ../patches/xnnpack-freebsd.patch
4134
C_FLAGS=()
@@ -53,27 +46,17 @@ elif [[ $bb_full_target == aarch64-apple-*march+apple_m1* ]]; then
5346
atomic_patch -p1 ../patches/xnnpack-aarch64-exclude-microkernel-srcs.patch
5447
C_FLAGS+="-DXNN_NO_F16_OPERATORS "
5548
fi
56-
if [[ $target == x86_64-apple-darwin* ]]; then
57-
PTHREADPOOL_SYNC_PRIMITIVE=condvar
58-
else
59-
PTHREADPOOL_SYNC_PRIMITIVE=default
60-
fi
6149
mkdir build
6250
cd build
6351
cmake \
6452
-DCMAKE_INSTALL_PREFIX=$prefix \
6553
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
6654
-DCMAKE_BUILD_TYPE=Release \
6755
-DCMAKE_INSTALL_LIBDIR=$libdir \
68-
-DCPUINFO_SOURCE_DIR=$WORKSPACE/srcdir/cpuinfo \
69-
-DCLOG_SOURCE_DIR=$WORKSPACE/srcdir/clog/cpuinfo \
70-
-DFP16_SOURCE_DIR=$WORKSPACE/srcdir/FP16 \
71-
-DFXDIV_SOURCE_DIR=$WORKSPACE/srcdir/FXdiv \
72-
-DPTHREADPOOL_SOURCE_DIR=$WORKSPACE/srcdir/pthreadpool \
73-
-DPTHREADPOOL_SYNC_PRIMITIVE=$PTHREADPOOL_SYNC_PRIMITIVE \
7456
-DXNNPACK_LIBRARY_TYPE=shared \
7557
-DXNNPACK_BUILD_TESTS=OFF \
7658
-DXNNPACK_BUILD_BENCHMARKS=OFF \
59+
-DXNNPACK_USE_SYSTEM_LIBS=ON \
7760
-DCMAKE_C_FLAGS="$C_FLAGS" \
7861
..
7962
cmake --build . -- -j $nproc
@@ -100,8 +83,9 @@ products = [
10083
]
10184

10285
# Dependencies that must be installed before this package can be built
103-
dependencies = Dependency[
86+
dependencies = [
10487
Dependency("CPUInfo_jll", cpuinfo_build_version; compat=join(string.(cpuinfo_compat), ", ")),
88+
BuildDependency(PackageSpec("FP16_jll", v"0.0.20210320")),
10589
Dependency("PThreadPool_jll", pthreadpool_build_version; compat=join(string.(pthreadpool_compat), ", ")),
10690
]
10791

X/XNNPACK/bundled/patches/xnnpack-pic.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)