From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 +AY1DVLH6GUW9AAA62LTzQ:P1 (envelope-from ) for ; Wed, 06 Mar 2024 20:43:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id +AY1DVLH6GUW9AAA62LTzQ (envelope-from ) for ; Wed, 06 Mar 2024 20:43:14 +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=ormTPkXC; 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=1709754194; a=rsa-sha256; cv=none; b=QCAgqzzFKQFwawh9NcTSkyIxx9F23AWsd3awEYAukELjm8IcvN20XRtwVYjmGsTFL9ZkO9 RHzdrUwBBCzDlhY1VkUDpv8g80wrFlCtH8Npue8TtHMLOyJzRKUS2xxsBYwAhgMswk83CL nunw/Of8Q+XunivarEUp1ArSqLJ+ArDb0/O1pt8d+N2ltq7YiomM/uejn1kuIedXUb9bfo sjzK0VY/aPiAKK1Hp/7TeLXqkSDFTlxUFFrHd0yAKqQFo3UOkpf5Yx8r8/7zICcOSZtpAl Nw491a+eMhBxLmWF5ehQm1WFIUILTsXVKgw7ChnsEZyg2e4Q/7jWC9BqVpSJWw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=ormTPkXC; 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=1709754194; 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=hWVDeY7rI+cXvPKMzt1dW0JaFA5DkLBYIf2sBXi7O54=; b=fxAHMQOZdp7AheXHuiBrBGuFwKoMUH9jUksaS3z7FbC7R2hCdhDOopwH2AmI9xpNTmVu0n Rnsb9oAo3JEc3KtMlXPQTUGUvO0vXTKSoDyzDNb9bq1/9VrjJzy5KJhZClbaHsVC7ra+HH Zq9niUOyPSjrX9Jd+RyYf9KhYomDniKTROEPjkroOqY+qTg5Nwe6vjh5xaTJ1sBxsf6p7V //IqofB9LFPFj6FQKi/583rvcYupjiy4D4IHGezXfSrVmsn1zf2UjKLHoBzHWnzh/iych5 2CJy4wNAtgJAVh7d/GHRjEBB4ZET4vy3gdZ7Yy8kdgdyO0Vp1OxiUTNW3QQvZA== 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 F16EF27AC1 for ; Wed, 6 Mar 2024 20:43:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhxA2-0002eh-3B; Wed, 06 Mar 2024 14:42:42 -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 1rhx9x-0002Xp-BJ for guix-patches@gnu.org; Wed, 06 Mar 2024 14:42:37 -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 1rhx9x-0006Tq-2L for guix-patches@gnu.org; Wed, 06 Mar 2024 14:42:37 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rhxAR-0008KM-0b for guix-patches@gnu.org; Wed, 06 Mar 2024 14:43:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69591] [PATCH 21/31] gnu: Add foxi. 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.170975415431840 (code B ref 69591); Wed, 06 Mar 2024 19:43:06 +0000 Received: (at 69591) by debbugs.gnu.org; 6 Mar 2024 19:42:34 +0000 Received: from localhost ([127.0.0.1]:51579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx9q-0008HK-BP for submit@debbugs.gnu.org; Wed, 06 Mar 2024 14:42:33 -0500 Received: from mout02.posteo.de ([185.67.36.66]:56743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rhx94-0008Ax-VM for 69591@debbugs.gnu.org; Wed, 06 Mar 2024 14:41:46 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 58FC3240104 for <69591@debbugs.gnu.org>; Wed, 6 Mar 2024 20:41:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1709754066; bh=N6+5RGf5GvicUL1q0VxXPMuZ1Cf8cJERB05lMmoCt2M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=ormTPkXCB5CSzqDqVu/kNpmzKM8bDGUjdnO/nEAPJnZFcge/54gTQqf0XlgCyML1E jICyZiKWVemaW3pj8WGwlahXmWLzOGZL+XzH0DFtKOin5XQ7wTcKj+kDXNBVl3qUOZ 9Au1d9xvFDgkzoj/X5sjjtkzItZSuvgACh3U+OywKu3Bx1IWhkshLxcMztUqhTvid0 boA2cMr2Wf6cs86m8KozRQic5yTbOuqfCAh09vtdMTig6z1F3ZfcIDlzEfPMDnFf/g /y4Iz/s6TQav2p13qPoR7wxffyp9JUXZCVHZUNwoGHB2bg+/CJGbIiIf0PbRIc4pnd hv6JLxQGE8PuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TqjTt0BWSz6tvk; Wed, 6 Mar 2024 20:41:06 +0100 (CET) From: David Elsing Date: Wed, 6 Mar 2024 19:40:27 +0000 Message-ID: <20240306194037.17992-21-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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: 5.52 X-Spam-Score: 5.52 X-Migadu-Queue-Id: F16EF27AC1 X-TUID: ftxikYP8x/1N * 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 f81ea13031..c88c21ac60 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1204,6 +1204,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 c883af54d9..5c21e4ed46 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4215,6 +4215,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