From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id qDIKEYtw+2UxKAEAqHPOHw:P1 (envelope-from ) for ; Thu, 21 Mar 2024 00:26:03 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id qDIKEYtw+2UxKAEAqHPOHw (envelope-from ) for ; Thu, 21 Mar 2024 00:26:03 +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="I/Ydqfv+"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710977163; a=rsa-sha256; cv=none; b=g/Fd17xyBjdnmkNymeNtUJMq/Xql3R4/H/uXgedxjIInPxNmp7CRS5ge2Fb7wMyIEDzr1+ 1KAIwpMoRWr/W1vNfjf3/Ua8PGeSTI6Yim7fJtCXi2wUMkes6QdJJEYnfCQLM55jHSpW6M i5qeely5RSRZmyP4UE9wmyHwNdu0EWrAhWSE4x6UD1duOfkucrIGkgLqzA/M4ZVP6o+G73 2WDrEkZEn7cEhjJMdjllIe1cS6f8YmVeYxbCn0vgSrb2uipAyaEth33I/8b6Rx2EFvLsz/ w26pV0qcnvuln2gEcl8JhF6jNvtUoAYk1chtAhzw73BGl3WKGAmHxD92U1moTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b="I/Ydqfv+"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710977163; 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=si40xJP7wlHvtBE8DncKCAbCxULPwQHoUWTQFZGGXeo=; b=q+/4RGAuLssiK98EsnHKZgGK+KY2F4P20W2HqyT7+AYQanqALmklwhPa+FnwVkwsUqaClR 7tp8Tf+JMWhCJJ18OoolJ3fXT36svMkc1LkYHa2LdJHWLn5UKUxwkfaVdqn9H7BQWfjAqQ UDaKjc0OUwnP/yl+Y0l8BJ/FNa9zqJ+mZBThOf9cFcjyahIYavD0vvVng17+hJG1H1nahB YjHYCJCKaGiW7x4NlXt2PrlV0I/CzdtWOzDxj22dYqtUz9VMwnrLwmbmSqhQH9YNelxPol OwbiqFkbgLi53PZGkvFnDyu4lr71TZWfaIXQpq7waeec6+zDEOqFNT7YymOPHQ== 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 09D4026884 for ; Thu, 21 Mar 2024 00:26:03 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rn4c1-00063S-Df; Wed, 20 Mar 2024 18:40:45 -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 1rn4bq-0005yz-Fr for guix-patches@gnu.org; Wed, 20 Mar 2024 18:40:34 -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 1rn4bq-0007dg-6L for guix-patches@gnu.org; Wed, 20 Mar 2024 18:40:34 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rn4cT-0006F8-Nu for guix-patches@gnu.org; Wed, 20 Mar 2024 18:41:13 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH v3 21/32] gnu: Add foxi. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 20 Mar 2024 22:41:13 +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.171097444623756 (code B ref 69591); Wed, 20 Mar 2024 22:41:13 +0000 Received: (at 69591) by debbugs.gnu.org; 20 Mar 2024 22:40:46 +0000 Received: from localhost ([127.0.0.1]:36835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn4br-0006Al-Fd for submit@debbugs.gnu.org; Wed, 20 Mar 2024 18:40:45 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rn4bQ-00064B-7m for 69591@debbugs.gnu.org; Wed, 20 Mar 2024 18:40:12 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3B4A1240101 for <69591@debbugs.gnu.org>; Wed, 20 Mar 2024 23:39:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710974362; bh=wQ0MUKafFYW3prWhQuKPptd0mWpW/0mnqunoxezejAg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=I/Ydqfv+fxOJL3DQDKT5kRB5gnqSi/6EZVl0wRsimQ1fhZ1qUP1va1UiGc/s7K7uo QU5T7vXyrguT9mRWod+S0ea5Gky5uNcxZjHxHYL1mvcN/11Dn9rfyMxMW5/N5TBuJt KbHmne4JB6IxRw9D0PjXVpdxZ4rctk/o+xCCBJG9Cbb/DMtS5wLESgCI0nKenn3AcG QlUGg33Zmqwt5r3iZn3mZGg2NO2QwIAh1RD7oVppkszfLD47YAtUpzhN36DimkcMWI 43RcKHAe3J0OSaPV4mfbLXUayQfyq9hXl+oK62TGC/J/A5MhuwyJhrYKXPA+OCaTBs peCAI4VcSL0HQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V0Nn56d69z6tn4; Wed, 20 Mar 2024 23:39:21 +0100 (CET) From: David Elsing Date: Wed, 20 Mar 2024 22:38:46 +0000 Message-ID: <20240320223906.13214-21-david.elsing@posteo.net> In-Reply-To: <20240320223737.12883-1-david.elsing@posteo.net> References: <20240320223737.12883-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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -3.92 X-Spam-Score: -3.92 X-Migadu-Queue-Id: 09D4026884 X-TUID: viPdzXoy0DuX * gnu/packages/machine-learning.scm (foxi): New variable. * gnu/packages/patches/foxi-fix-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/machine-learning.scm | 29 ++++++++++++ gnu/packages/patches/foxi-fix-build.patch | 55 +++++++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 gnu/packages/patches/foxi-fix-build.patch diff --git a/gnu/local.mk b/gnu/local.mk index e0fa9e1f78..15d9d50de7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1207,6 +1207,7 @@ dist_patch_DATA = \ %D%/packages/patches/foobillard++-pkg-config.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch \ %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch \ + %D%/packages/patches/foxi-fix-build.patch \ %D%/packages/patches/fp16-implicit-double.patch \ %D%/packages/patches/fp16-system-libraries.patch \ %D%/packages/patches/fpc-reproducibility.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index ade2291d2f..f4f16f0bea 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4214,6 +4214,35 @@ (define-public tensorpipe the tensors contained therein.") (license license:bsd-3)))) +(define-public foxi + (let + ((commit "c278588e34e535f0bb8f00df3880d26928038cad") + (revision "0")) + (package + (name "foxi") + (version (git-version "1.4.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/houseroad/foxi") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q3ssm5hmmvwfwx87mnnajbavzgpahybw6rpn8ysr9r095dwgq5a")) + (patches (search-patches "foxi-fix-build.patch")))) + (build-system cmake-build-system) + (arguments + (list + ;; No tests + #:tests? #f)) + (home-page "https://github.com/houseroad/foxi") + (synopsis "ONNXIFI with Facebook Extension") + (description "ONNX Interface for Framework Integration is a cross-platform +API for loading and executing ONNX graphs on optimized backends. This package +contains facebook extensions and is used by PyTorch.") + (license license:expat)))) + ;; Please also update python-torchvision when updating this package. (define-public python-pytorch (package diff --git a/gnu/packages/patches/foxi-fix-build.patch b/gnu/packages/patches/foxi-fix-build.patch new file mode 100644 index 0000000000..d82090ad38 --- /dev/null +++ b/gnu/packages/patches/foxi-fix-build.patch @@ -0,0 +1,55 @@ +Taken from https://github.com/houseroad/foxi/pull/25. + +diff --git a/foxi/onnxifi_dummy.c b/foxi/onnxifi_dummy.c +index 2115af9..73e25fc 100644 +--- a/foxi/onnxifi_dummy.c ++++ b/foxi/onnxifi_dummy.c +@@ -103,7 +103,10 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI onnxInitGraph( + const void* onnxModel, + uint32_t weightCount, + const onnxTensorDescriptorV1* weightDescriptors, +- onnxGraph* graph) { ++ onnxGraph* graph, ++ uint32_t maxSeqLength, ++ void* deferredWeightReader) { ++ + if (graph == NULL) { + return ONNXIFI_STATUS_INVALID_POINTER; + } +@@ -215,6 +218,8 @@ ONNXIFI_PUBLIC ONNXIFI_CHECK_RESULT onnxStatus ONNXIFI_ABI + onnxWaitEventFor(onnxEvent event, + uint32_t timeoutMs, + onnxEventState* eventState, +- onnxStatus* eventStatus) { ++ onnxStatus* eventStatus, ++ char* message, ++ size_t* messageLength) { + return ONNXIFI_STATUS_SUCCESS; + } +\ No newline at end of file +diff --git a/foxi/onnxifi_wrapper.c b/foxi/onnxifi_wrapper.c +index 98a9325..abe1440 100644 +--- a/foxi/onnxifi_wrapper.c ++++ b/foxi/onnxifi_wrapper.c +@@ -761,7 +761,9 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph( + const void* onnxModel, + uint32_t weightsCount, + const onnxTensorDescriptorV1* weightDescriptors, +- onnxGraph* graph) ++ onnxGraph* graph, ++ uint32_t maxSeqLength, ++ void* deferredWeightReader) + { + if (graph == NULL) { + return ONNXIFI_STATUS_INVALID_POINTER; +@@ -797,7 +799,9 @@ ONNXIFI_PUBLIC onnxStatus ONNXIFI_ABI onnxInitGraph( + onnxModel, + weightsCount, + weightDescriptors, +- &graph_wrapper->graph); ++ &graph_wrapper->graph, ++ maxSeqLength, ++ deferredWeightReader); + switch (status) { + case ONNXIFI_STATUS_SUCCESS: + case ONNXIFI_STATUS_FALLBACK: -- 2.41.0