From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AE+ONpZS/2UHogAAqHPOHw:P1 (envelope-from ) for ; Sat, 23 Mar 2024 23:07:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AE+ONpZS/2UHogAAqHPOHw (envelope-from ) for ; Sat, 23 Mar 2024 23:07:18 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=TqhS1HeP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711231638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mbkYU+YETy5B2pr21Ew/nc6rxtqxpueYacvoTLFefKI=; b=IVL4icEgttc1OrpF6/MYlZiVidu8+zmDsqKxJk8fqpI7dX81eR0J5I3Ysxaxge4jlXYwYh fQ2rjibjV5NFxkT1JM3QnjdiocIdyBQ1J4I122OoccN1wy7qFghlmZQqaDrnSuNTj8LtLd yJ1CXMRwtv1O2D5tiRpvoJ3lXfdyTdlGERuV5gZP3HX8Qn7bE0siHk6Kb3/PrDnYDU2Jq7 Bs6V6zH4hwGYoKXO1rdClst1kGYHJmvZqYeOB0ZWD6ST61pP5lAxykvqlW9TiH9Y0Fv55S hdby4PaxtjhJfdsGNWS8y4odPkAlbs+3d847Kjhxcml2VuK99lJuxgbVQDiALA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=TqhS1HeP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711231638; a=rsa-sha256; cv=none; b=bl3r3L+EVLcmVyfdl1VjdqXs7+oI5SjWb6RUnx4uW3/5hYH1vuLlMBQtyftgKyWCKsUeRo Y4zGxh9aWO0b6MbnWT8nra5cK5diYOeqqu17x8gEVJ8KZiLtZgQ6kvVzrW4muNRtoMouvZ tMpMoIer0yY8j3a6LCr4bUO/eRljBoxiddPMid8a9egDcooxB6ll8g3buKfFYKvU9wNBee 3RZDHAOmgUJMk6XID5wd5hBEh0PM51ZJwRtZT4x9autLNQ4BqH6tCxW/FrK0WvWeYJYUbY hZ1UDbqjFPxr+mjtd5dD4Qi99tV9Xrby33Bpf+91WGES9VB69/Q9xHENkhlgtA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C676B643B8 for ; Sat, 23 Mar 2024 23:07:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ro9VP-0004zw-0f; Sat, 23 Mar 2024 18:06:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ro9VN-0004zN-Ot for guix-patches@gnu.org; Sat, 23 Mar 2024 18:06:21 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ro9VN-00080R-FH for guix-patches@gnu.org; Sat, 23 Mar 2024 18:06:21 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ro9W2-0006Sa-CQ for guix-patches@gnu.org; Sat, 23 Mar 2024 18:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH v4 20/32] gnu: Add qnnpack. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Mar 2024 22:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69591@debbugs.gnu.org Cc: David Elsing Received: via spool by 69591-submit@debbugs.gnu.org id=B69591.171123160824718 (code B ref 69591); Sat, 23 Mar 2024 22:07:02 +0000 Received: (at 69591) by debbugs.gnu.org; 23 Mar 2024 22:06:48 +0000 Received: from localhost ([127.0.0.1]:56599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro9Vn-0006Qa-Up for submit@debbugs.gnu.org; Sat, 23 Mar 2024 18:06:48 -0400 Received: from mout01.posteo.de ([185.67.36.65]:59383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ro9VK-0006OG-9v for 69591@debbugs.gnu.org; Sat, 23 Mar 2024 18:06:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2AAF4240027 for <69591@debbugs.gnu.org>; Sat, 23 Mar 2024 23:05:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711231531; bh=QiEzD738lWfdCm+SPzHfc+nN1CKd9ubVIYMCv9vAJ34=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=TqhS1HeP6KasN3HJMmkMLf5LnjZusbDeOKM6lhnVZ8VSe7IsZ5bUT9tloSj9Cz75c 7sdadk5QQTxNbeVyuVMlNGnAhtH/Ep1/aknak1F/OfEfgeUzLONDaaj+GLlGD1QpDY uQ976Ipf0TaJPLZACz3RAilB9C4dB1yJP8VgYyZVhJG7JdOuRJSQBk9IZnCusyFpoD Df2b2ehaE8qByhmskpMf3Ccm9yddbcI5s+LGE+wLz79M/rYcrVZCzj8DfmUl8h0hgc ZqtmWB3oRkoAY8nNx5kHmIF6LPa0P9/jU49opZu5a+Jdg0AsTEutkOmjkFOBkDN0ze H5YduDD7ssgvg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V2Ctf60snz6tx0; Sat, 23 Mar 2024 23:05:30 +0100 (CET) From: David Elsing Date: Sat, 23 Mar 2024 22:04:59 +0000 Message-ID: <20240323220518.25063-20-david.elsing@posteo.net> In-Reply-To: <20240323214040.20221-1-david.elsing@posteo.net> References: <20240323214040.20221-1-david.elsing@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 3.97 X-Migadu-Queue-Id: C676B643B8 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 3.97 X-TUID: IEgPWNTJiW/z * gnu/packages/machine-learning.scm (qnnpack): New variable. --- gnu/packages/machine-learning.scm | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index b478723939..1872ca9d30 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4018,6 +4018,57 @@ (define-public nnpack (supported-systems '("x86_64-linux" "armhf-linux" "aarch64-linux")) (license license:bsd-2)))) +(define-public qnnpack + (let ((commit "7d2a4e9931a82adc3814275b6219a03e24e36b4c") + (revision "0")) + (package + (name "qnnpack") + (version (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pytorch/qnnpack") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1dgzriiaz9arsrfwhx42y4l74wbzn6xvdmllfb66v4pmvi5gpxc5")) + (modules '((guix build utils))) + (snippet + '(delete-file-recursively "deps")))) + (build-system cmake-build-system) + (arguments + (list + ;; The shared library build fails with linker errors, so we build the + ;; static library with -fPIC as in the bundled PyTorch version. + #:configure-flags + ''("-DQNNPACK_LIBRARY_TYPE=static" + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-cmake + (lambda _ + (substitute* "CMakeLists.txt" + (("IF.*SOURCE_DIR.*") + "IF(FALSE)\n") + (("IF\\(NOT TARGET.*") + "IF(FALSE)\n") + (("TARGET_LINK_LIBRARIES.*(fxdiv|psimd|fp16)\\).*") + "") + (("(TARGET_LINK_LIBRARIES.*) fp16 (.*)" _ before after) + (string-append before " " after)))))))) + (inputs (list clog cpuinfo fp16 fxdiv psimd pthreadpool)) + (native-inputs (list googletest googlebenchmark)) + (home-page "https://github.com/pytorch/qnnpack") + (synopsis "Quantized Neural Network PACKage") + (description "QNNPACK is a library for low-precision neural network +inference. It contains the implementation of common neural network operators +on quantized 8-bit tensors.") + (supported-systems + '("armv7-linux" "aarch64-linux" "i686-linux" "x86_64-linux")) + (license license:bsd-3)))) + (define-public xnnpack ;; There's currently no tag on this repo. (let ((version "0.0") -- 2.41.0