-
Notifications
You must be signed in to change notification settings - Fork 8
extra/xnnpack #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
eleir9268
wants to merge
7
commits into
qnx-ports:803
Choose a base branch
from
eleir9268:eleir/xnnpack
base: 803
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+149
−0
Open
extra/xnnpack #132
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
770e45b
extra/xnnpack
eleir9268 cc8d7c3
Change approach to external projects.
eleir9268 7d368d3
Be more concise.
eleir9268 d0824ff
Lock down build to fixed tags.
eleir9268 6c5da50
Move to the same version as tensorflow.
eleir9268 f53f91d
Remove old comment.
eleir9268 57c78f0
Add missing patches.
eleir9268 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 66d38d3484..7b340d26e9 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -389,7 +389,7 @@ ENDIF() | ||
| # ---[ Build flags | ||
| IF(NOT CMAKE_SYSTEM_NAME) | ||
| MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_NAME not defined") | ||
| -ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Android|Darwin|iOS|Linux|Windows|CYGWIN|MSYS|QURT|Emscripten)$") | ||
| +ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Android|Darwin|iOS|Linux|Windows|CYGWIN|MSYS|QURT|Emscripten|QNX)$") | ||
| MESSAGE(FATAL_ERROR "Unrecognized CMAKE_SYSTEM_NAME value \"${CMAKE_SYSTEM_NAME}\"") | ||
| ENDIF() | ||
| IF(CMAKE_SYSTEM_NAME MATCHES "Windows") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Maintainer: Ethan Leir <eleir@qnx.com> | ||
| pkgname=xnnpack | ||
| _pkgname=XNNPACK | ||
| pkgver=1.0.0_git20251226 | ||
| _pkgver=25b42dfddb0ee22170d73ff0d4b333ea1e6edfeb | ||
| pkgrel=0 | ||
| _pthreadpool_ver=0e6ca13779b57d397a5ba6bfdcaa8a275bc8ea2e | ||
| pkgdesc="Efficient neural network inference accelerator for ARM, x86, WebAssembly, and RISC-V platforms" | ||
| url="https://github.com/google/XNNPACK" | ||
| arch="all" | ||
| license="BSD-3-Clause" | ||
| depends="cpuinfo pthreadpool" | ||
| makedepends=" | ||
| cmake | ||
| ninja | ||
| clang | ||
| libc++-dev | ||
| " | ||
| subpackages="$pkgname-dev" | ||
| _cpuinfo_git_rev=0 | ||
| source="${pkgname}-${pkgver}.zip::https://github.com/google/${_pkgname}/archive/${_pkgver}.zip | ||
| https://github.com/qnx-ports/cpuinfo/archive/refs/tags/qnx-tflite-r$_cpuinfo_git_rev.tar.gz | ||
| https://github.com/google/pthreadpool/archive/$_pthreadpool_ver.zip | ||
| 001-system-name.patch | ||
| cpuinfo_patch | ||
| pthreadpool_patch | ||
eleir9268 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| " | ||
| builddir="${srcdir}/${_pkgname}-${_pkgver}" | ||
| _cpuinfo_builddir="${srcdir}/cpuinfo-qnx-tflite-r${_cpuinfo_git_rev}" | ||
| _pthreadpool_builddir="${srcdir}/pthreadpool-${_pthreadpool_ver}" | ||
|
|
||
| options="!check" # Enabling check stalls cmake. | ||
|
|
||
| unpack() { | ||
| default_unpack | ||
|
|
||
| # Workaround for busybox bug. | ||
| cd $srcdir | ||
| for u in $source; do | ||
| local s | ||
| if is_remote "$u"; then | ||
| s="$SRCDEST/$(filename_from_uri $u)" | ||
| else | ||
| s="$startdir/$u" | ||
| fi | ||
| case "$s" in | ||
| *.zip) | ||
| msg "Unpacking $s..." | ||
| unzip -n -q "$s";; | ||
| esac | ||
| done | ||
| } | ||
|
|
||
| prepare() { | ||
| default_prepare | ||
|
|
||
| (cd $_cpuinfo_builddir && patch ${patch_args:--p1} -i "$srcdir/cpuinfo_patch") | ||
| (cd $_pthreadpool_builddir && patch ${patch_args:--p1} -i "$srcdir/pthreadpool_patch") | ||
| } | ||
|
|
||
| build() { | ||
| CC=clang \ | ||
| CXX=clang++ \ | ||
| cmake3.5 -B build -G Ninja \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_INSTALL_PREFIX=/usr \ | ||
| -DBUILD_SHARED_LIBS=ON \ | ||
| -DXNNPACK_BUILD_TESTS=OFF \ | ||
| -DXNNPACK_BUILD_BENCHMARKS=OFF \ | ||
| -DCPUINFO_SOURCE_DIR=$_cpuinfo_builddir \ | ||
| -DPTHREADPOOL_SOURCE_DIR=$_pthreadpool_builddir | ||
| cmake3.5 --build build | ||
| } | ||
|
|
||
| check() { | ||
| ctest3.5 --test-dir build | ||
| } | ||
|
|
||
| package() { | ||
| DESTDIR="$pkgdir" cmake3.5 --install build | ||
| } | ||
|
|
||
| sha512sums=" | ||
| ad7bad6bcae85e9772ebbc1b6d0ba0bf56064419ffca026ac3af736ab3a2d2191d455cb90f974931cec3ed6e189168a0af79454a340df8bc00a15d92c235a3dd xnnpack-1.0.0_git20251226.zip | ||
| ba8d913a97c7c31a2778b110ebc147a1da74e4d57babcbef206178572459d25c34f808c04dc7fc163cb050117ea1a5512ae5003ae719f837bc5499f70ff46429 qnx-tflite-r0.tar.gz | ||
| db93e3fb726a2fe7a50e3f019e432c317958c9ccc0ef4a5cfdccd412e6ea6433b73cae3c0a511007524533f0ff795f84812fc86648957770c4d33fd77f378e0a 0e6ca13779b57d397a5ba6bfdcaa8a275bc8ea2e.zip | ||
| 2f08d60e762786587e2f933e373d2d4ce2bae1b4b5b596df753c2380d59d887c77464cb53a96a11d29e25324346c8a03efd85dac862756662117273cfe65627d 001-system-name.patch | ||
| 8bf1a384d89dbdd1de5aa672c57395044e0391015267146d5cb9dede4601ae4550baba4c66f509ee632dcfd717401993a4fbd2b9c40f40d5e46e51b8e10276ae cpuinfo_patch | ||
| 9e9d146e3c5787cdd97cdaed1246b13ccae7b1479794ba21e6a24c05d8227ecaa0ff9d228a33afe009e48ab96af88996f9b56ea147807aeae65bbc3b5715ec96 pthreadpool_patch | ||
| " | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.