gnu: xnnpack: Update to commit 08f1489.

More tests fail when building the shared library, so they are disabled.  The
scripts to generate the autogenerated files run all commands at once, so they
are converted to Makefiles first.

* gnu/packages/machine-learning.scm (xnnpack): Update to commit 08f1489.
[source]: Remove patch.  Adjust snippet.
[arguments]<#:configure-flags>: Add "-DXNNPACK_BUILD_TESTS=OFF".
<#:tests?>: Disable tests.
<#:phases>: Adjust 'fix-cmake' phase.  Convert code generation scripts to
Makefiles and run them.  Run different missing scripts.
* gnu/packages/patches/xnnpack-remove-broken-tests.patch: Remove file.
* gnu/packages/patches/xnnpack-system-libraries.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove them.
This commit is contained in:
David Elsing 2024-08-04 22:15:48 +00:00 committed by Ludovic Courtès
parent e943d9ad53
commit f1d0626605
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 65 additions and 3036 deletions

View file

@ -2312,8 +2312,6 @@ 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/xplanet-1.3.1-cxx11-eof.patch \
%D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch \
%D%/packages/patches/xplanet-1.3.1-libimage_gif.c.patch \

View file

@ -4106,7 +4106,7 @@ (define-public qnnpack
(define-public xnnpack
;; There's currently no tag on this repo.
(let ((version "0.0")
(commit "51a987591a6fc9f0fc0707077f53d763ac132cbf")
(commit "08f1489fc815e8f121d4d2676c4863d2b51bfe73")
(revision "3"))
(package
(name "xnnpack")
@ -4119,34 +4119,14 @@ (define-public xnnpack
(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"))
"00jjhz0nfggbdnqqvcznba03pcyy7gssd24yhhzjhincnz9qh8jr"))
(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
;; Remove autogenerated files, which contain the string
;; "Auto-generated file"
(for-each
(lambda (dir)
@ -4159,8 +4139,18 @@ (define-public xnnpack
(get-string-all port)
"Auto-generated file")))
(delete-file path))))
(scandir dir (negate (cut member <> '("." ".."))))))
'("test" "bench" "eval" "models" "src/enums" "src/xnnpack"))))))
(scandir dir (negate (cut member <> '("." ".." "simd"))))))
(cons*
"test" "bench" "eval" "models" "src/enums" "src/xnnpack"
"gen" "cmake/gen"
(filter
identity
(map
(lambda (dir)
(let ((path
(string-append "src/" dir "/gen")))
(and (file-exists? path) path)))
(scandir "src" (negate (cut member <> '("." ".."))))))))))))
(build-system cmake-build-system)
(arguments
(list
@ -4169,7 +4159,11 @@ (define-public xnnpack
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
"-DXNNPACK_LIBRARY_TYPE=shared"
"-DXNNPACK_BUILD_BENCHMARKS=FALSE")
"-DXNNPACK_BUILD_BENCHMARKS=FALSE"
;; Tests fail to build with -DXNNPACK_LIBRARY_TYPE=shared:
;; https://github.com/google/XNNPACK/issues/6285
"-DXNNPACK_BUILD_TESTS=OFF")
#:tests? #f
#:modules '((ice-9 ftw)
(guix build cmake-build-system)
(guix build utils))
@ -4179,27 +4173,61 @@ (define-public xnnpack
(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 _
;; This script just calls two other scripts.
(delete-file "scripts/generate-tests-and-benchmarks.sh")
;; The bash scripts run all jobs at once and then wait, so we
;; convert them to Makefiles.
(for-each
(lambda (name)
(define counter 0) ; For the targets
(define target-deps "")
(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))))
(string-suffix? ".sh" name))
(let ((file (string-append "scripts/" name)))
(substitute* file
;; Turn the commands into targets and remove trailing
;; '&' characters
(("(.*(\\.sh|\\.py|-o |--output)[^&]*)&?[[:space:]]*$" _ command)
(begin
(set! counter (+ counter 1))
(string-append "target" (number->string counter)
":" target-deps
"\n\t" command "\n")))
(("[[:space:]]*wait[[:space:]]*") "")
;; The commands after this line depend on the
;; previous commands in the file.
(("JIT requires assembly files to be generated first.*" all)
(begin
(set! target-deps
(string-append
target-deps " target"
(string-join
(map number->string (iota counter 1)) " target")))
all)))
(display (string-append "Running " name "\n"))
(apply invoke "make" "-s" "-f" file "-j"
(number->string (parallel-job-count))
(map
(lambda (i)
(string-append "target" (number->string i)))
(iota counter 1))))))
(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"))))))
(invoke "python3" "tools/update-microkernels.py" "-a")
(invoke "python3" "tools/generate-lut-norm-test.py"
"--spec" "test/u8-lut32norm.yaml"
"--output" "test/u8-lut32norm.cc")
(invoke "python3" "tools/generate-gemm-test.py"
"--spec" "test/qd8-f16-qb4w-gemm-minmax.yaml"
"--output-test" "test/qd8-f16-qb4w-gemm-minmax.cc")
(invoke "python3" "tools/generate-gemm-test.py"
"--spec" "test/qd8-f32-qb4w-gemm-minmax.yaml"
"--output-test" "test/qd8-f32-qb4w-gemm-minmax.cc"))))))
(inputs
(list clog
cpuinfo

View file

@ -1,337 +0,0 @@
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