From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id AHFhBTPH6GUkSQAA62LTzQ:P1 (envelope-from ) for ; Wed, 06 Mar 2024 20:42:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AHFhBTPH6GUkSQAA62LTzQ (envelope-from ) for ; Wed, 06 Mar 2024 20:42:43 +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=QOa4wUUH; 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=1709754163; 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=MCgfMKA8cAnv814CSafeV13BM0U0CRM2+AyQXE38IQA=; b=TuBnIxQY5g+D/GJHJJtGDCNWT+ql7GxRXGljUznFbjZzwegvvmYkynmUNxFZuOKrztcWvk MQnHXKausCqGZ1E2XfSR9f+JVoFFXMH+zeiO4q2Sq4o7ukvMDt7bNl2Mv+iGq84WN8X+gJ g+eGNniZCvbZwSPmw3bunl141m4hlO0br3+oCCx7pnngZfIf6ZEy9RXWGmUCI4P/mLXblM S6pxNrBSqv0QEnfnQlE2jQMElr/VIRioEfd1Tl2tFmxM5EbJa7dJBWW/gjEQQD3UYephf1 3p4opBr3ib0BWXyJ88TiZjwI98jrEN7tpfjlbEZJZGsL6406nZYwkaA/ZsSnAA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709754163; a=rsa-sha256; cv=none; b=rumoN1/z6lNXVp+I6neVS18A5kMQTBR1ynk/LHcssnBAv0b1G6Nlqvx+u/uupS8WNcii6o GViw8mxZdb6nRwHTd5Jtk1E6db+43fEKq+hFGht3cLXtPjgzlNFQ1EUV4MijExQCgWuvwH e1pMvGhTE3j1N0KoMo1j8AQCfjmeTpbd5Bqh1f40vLk2TSWq2DH9REP8laMOgN1gZQnBnO h1t6EnznyXb7WNBM7qFbS4iNVUzMsE3hWNmU97zAbIwWp7Tv+fIF/pKVQQzQDMyhDXiOW0 0zjf1hCZ81tXBtAJGLRQqoZDVwcv5Hj01KxcZZwsvLMU4XWY+R1CsD8Un9avfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=QOa4wUUH; 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) 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 E96C46EBB3 for ; Wed, 6 Mar 2024 20:42:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhx9x-0002XV-5p; Wed, 06 Mar 2024 14:42:37 -0500 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 1rhx9w-0002VJ-3b for guix-patches@gnu.org; Wed, 06 Mar 2024 14:42:36 -0500 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 1rhx9v-0006TF-LU for guix-patches@gnu.org; Wed, 06 Mar 2024 14:42:35 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhxAQ-0008KF-JK for guix-patches@gnu.org; Wed, 06 Mar 2024 14:43:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH 20/31] gnu: Add qnnpack. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Mar 2024 19:43:06 +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.170975415031828 (code B ref 69591); Wed, 06 Mar 2024 19:43:06 +0000 Received: (at 69591) by debbugs.gnu.org; 6 Mar 2024 19:42:30 +0000 Received: from localhost ([127.0.0.1]:51577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx9o-0008HE-G7 for submit@debbugs.gnu.org; Wed, 06 Mar 2024 14:42:30 -0500 Received: from mout02.posteo.de ([185.67.36.66]:50447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx94-0008Ar-Hy for 69591@debbugs.gnu.org; Wed, 06 Mar 2024 14:41:45 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E49BF240105 for <69591@debbugs.gnu.org>; Wed, 6 Mar 2024 20:41:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709754065; bh=5IGdkFKt71YUpvt65pGqiprIwp4EQF9iMQ9U5dR3yuc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=QOa4wUUHzKb1g7rwEGUdi8R4LmDZczwNnKsnsqEnrFXL8xaRW0xhj9cscs5fb7zXU r5jzC06DYzAgao4QEPzvjuQ+NdgrOjE9ReVheLZ3Pd/Xq8rAH8rB4/Q4BQEfJ7edcQ 8eazjokJtIKHM6wyc7jwiVUuXf5CCeDM89ULlS92zLLzxQMdK6/GES0VNTqEepzjeg sHxDBk1wNH1oBd+vSxbpIKOtlYnnsYAxjJC40bG0DDxVIP8ie5nRmkmN+lJLff587s kxm4ULn173mUhloApZlV12sP3oHrsIgG9TP4vKjHUw1729qfUL1RvDjx3Y7s586I3u +2HHvgiRnknrg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TqjTs0sKTz6twD; Wed, 6 Mar 2024 20:41:05 +0100 (CET) From: David Elsing Date: Wed, 6 Mar 2024 19:40:26 +0000 Message-ID: <20240306194037.17992-20-david.elsing@posteo.net> In-Reply-To: <20240306193725.17463-1-david.elsing@posteo.net> References: <20240306193725.17463-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -2.37 X-Spam-Score: -2.37 X-Migadu-Queue-Id: E96C46EBB3 X-Migadu-Scanner: mx11.migadu.com X-TUID: TIHpocRzY8IZ * gnu/packages/machine-learning.scm (qnnpack): New variable. --- gnu/packages/machine-learning.scm | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 5825955d3e..c883af54d9 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4024,6 +4024,55 @@ (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.") + (license license:bsd-3)))) + (define-public xnnpack ;; There's currently no tag on this repo. (let ((version "0.0") -- 2.41.0