gnu: xnnpack: Update to commit 51a9875.

The tests which fail to build if building the shared library are removed by a
patch. Autogenerated files are removed by a snippet and generated in a
separate build phase.

* gnu/packages/machine-learning.scm (xnnpack): Update to commit 51a9875.
[source]: Add patch for tests. Add snippet to remove autogenerated files.
[arguments]: New modules and phase arguments.
[inputs]: Add clog and cpuinfo.
[native-inputs]: New field.
* gnu/packages/patches/xnnpack-remove-broken-tests.patch: Add file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/patches/xnnpack-system-libraries.patch: Update patch.
This commit is contained in:
David Elsing 2024-03-23 22:05:02 +00:00 committed by Ludovic Courtès
parent b032109b5c
commit 048e5a0692
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 2853 additions and 1578 deletions

View file

@ -2253,6 +2253,7 @@ dist_patch_DATA = \
%D%/packages/patches/xfce4-settings-defaults.patch \
%D%/packages/patches/xgboost-use-system-dmlc-core.patch \
%D%/packages/patches/xmonad-dynamic-linking.patch \
%D%/packages/patches/xnnpack-remove-broken-tests.patch \
%D%/packages/patches/xnnpack-system-libraries.patch \
%D%/packages/patches/xnnpack-for-torch2-system-libraries.patch \
%D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch \

View file

@ -4094,41 +4094,110 @@ (define-public qnnpack
(define-public xnnpack
;; There's currently no tag on this repo.
(let ((version "0.0")
(commit "ae108ef49aa5623b896fc93d4298c49d1750d9ba")
(revision "2"))
(commit "51a987591a6fc9f0fc0707077f53d763ac132cbf")
(revision "3"))
(package
(name "xnnpack")
(version (git-version version revision commit))
(home-page "https://github.com/google/XNNPACK") ;fork of QNNPACK
(source (origin
(method git-fetch)
(uri (git-reference (url home-page) (commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"0q68q2jxiiiblx45q4337k13ppgh5vqjwrwznchcnpb8hawjj3zl"))
(patches (search-patches "xnnpack-system-libraries.patch"))))
(source
(origin
(method git-fetch)
(uri (git-reference (url home-page) (commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"1rzby82xq8d0rl1d148yz88jh9cpsw5c8b2yw7yg39mi7qmr55rm"))
;; Some tests fail to link as they use internal symbols, which are
;; not included in the shared library.
;; XXX: Additionally, these tests fail on i686 due to incorrect results:
;; 171 - f32-vlrelu-test (Failed)
;; 211 - qs8-gavgpool-minmax-fp32-test (Failed)
;; 224 - qu8-avgpool-minmax-fp32-test (Failed)
;; 228 - qu8-gavgpool-minmax-fp32-test (Failed)
;; 263 - x32-packx-test (Failed)
(patches (search-patches "xnnpack-remove-broken-tests.patch"))
(modules '((guix build utils)
(ice-9 ftw)
(ice-9 textual-ports)
(srfi srfi-26)))
(snippet
'(begin
;; Remove autogenerated files
(for-each
(lambda (dir)
(let ((gendir (string-append "src/" dir "/gen")))
(when (file-exists? gendir)
(delete-file-recursively gendir)
;; Needed for the scripts generating the files
(mkdir gendir))))
(scandir "src" (negate (cut member <> '("." "..")))))
(delete-file-recursively "google3")
(delete-file "cmake/microkernels.cmake")
;; Additional autogenerated files which contain the string
;; "Auto-generated file"
(for-each
(lambda (dir)
(for-each
(lambda (name)
(let ((path (string-append dir "/" name)))
(when (call-with-input-file path
(lambda (port)
(string-contains
(get-string-all port)
"Auto-generated file")))
(delete-file path))))
(scandir dir (negate (cut member <> '("." ".."))))))
'("test" "bench" "eval" "models" "src/enums" "src/xnnpack"))))))
(build-system cmake-build-system)
(arguments
'(#:configure-flags '("-DXNNPACK_USE_SYSTEM_LIBS=YES"
(list
#:build-type "Release" ;; Debugging symbols require a lot of disk space
#:configure-flags ''("-DXNNPACK_USE_SYSTEM_LIBS=YES"
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
"-DXNNPACK_LIBRARY_TYPE=shared"
"-DXNNPACK_BUILD_TESTS=FALSE" ;FIXME: see below
"-DXNNPACK_BUILD_BENCHMARKS=FALSE")
;; FIXME: Building tests leads to a CMake error:
;;
;; ADD_LIBRARY cannot create target "all_microkernels" because
;; another target with the same name already exists.
#:tests? #f))
#:modules '((ice-9 ftw)
(guix build cmake-build-system)
(guix build utils))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-cmake
(lambda _
(substitute* "CMakeLists.txt"
(("TARGET_INCLUDE_DIRECTORIES\\((pthreadpool|cpuinfo).*") "")
((".*IF\\(NOT TARGET gtest\\).*")
"IF(FALSE)\n")
(("SET\\(CMAKE_CXX_STANDARD 11\\)")
"SET(CMAKE_CXX_STANDARD 14)")
(("AMD64") "x86_64"))))
(add-after 'patch-source-shebangs 'generate-files
(lambda _
(for-each
(lambda (name)
(when (and (string-prefix? "generate" name)
(string-suffix? ".sh" name)
(not (equal? "generate-amalgamation.sh" name)))
(display (string-append name "\n"))
(invoke "bash" (string-append "scripts/" name))))
(scandir "scripts"))
;; These need to run after the above scripts
(display "Remaining files\n")
(invoke "python3" "tools/update-microkernels.py")
(substitute* "tools/amalgamate-microkernels.py"
(("BUILD") "BUILD.bazel"))
(invoke "bash" "scripts/generate-amalgamation.sh"))))))
(inputs
(list cpuinfo
(list clog
cpuinfo
pthreadpool
googletest
googlebenchmark
fxdiv
fp16
psimd))
(native-inputs (list python-pyyaml python-wrapper))
(synopsis "Optimized floating-point neural network inference operators")
(description
"XNNPACK is a highly optimized library of floating-point neural network
@ -4137,6 +4206,9 @@ (define-public xnnpack
instead it provides low-level performance primitives for accelerating
high-level machine learning frameworks, such as TensorFlow Lite,
TensorFlow.js, PyTorch, and MediaPipe.")
(supported-systems
'("armv7-linux" "aarch64-linux" "riscv64-linux"
"i686-linux" "x86_64-linux" "i686-mingw" "x86_64-mingw"))
(license license:bsd-3))))
(define-public xnnpack-for-torch2

View file

@ -0,0 +1,337 @@
These tests fail to build because we are building a shared library.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 95df99eae..ab57d5efa 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -978,16 +978,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(add-nd-eager-test PRIVATE XNNPACK fp16 gtest gtest_main)
ADD_TEST(NAME add-nd-eager-test COMMAND add-nd-eager-test)
- ADD_EXECUTABLE(argmax-pooling-nhwc-test test/argmax-pooling-nhwc.cc)
- TARGET_INCLUDE_DIRECTORIES(argmax-pooling-nhwc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(argmax-pooling-nhwc-test PRIVATE XNNPACK gtest gtest_main)
- ADD_TEST(NAME argmax-pooling-nhwc-test COMMAND argmax-pooling-nhwc-test)
-
- ADD_EXECUTABLE(average-pooling-nhwc-test test/average-pooling-nhwc.cc)
- TARGET_INCLUDE_DIRECTORIES(average-pooling-nhwc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(average-pooling-nhwc-test PRIVATE XNNPACK fp16 gtest gtest_main)
- ADD_TEST(NAME average-pooling-nhwc-test COMMAND average-pooling-nhwc-test)
-
ADD_EXECUTABLE(bankers-rounding-nc-test test/bankers-rounding-nc.cc)
TARGET_INCLUDE_DIRECTORIES(bankers-rounding-nc-test PRIVATE src test)
TARGET_LINK_LIBRARIES(bankers-rounding-nc-test PRIVATE XNNPACK fp16 gtest gtest_main)
@@ -1066,11 +1056,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(copy-nc-eager-test PRIVATE XNNPACK gtest gtest_main)
ADD_TEST(NAME copy-nc-eager-test COMMAND copy-nc-eager-test)
- ADD_EXECUTABLE(deconvolution-nhwc-test test/deconvolution-nhwc.cc)
- TARGET_INCLUDE_DIRECTORIES(deconvolution-nhwc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(deconvolution-nhwc-test PRIVATE XNNPACK fp16 gtest gtest_main)
- ADD_TEST(NAME deconvolution-nhwc-test COMMAND deconvolution-nhwc-test)
-
ADD_EXECUTABLE(depth-to-space-nchw2nhwc-test test/depth-to-space-nchw2nhwc.cc)
TARGET_INCLUDE_DIRECTORIES(depth-to-space-nchw2nhwc-test PRIVATE src test)
TARGET_LINK_LIBRARIES(depth-to-space-nchw2nhwc-test PRIVATE XNNPACK gtest gtest_main)
@@ -1116,11 +1101,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(floor-nc-eager-test PRIVATE XNNPACK fp16 gtest gtest_main)
ADD_TEST(NAME floor-nc-eager-test COMMAND floor-nc-eager-test)
- ADD_EXECUTABLE(global-average-pooling-nwc-test test/global-average-pooling-nwc.cc)
- TARGET_INCLUDE_DIRECTORIES(global-average-pooling-nwc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(global-average-pooling-nwc-test PRIVATE XNNPACK fp16 gtest gtest_main)
- ADD_TEST(NAME global-average-pooling-nwc-test COMMAND global-average-pooling-nwc-test)
-
ADD_EXECUTABLE(global-average-pooling-ncw-test test/global-average-pooling-ncw.cc)
TARGET_INCLUDE_DIRECTORIES(global-average-pooling-ncw-test PRIVATE src test)
TARGET_LINK_LIBRARIES(global-average-pooling-ncw-test PRIVATE XNNPACK fp16 gtest gtest_main)
@@ -1146,11 +1126,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(leaky-relu-nc-eager-test PRIVATE XNNPACK fp16 gtest gtest_main)
ADD_TEST(NAME leaky-relu-nc-eager-test COMMAND leaky-relu-nc-eager-test)
- ADD_EXECUTABLE(max-pooling-nhwc-test test/max-pooling-nhwc.cc)
- TARGET_INCLUDE_DIRECTORIES(max-pooling-nhwc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(max-pooling-nhwc-test PRIVATE XNNPACK fp16 gtest gtest_main)
- ADD_TEST(NAME max-pooling-nhwc-test COMMAND max-pooling-nhwc-test)
-
ADD_EXECUTABLE(maximum-nd-test test/maximum-nd.cc)
TARGET_INCLUDE_DIRECTORIES(maximum-nd-test PRIVATE src test)
TARGET_LINK_LIBRARIES(maximum-nd-test PRIVATE XNNPACK fp16 gtest gtest_main)
@@ -1191,11 +1166,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(negate-nc-eager-test PRIVATE XNNPACK fp16 gtest gtest_main)
ADD_TEST(NAME negate-nc-eager-test COMMAND negate-nc-eager-test)
- ADD_EXECUTABLE(prelu-nc-test test/prelu-nc.cc)
- TARGET_INCLUDE_DIRECTORIES(prelu-nc-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(prelu-nc-test PRIVATE XNNPACK fp16 gtest gtest_main)
- ADD_TEST(NAME prelu-nc-test COMMAND prelu-nc-test)
-
ADD_EXECUTABLE(resize-bilinear-nhwc-test test/resize-bilinear-nhwc.cc)
TARGET_INCLUDE_DIRECTORIES(resize-bilinear-nhwc-test PRIVATE src test)
TARGET_LINK_LIBRARIES(resize-bilinear-nhwc-test PRIVATE XNNPACK fp16 gtest gtest_main)
@@ -1312,16 +1282,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_LINK_LIBRARIES(fusion-test PRIVATE XNNPACK gtest gtest_main)
ADD_TEST(NAME fusion-test COMMAND fusion-test)
- ADD_EXECUTABLE(memory-planner-test test/memory-planner-test.cc)
- TARGET_INCLUDE_DIRECTORIES(memory-planner-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(memory-planner-test PRIVATE XNNPACK gtest gtest_main)
- ADD_TEST(NAME memory-planner-test COMMAND memory-planner-test)
-
- ADD_EXECUTABLE(subgraph-fp16-test test/subgraph-fp16.cc)
- TARGET_INCLUDE_DIRECTORIES(subgraph-fp16-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(subgraph-fp16-test PRIVATE XNNPACK gtest gtest_main)
- ADD_TEST(NAME subgraph-fp16-test COMMAND subgraph-fp16-test)
-
ADD_EXECUTABLE(subgraph-nchw-test test/subgraph-nchw.cc)
TARGET_INCLUDE_DIRECTORIES(subgraph-nchw-test PRIVATE src test)
TARGET_LINK_LIBRARIES(subgraph-nchw-test PRIVATE XNNPACK gtest gtest_main)
@@ -1347,226 +1307,6 @@ IF(XNNPACK_BUILD_TESTS)
TARGET_INCLUDE_DIRECTORIES(argmax-pooling-2d-test PRIVATE src test)
TARGET_LINK_LIBRARIES(argmax-pooling-2d-test PRIVATE XNNPACK gtest gtest_main)
ADD_TEST(NAME argmax-pooling-2d-test COMMAND argmax-pooling-2d-test)
-
- ADD_EXECUTABLE(average-pooling-2d-test test/average-pooling-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(average-pooling-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(average-pooling-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME average-pooling-2d-test COMMAND average-pooling-2d-test)
-
- ADD_EXECUTABLE(bankers-rounding-test test/bankers-rounding.cc)
- TARGET_INCLUDE_DIRECTORIES(bankers-rounding-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(bankers-rounding-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME bankers-rounding-test COMMAND bankers-rounding-test)
-
- ADD_EXECUTABLE(ceiling-test test/ceiling.cc)
- TARGET_INCLUDE_DIRECTORIES(ceiling-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(ceiling-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME ceiling-test COMMAND ceiling-test)
-
- ADD_EXECUTABLE(clamp-test test/clamp.cc)
- TARGET_INCLUDE_DIRECTORIES(clamp-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(clamp-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME clamp-test COMMAND clamp-test)
-
- ADD_EXECUTABLE(concatenate2-test test/concatenate2.cc)
- TARGET_INCLUDE_DIRECTORIES(concatenate2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(concatenate2-test PRIVATE XNNPACK gtest gtest_main subgraph)
- ADD_TEST(NAME concatenate2-test COMMAND concatenate2-test)
-
- ADD_EXECUTABLE(concatenate3-test test/concatenate3.cc)
- TARGET_INCLUDE_DIRECTORIES(concatenate3-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(concatenate3-test PRIVATE XNNPACK gtest gtest_main subgraph)
- ADD_TEST(NAME concatenate3-test COMMAND concatenate3-test)
-
- ADD_EXECUTABLE(concatenate4-test test/concatenate4.cc)
- TARGET_INCLUDE_DIRECTORIES(concatenate4-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(concatenate4-test PRIVATE XNNPACK gtest gtest_main subgraph)
- ADD_TEST(NAME concatenate4-test COMMAND concatenate4-test)
-
- ADD_EXECUTABLE(convert-test test/convert.cc)
- TARGET_INCLUDE_DIRECTORIES(convert-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(convert-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME convert-test COMMAND convert-test)
-
- ADD_EXECUTABLE(convolution-2d-test test/convolution-2d.cc)
- SET_TARGET_PROPERTIES(convolution-2d-test PROPERTIES CXX_EXTENSIONS YES)
- TARGET_INCLUDE_DIRECTORIES(convolution-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(convolution-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph convolution-test-helpers)
- ADD_TEST(NAME convolution-2d-test COMMAND convolution-2d-test)
-
- ADD_EXECUTABLE(copy-test test/copy.cc)
- TARGET_INCLUDE_DIRECTORIES(copy-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(copy-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME copy-test COMMAND copy-test)
-
- ADD_EXECUTABLE(deconvolution-2d-test test/deconvolution-2d.cc)
- SET_TARGET_PROPERTIES(deconvolution-2d-test PROPERTIES CXX_EXTENSIONS YES)
- TARGET_INCLUDE_DIRECTORIES(deconvolution-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(deconvolution-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph convolution-test-helpers)
- ADD_TEST(NAME deconvolution-2d-test COMMAND deconvolution-2d-test)
-
- ADD_EXECUTABLE(depth-to-space-test test/depth-to-space.cc)
- TARGET_INCLUDE_DIRECTORIES(depth-to-space-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(depth-to-space-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME depth-to-space-test COMMAND depth-to-space-test)
-
- ADD_EXECUTABLE(depthwise-convolution-2d-test test/depthwise-convolution-2d.cc)
- SET_TARGET_PROPERTIES(depthwise-convolution-2d-test PROPERTIES CXX_EXTENSIONS YES)
- TARGET_INCLUDE_DIRECTORIES(depthwise-convolution-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(depthwise-convolution-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph convolution-test-helpers)
- ADD_TEST(NAME depthwise-convolution-2d-test COMMAND depthwise-convolution-2d-test)
-
- ADD_EXECUTABLE(divide2-test test/divide2.cc)
- TARGET_INCLUDE_DIRECTORIES(divide2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(divide2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME divide2-test COMMAND divide2-test)
-
- ADD_EXECUTABLE(elu-test test/elu.cc)
- TARGET_INCLUDE_DIRECTORIES(elu-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(elu-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME elu-test COMMAND elu-test)
-
- ADD_EXECUTABLE(even-split2-test test/even-split2.cc)
- TARGET_INCLUDE_DIRECTORIES(even-split2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(even-split2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME even-split2-test COMMAND even-split2-test)
-
- ADD_EXECUTABLE(even-split3-test test/even-split3.cc)
- TARGET_INCLUDE_DIRECTORIES(even-split3-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(even-split3-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME even-split3-test COMMAND even-split3-test)
-
- ADD_EXECUTABLE(even-split4-test test/even-split4.cc)
- TARGET_INCLUDE_DIRECTORIES(even-split4-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(even-split4-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME even-split4-test COMMAND even-split4-test)
-
- ADD_EXECUTABLE(floor-test test/floor.cc)
- TARGET_INCLUDE_DIRECTORIES(floor-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(floor-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME floor-test COMMAND floor-test)
-
- ADD_EXECUTABLE(fully-connected-test test/fully-connected.cc)
- TARGET_INCLUDE_DIRECTORIES(fully-connected-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(fully-connected-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME fully-connected-test COMMAND fully-connected-test)
-
- ADD_EXECUTABLE(global-average-pooling-1d-test test/global-average-pooling-1d.cc)
- TARGET_INCLUDE_DIRECTORIES(global-average-pooling-1d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(global-average-pooling-1d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME global-average-pooling-1d-test COMMAND global-average-pooling-1d-test)
-
- ADD_EXECUTABLE(global-average-pooling-2d-test test/global-average-pooling-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(global-average-pooling-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(global-average-pooling-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME global-average-pooling-2d-test COMMAND global-average-pooling-2d-test)
-
- ADD_EXECUTABLE(hardswish-test test/hardswish.cc)
- TARGET_INCLUDE_DIRECTORIES(hardswish-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(hardswish-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME hardswish-test COMMAND hardswish-test)
-
- ADD_EXECUTABLE(leaky-relu-test test/leaky-relu.cc)
- TARGET_INCLUDE_DIRECTORIES(leaky-relu-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(leaky-relu-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME leaky-relu-test COMMAND leaky-relu-test)
-
- ADD_EXECUTABLE(max-pooling-2d-test test/max-pooling-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(max-pooling-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(max-pooling-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME max-pooling-2d-test COMMAND max-pooling-2d-test)
-
- ADD_EXECUTABLE(maximum2-test test/maximum2.cc)
- TARGET_INCLUDE_DIRECTORIES(maximum2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(maximum2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME maximum2-test COMMAND maximum2-test)
-
- ADD_EXECUTABLE(minimum2-test test/minimum2.cc)
- TARGET_INCLUDE_DIRECTORIES(minimum2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(minimum2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME minimum2-test COMMAND minimum2-test)
-
- ADD_EXECUTABLE(multiply2-test test/multiply2.cc)
- TARGET_INCLUDE_DIRECTORIES(multiply2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(multiply2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME multiply2-test COMMAND multiply2-test)
-
- ADD_EXECUTABLE(negate-test test/negate.cc)
- TARGET_INCLUDE_DIRECTORIES(negate-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(negate-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME negate-test COMMAND negate-test)
-
- ADD_EXECUTABLE(prelu-test test/prelu.cc)
- TARGET_INCLUDE_DIRECTORIES(prelu-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(prelu-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME prelu-test COMMAND prelu-test)
-
- ADD_EXECUTABLE(sigmoid-test test/sigmoid.cc)
- SET_TARGET_PROPERTIES(sigmoid-test PROPERTIES CXX_EXTENSIONS YES)
- TARGET_INCLUDE_DIRECTORIES(sigmoid-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(sigmoid-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME sigmoid-test COMMAND sigmoid-test)
-
- ADD_EXECUTABLE(static-slice-test test/static-slice.cc)
- SET_TARGET_PROPERTIES(static-slice-test PROPERTIES CXX_EXTENSIONS YES)
- TARGET_INCLUDE_DIRECTORIES(static-slice-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(static-slice-test PRIVATE XNNPACK fp16 gmock gtest gtest_main subgraph)
- ADD_TEST(NAME static-slice-test COMMAND static-slice-test)
-
- ADD_EXECUTABLE(softmax-test test/softmax.cc)
- TARGET_INCLUDE_DIRECTORIES(softmax-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(softmax-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME softmax-test COMMAND softmax-test)
-
- ADD_EXECUTABLE(space-to-depth-2d-test test/space-to-depth-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(space-to-depth-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(space-to-depth-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME space-to-depth-2d-test COMMAND space-to-depth-2d-test)
-
- ADD_EXECUTABLE(square-test test/square.cc)
- TARGET_INCLUDE_DIRECTORIES(square-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(square-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME square-test COMMAND square-test)
-
- ADD_EXECUTABLE(square-root-test test/square.cc)
- TARGET_INCLUDE_DIRECTORIES(square-root-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(square-root-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME square-root-test COMMAND square-root-test)
-
- ADD_EXECUTABLE(squared-difference-test test/squared-difference.cc)
- TARGET_INCLUDE_DIRECTORIES(squared-difference-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(squared-difference-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME squared-difference-test COMMAND squared-difference-test)
-
- ADD_EXECUTABLE(static-constant-pad-test test/static-constant-pad.cc)
- TARGET_INCLUDE_DIRECTORIES(static-constant-pad-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(static-constant-pad-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME static-constant-pad-test COMMAND static-constant-pad-test)
-
- ADD_EXECUTABLE(static-reshape-test test/static-reshape.cc)
- TARGET_INCLUDE_DIRECTORIES(static-reshape-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(static-reshape-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME static-reshape-test COMMAND static-reshape-test)
-
- ADD_EXECUTABLE(static-resize-bilinear-2d-test test/static-resize-bilinear-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(static-resize-bilinear-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(static-resize-bilinear-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME static-resize-bilinear-2d-test COMMAND static-resize-bilinear-2d-test)
-
- ADD_EXECUTABLE(static-transpose-test test/static-transpose.cc)
- TARGET_INCLUDE_DIRECTORIES(static-transpose-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(static-transpose-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME static-transpose-test COMMAND static-transpose-test)
-
- ADD_EXECUTABLE(subtract2-test test/subtract2.cc)
- TARGET_INCLUDE_DIRECTORIES(subtract2-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(subtract2-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME subtract2-test COMMAND subtract2-test)
-
- ADD_EXECUTABLE(unpooling-2d-test test/unpooling-2d.cc)
- TARGET_INCLUDE_DIRECTORIES(unpooling-2d-test PRIVATE src test)
- TARGET_LINK_LIBRARIES(unpooling-2d-test PRIVATE XNNPACK fp16 gtest gtest_main subgraph)
- ADD_TEST(NAME unpooling-2d-test COMMAND unpooling-2d-test)
ENDIF()
# ---[ Normalization unit tests
@@ -2834,21 +2574,7 @@ IF(XNNPACK_BUILD_TESTS)
ADD_EXECUTABLE(microkernel-utils-test test/microkernel-utils.cc)
TARGET_INCLUDE_DIRECTORIES(microkernel-utils-test PRIVATE include src)
TARGET_LINK_LIBRARIES(microkernel-utils-test PRIVATE microkernel-utils gtest gtest_main pthreadpool)
-
- ADD_EXECUTABLE(operator-utils-test test/operator-utils.cc)
- TARGET_INCLUDE_DIRECTORIES(operator-utils-test PRIVATE include src)
- TARGET_LINK_LIBRARIES(operator-utils-test PRIVATE XNNPACK gtest gtest_main pthreadpool)
ENDIF()
-
- ADD_EXECUTABLE(packing-test test/packing.cc)
- TARGET_INCLUDE_DIRECTORIES(packing-test PRIVATE include src)
- TARGET_LINK_LIBRARIES(packing-test PRIVATE fp16 gtest gtest_main pthreadpool)
- TARGET_LINK_LIBRARIES(packing-test PRIVATE XNNPACK microkernel-utils operator-utils packing)
-
- ADD_EXECUTABLE(indirection-test test/indirection.cc)
- TARGET_INCLUDE_DIRECTORIES(indirection-test PRIVATE include src)
- TARGET_LINK_LIBRARIES(indirection-test PRIVATE gtest gtest_main pthreadpool)
- TARGET_LINK_LIBRARIES(indirection-test PRIVATE XNNPACK indirection)
ENDIF()
# ---[ XNNPACK microbenchmarks

File diff suppressed because it is too large Load diff