From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 6JKhOG/j8GXkhgAAe85BDQ:P1 (envelope-from ) for ; Wed, 13 Mar 2024 00:21:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6JKhOG/j8GXkhgAAe85BDQ (envelope-from ) for ; Wed, 13 Mar 2024 00:21:20 +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=XGEty6Au; 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=1710285679; 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=SJPViBVHn0dvy5w+oPvzquhHltnM4HYDwsaPEN7kc84=; b=tKVACQQFK+3qSF5T5FtYkTyRUIvkNenUKn5w7o7qXcJgcxdC3vcTsAVhuWE79+/6GoF9Zv NMxjfH4HOJRnI6pNt/s+R1r8wMifGMmT8/IoHNd00kXlIHhCELjJtg5IFPalmlrZHQNXOi geT7YBB4XKxdFZKN90PEpiFfqsv5Odzkot/+19CjOflI+n9HiJFeVRNPLuJL0BYYee52rm yhr9AVrSmiGEZZohDrR++/1lm4mKoI0OCNRPm3sUfwJXgtPLuDRbrZnfzy+ucdggktG+QY b1i4E6FehWlM8eSFM3dUnMR3D/j/K3KsHPlvdK6jmeEgZ8izmmwIkePzHWe48w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=XGEty6Au; 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=1710285679; a=rsa-sha256; cv=none; b=D1IdvY8h2aD2A1+kNWYd8lt8hZ5oLvHzPkZAlmH5BT4xWGy4Al4KFUL4Hfc/l2sFOQQJ6L lQAjdWpflk8iZuT2JPhBY33Ah8dHqVAR2YsVRZP+vSxCQQapAwWsCziiS7SUkOaJJYSlJB FLNDqILuCypl8IWzntLh6Nx8jlDQeS6kGbTtPAn7cxJb+Qv83+6qsykc5+a9sjtU7dC8Ew nojvExXxx+ljccCrtVcmOPRGL7m6si8bQ4pfJxR9joSpTdAlI0AmTYxBvJkXsGNLMSokZm y/0VMBWet1sQ0ujOJM7PxwfuIilqn7DCqyr2MVKtDizysjc55d6fj4X7/7ZvqQ== 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 AF1E5118E4 for ; Wed, 13 Mar 2024 00:21:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkB12-00016M-AN; Tue, 12 Mar 2024 18:54:36 -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 1rkB06-0000Bz-Aa for guix-patches@gnu.org; Tue, 12 Mar 2024 18:53:40 -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 1rkB06-0000MD-2T for guix-patches@gnu.org; Tue, 12 Mar 2024 18:53:38 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rkB0e-0001oJ-Ht for guix-patches@gnu.org; Tue, 12 Mar 2024 18:54:12 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH v2 21/31] gnu: Add foxi. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 Mar 2024 22:54:12 +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.17102840236714 (code B ref 69591); Tue, 12 Mar 2024 22:54:12 +0000 Received: (at 69591) by debbugs.gnu.org; 12 Mar 2024 22:53:43 +0000 Received: from localhost ([127.0.0.1]:44105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkB0A-0001k7-RE for submit@debbugs.gnu.org; Tue, 12 Mar 2024 18:53:43 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rkAzk-0001f9-MU for 69591@debbugs.gnu.org; Tue, 12 Mar 2024 18:53:18 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E2364240027 for <69591@debbugs.gnu.org>; Tue, 12 Mar 2024 23:52:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710283955; bh=D2xDE3fvHA89RG8xWffkjVHH4IaRKoGLnletuEWQFgk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=XGEty6Au19jN/FH273byBUqPbT9iTDhajcf9WKoGx0wBnk1AknAId/djRe4E2pwjD r5OPm5iRJ1pAGlj6I3WXsDANCe+C5SuAlrlp7lR+Qaa0SXEDEdK7pnu8A3zBMHGdjC yMrHA/FXjERfqBO2azdq8XOFDYuDr6j6ppyuMsUegMAoKm9vpbDSTvq2qfyihFzDzf 79VbzfEBnhBu5GS8W/y+vKRvy+EoCr0Djn8PXEv8TR3JlgxMQWQAKldBrNitKqgwix eFD5KSK53rcP7gbT5pMehhn4G5iKRk9lisBMe66bnUN63FJNA5koYeil9ZRSaSQj7R A0ovEcDnksAIQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TvTS33sMSz6tvr; Tue, 12 Mar 2024 23:52:35 +0100 (CET) From: David Elsing Date: Tue, 12 Mar 2024 22:51:49 +0000 Message-ID: <20240312225211.16427-21-david.elsing@posteo.net> In-Reply-To: <20240312224712.15578-1-david.elsing@posteo.net> References: <20240312224712.15578-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-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 4.01 X-Spam-Score: 4.01 X-Migadu-Queue-Id: AF1E5118E4 X-TUID: ojHrhtyhFeuC * 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 2f685e2f7d..becd39a58d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1206,6 +1206,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 bc1aa308a9..759eb7f66f 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4216,6 +4216,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