From patchwork Mon Mar 2 14:58:45 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pratham Deshmukh X-Patchwork-Id: 82267 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B8EEEA4E16 for ; Mon, 2 Mar 2026 14:59:26 +0000 (UTC) Received: from BL0PR03CU003.outbound.protection.outlook.com (BL0PR03CU003.outbound.protection.outlook.com [52.101.53.23]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.162281.1772463555692933658 for ; Mon, 02 Mar 2026 06:59:16 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ti.com header.s=selector1 header.b=askeFYHo; spf=permerror, err=parse error for token &{10 18 spf.protection.outlook.com}: limit exceeded (domain: ti.com, ip: 52.101.53.23, mailfrom: p-deshmukh@ti.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Njdt7/TJa1MkjjjCuqbDBbPkmIA9XgsARClr9N72610+cwnQNogFuvlrQX/XD2oHxrBk4eQPgVjOtM24DacDeTTiAEn1os2a2hAXlx9Bez0gzWFmDqcNOOMnBD+TIpNn1wFcusoIYdWRmQavis4qaACtPpS1KKIMnDkHug2kd9kZpRhFx8iM8El/SugxHvX1enY/0yCUaKOtWOMIjrKcyxdHE/xLmi0DOjLsKq4GrKRQp+OoD/5gio0Pe0hDHNGMHOQwBNSdAoXomeSKb4NeMICYu9ZiAsfsaSrG71lfC361s1ZnCiK0MSi0K4v79+1vbB3jOViClFdrquBaj7XjHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/mooJBY5CbHbVWWEoEFWj+B3WXvqxcISzBvlbj5b5y0=; b=fvJkFmowJngAz5h8Y+sNwpAUs5ZMlQu25XOO1pGh8i7VVtJDcLVHAaAHIdp8mQfKeB+dz7opTgf+57bHTfVImZ/DuIH59OgFeFKJDZ4uRaevHrzug0IltTonn+Xr/ZHJ7Uyp/XT4HJtwdDueNbPdOs0F67bTkLay4ksUpTgjtVTuXl8zaiEoLrc44c7xSjEVuA/gKZrcBBVpuJ3RLg1r8qgndlMt3MvsLGAuAUsVPr4LJVOeTd1m0T22Ursxq5PA3lFPQP7bimnDjTbgMUyj6txY8gyvu5r56Vs1xj//mKcU9ouJ3dd58S4L52gxO/apNv0Trf9IHqYcrA5V/wnULw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.21.194) smtp.rcpttodomain=konsulko.com smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/mooJBY5CbHbVWWEoEFWj+B3WXvqxcISzBvlbj5b5y0=; b=askeFYHoN0a3FQfpoIZJ111Z4DBORIZP8WhENTWhEDEwmu+0QtBdIQ+2hioJqPVJwb1/0jqxli2w8OnVgYr0CeLHiP5o4XHS56mRsp7ltZGIt9tlUnVKaiSZaGkYCZvJrLn10MEISUFq8cMuYUTlJrqnfgLt6s6p2Bpeasb2n8U= Received: from BN0PR03CA0058.namprd03.prod.outlook.com (2603:10b6:408:e7::33) by CY5PR10MB6022.namprd10.prod.outlook.com (2603:10b6:930:3e::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.20; Mon, 2 Mar 2026 14:59:12 +0000 Received: from BN2PEPF000044A1.namprd02.prod.outlook.com (2603:10b6:408:e7:cafe::35) by BN0PR03CA0058.outlook.office365.com (2603:10b6:408:e7::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.21 via Frontend Transport; Mon, 2 Mar 2026 14:58:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.21.194) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.21.194 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.21.194; helo=flwvzet200.ext.ti.com; pr=C Received: from flwvzet200.ext.ti.com (198.47.21.194) by BN2PEPF000044A1.mail.protection.outlook.com (10.167.243.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.16 via Frontend Transport; Mon, 2 Mar 2026 14:59:08 +0000 Received: from DFLE204.ent.ti.com (10.64.6.62) by flwvzet200.ext.ti.com (10.248.192.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 2 Mar 2026 08:59:08 -0600 Received: from DFLE200.ent.ti.com (10.64.6.58) by DFLE204.ent.ti.com (10.64.6.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 2 Mar 2026 08:59:08 -0600 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE200.ent.ti.com (10.64.6.58) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 2 Mar 2026 08:59:08 -0600 Received: from pratham-TI.dhcp.ti.com (pratham-ti.dhcp.ti.com [172.24.233.101]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 622Ewvka960610; Mon, 2 Mar 2026 08:59:05 -0600 From: Pratham Deshmukh To: CC: , , , , , , Pratham Deshmukh Subject: [PATCH 1/2] meta-arago-extras: Migrate ONNX v1.16.1 to v1.18.0 Date: Mon, 2 Mar 2026 20:28:45 +0530 Message-ID: <20260302145846.828106-2-p-deshmukh@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260302145846.828106-1-p-deshmukh@ti.com> References: <20260302145846.828106-1-p-deshmukh@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000044A1:EE_|CY5PR10MB6022:EE_ X-MS-Office365-Filtering-Correlation-Id: a59b20fb-0bed-4506-3801-08de786c41e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|34020700016|36860700013|376014; X-Microsoft-Antispam-Message-Info: Jj9Ok6zSPkfY1uMoqJNTz19Vsdj+ENEO6ILuKlVAZC+voyr5qD7fPexXQPk3WYzxgOxlxYmEEs/YwD6mVBchTcuAI79dOIj7b4w5GXeBw6i+mOpuHNcIrEoDZ+k6anb2OSXkgYUYv+YWy091lTGvzHiKPRqsOioDQQE9xqynCSySnhGGlZGwjKw2VubP7OWXDOQFAskaFFdS6hl4VrbErTyRTb4FMeSwgfo7x79keeSpEQUP/3BHWk92Dl7L5itfh+bW+ZVSLNEBaAP7dnSlv4iL31y7pW4Z4vq0b+aCCjec7zeg/WSBsIXpCb2+f1n6Yl4+3YxtjSmel2LccXob1niEUFv11CPhbNQqD9kzbc+TgWDpakucuPHHXfyLvOznzsyUxMvDfyCdDUjuBMijXDJAXL3Fcw19nsgCGxQHToeATDireLQ/DAJeDqh0yiPKQ8hc3U4k0d0ejC6Ag15G1OCCLsI2/KvWyq8qoOKJ/ILJLf26jeATxQNa+MPKgiAFH3oq/tob5Y1JkitTOwGbHZdAI15PV9X5LN0QqX6H+bzRHm5MHuW5aYAkG9b0bdKNjnq170MlWLKmrR4uWcJIqitKX4SnJq3TNz6JQbUMNISCZfbL5kzyMxG2jR1F2pNFeOtAs3PCapPl9o/lBowzX00dGX8YqEPj5JBEdAAKgV7RIUeZMNP4UbOOY3mXX1mrLwJq7LVqXkZYPnIobXKN5iBAT9HihZwZsiLNIxwOodSpYl23JdAIgNt3VSm2YR+PZvlkS+sK8C2ycH+SdZk3PGOJjHNgemRtAcaYjmoYN+I= X-Forefront-Antispam-Report: CIP:198.47.21.194;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet200.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(34020700016)(36860700013)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rbUkjc4Awk4TemaNN4Lftq5CYzo69xGIMZ94WcEUhwYfXHEtvze/8tpmWM4gSSHlGqUia0C2v2udsKiyZZSg1Y/lC+BcPIjy6ohGAcvLfOj8lSjgGLP2S6WUfChiVMMAzsX1JvRGfDCoLBva9RFJDxSVvRrhY9I5502LawjPzAYj/+ku4suO4b3hEW0UjFN09yGm5zBqMq/GmWS6SjaLckGy+OvJ63YckAtdnk3RHBr65dn59SwqkWiRGXuIEM8GemGqbxs098t4kGI1L1joltEkcUe7qQ7FoYkoO5yb0ceyk5if7Oq/JVGUQUrpZGihGmeJmgeNTPRf5BzexA2Fw4tVFKtrSD7jMT+jQcEUD/X4REGBK3N2KKxvnnC5gu9FdjaoWD2r7LJCivTN3wJUrxpbii757ZTzTPkiuO3E132xq75BgNNriMaWwoZfm9i5 X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2026 14:59:08.9192 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a59b20fb-0bed-4506-3801-08de786c41e2 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.194];Helo=[flwvzet200.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044A1.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR10MB6022 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 02 Mar 2026 14:59:26 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/17171 We are migrating ONNX from v1.16.1 to the stable release v1.18.0. Removed Patches: • 0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch - Updated with new commit • 0002-Do-not-re-export-internal-targets-directories.patch - Updated with new commit Added Patches (New Requirements): • 0001-Apply-onnx-patch.patch - Applies onnx.patch compatibility patch for separate builds • 0002-cmake-Fix-Protobuf-target-check-by-calling-find_pack.patch - Ensures proper Protobuf target detection before usage • 0003-cmake-Remove-Protobuf-directory-exports-from-config-.patch - Prevents CMake configuration conflicts in dependent packages • 0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch - Fixes linker errors during test executable creation • 0005-Fix-symbol-visibility-when-tests-are-enabled.patch - Resolves symbol visibility issues causing runtime failures. Signed-off-by: Pratham Deshmukh --- .../onnx/onnx/0001-Apply-onnx-patch.patch | 197 ++++++++++++++++++ ...age-Protobuf-before-checking-if-it-w.patch | 25 --- ...-export-internal-targets-directories.patch | 28 --- ...uf-target-check-by-calling-find_pack.patch | 36 ++++ ...tobuf-directory-exports-from-config-.patch | 37 ++++ ...en-trying-to-create-the-final-onnx_g.patch | 34 +++ ...ol-visibility-when-tests-are-enabled.patch | 36 ++++ .../onnx/{onnx_1.16.1.bb => onnx_1.18.0.bb} | 11 +- 8 files changed, 347 insertions(+), 57 deletions(-) create mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0001-Apply-onnx-patch.patch delete mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch delete mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0002-Do-not-re-export-internal-targets-directories.patch create mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0002-cmake-Fix-Protobuf-target-check-by-calling-find_pack.patch create mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0003-cmake-Remove-Protobuf-directory-exports-from-config-.patch create mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch create mode 100644 meta-arago-extras/recipes-framework/onnx/onnx/0005-Fix-symbol-visibility-when-tests-are-enabled.patch rename meta-arago-extras/recipes-framework/onnx/{onnx_1.16.1.bb => onnx_1.18.0.bb} (87%) diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0001-Apply-onnx-patch.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0001-Apply-onnx-patch.patch new file mode 100644 index 00000000..305736e7 --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnx/onnx/0001-Apply-onnx-patch.patch @@ -0,0 +1,197 @@ +From 93894db295857ca77cf385a5d39c565ee3e0c2fd Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 17:22:13 +0530 +Subject: [PATCH 1/5] Apply onnx patch + +ONNXRuntime's CMake uses FetchContent to download ONNX as a dependency. +Our onnxruntime recipe uses FETCHCONTENT_FULLY_DISCONNECTED=ON so instead +of letting ONNXRuntime fetch ONNX, we build ONNX separately using the +onnx_1.18.0.bb recipe.The onnxruntime recipe then references the pre-built +ONNX from the sysroot. Since ONNX was built separately without the patch, +the fixes that ONNXRuntime expects are missing + +We need to apply the patch [0] separately to avoid errors. + +[0] https://github.com/microsoft/onnxruntime/blob/rel-1.23.2/cmake/patches/onnx/onnx.patch + +Upstream-Status: Inappropriate [oe specific integration patch] + +Signed-off-by: Pratham Deshmukh +--- + CMakeLists.txt | 52 +++++++++++++++++++------------------------ + onnx/defs/nn/defs.cc | 6 ++--- + onnx/defs/nn/old.cc | 1 - + onnx/defs/rnn/defs.cc | 2 +- + onnx/defs/schema.h | 6 ++--- + 5 files changed, 30 insertions(+), 37 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b5af3038..8593fe4a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,7 @@ option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." OFF) + option(ONNX_DISABLE_EXCEPTIONS "Disable exception handling." OFF) + option(ONNX_DISABLE_STATIC_REGISTRATION "Disable static registration for ONNX operator schemas." OFF) + option(ONNX_USE_UNITY_BUILD "Enable Unity (Jumbo) build for" OFF) ++option(ONNX_MINIMAL_BUILD "Build only essential ONNX components" OFF) + if(WIN32) + option(ONNX_USE_MSVC_STATIC_RUNTIME "Build with MSVC static runtime" OFF) + endif() +@@ -461,14 +462,28 @@ relative_protobuf_generate_cpp(gen_onnx_data_proto + list(APPEND ONNX_PROTO_SRCS ${__tmp_srcs}) + list(APPEND ONNX_PROTO_HDRS ${__tmp_hdrs}) + +-file(GLOB_RECURSE __tmp_srcs "${ONNX_ROOT}/onnx/*.h" "${ONNX_ROOT}/onnx/*.cc") +-file(GLOB_RECURSE onnx_gtests_src "${ONNX_ROOT}/onnx/test/cpp/*.h" +- "${ONNX_ROOT}/onnx/test/cpp/*.cc" +- "${ONNX_ROOT}/onnx/backend/test/cpp/*.cc" +- "${ONNX_ROOT}/onnx/backend/test/cpp/*.h") +-list(REMOVE_ITEM __tmp_srcs "${ONNX_ROOT}/onnx/cpp2py_export.cc") +-list(REMOVE_ITEM __tmp_srcs ${onnx_gtests_src}) +-list(APPEND ONNX_SRCS ${__tmp_srcs}) ++if(ONNX_MINIMAL_BUILD) ++ message(STATUS "Configuring ONNX minimal build") ++ set(ONNX_SRCS ++ "${ONNX_ROOT}/onnx/common/common.h" ++ "${ONNX_ROOT}/onnx/defs/data_type_utils.h" ++ "${ONNX_ROOT}/onnx/defs/data_type_utils.cc" ++ ) ++ # Ensure ONNX_ML is treated as ON for minimal build consistency with ORT's file ++ set(ONNX_ML ON CACHE BOOL "Enable traditional ML API." FORCE) ++ # Minimal build doesn't need Python or tests ++ set(ONNX_BUILD_PYTHON OFF CACHE BOOL "Build Python binaries" FORCE) ++ set(ONNX_BUILD_TESTS OFF CACHE BOOL "Build ONNX C++ APIs Tests" FORCE) ++else() ++ file(GLOB_RECURSE __tmp_srcs "${ONNX_ROOT}/onnx/*.h" "${ONNX_ROOT}/onnx/*.cc") ++ file(GLOB_RECURSE onnx_gtests_src "${ONNX_ROOT}/onnx/test/cpp/*.h" ++ "${ONNX_ROOT}/onnx/test/cpp/*.cc" ++ "${ONNX_ROOT}/onnx/backend/test/cpp/*.cc" ++ "${ONNX_ROOT}/onnx/backend/test/cpp/*.h") ++ list(REMOVE_ITEM __tmp_srcs "${ONNX_ROOT}/onnx/cpp2py_export.cc") ++ list(REMOVE_ITEM __tmp_srcs ${onnx_gtests_src}) ++ list(APPEND ONNX_SRCS ${__tmp_srcs}) ++endif() + + add_library(onnx_proto ${ONNX_PROTO_SRCS} ${ONNX_PROTO_HDRS}) + add_dependencies(onnx_proto gen_onnx_operators_proto gen_onnx_data_proto) +@@ -595,13 +610,6 @@ if(ONNX_BUILD_PYTHON) + target_link_libraries(onnx_cpp2py_export PRIVATE ${Python3_LIBRARIES}) + target_compile_options(onnx_cpp2py_export + PRIVATE /MP +- /wd4146 # unary minus operator applied to unsigned type, +- # result still unsigned +- /wd4244 # 'argument': conversion from 'google:: +- # protobuf::uint64' to 'int', possible +- # loss of data +- /wd4267 # Conversion from 'size_t' to 'int', +- # possible loss of data + ${EXTRA_FLAGS}) + add_msvc_runtime_flag(onnx_cpp2py_export) + add_onnx_global_defines(onnx_cpp2py_export) +@@ -618,23 +626,9 @@ endif() + if(MSVC) + target_compile_options(onnx_proto + PRIVATE /MP +- /wd4146 # unary minus operator applied to unsigned type, +- # result still unsigned +- /wd4244 #'argument': conversion from 'google:: +- #protobuf::uint64' to 'int', possible +- # loss of data +- /wd4267 # Conversion from 'size_t' to 'int', +- # possible loss of data + ${EXTRA_FLAGS}) + target_compile_options(onnx + PRIVATE /MP +- /wd4146 # unary minus operator applied to unsigned type, +- # result still unsigned +- /wd4244 # 'argument': conversion from 'google:: +- # protobuf::uint64' to 'int', possible +- # loss of data +- /wd4267 # Conversion from 'size_t' to 'int', +- # possible loss of data + ${EXTRA_FLAGS}) + add_msvc_runtime_flag(onnx_proto) + add_msvc_runtime_flag(onnx) +diff --git a/onnx/defs/nn/defs.cc b/onnx/defs/nn/defs.cc +index 643662708..4aed90278 100644 +--- a/onnx/defs/nn/defs.cc ++++ b/onnx/defs/nn/defs.cc +@@ -36,7 +36,7 @@ static const char* conv_transpose_auto_pad_doc = + "on whether it is even or odd). In case the padding is an odd number, the extra " + "padding is added at the end for SAME_UPPER and at the beginning for SAME_LOWER."; + +-static void convPoolShapeInference( ++void convPoolShapeInference( + InferenceContext& ctx, + bool use_dilation, + bool require_kernel_shape, +@@ -1102,7 +1102,7 @@ ONNX_OPERATOR_SET_SCHEMA( + convPoolShapeInference(ctx, true, false, 0, 1); + })); + +-static void convTransposeShapeInference(InferenceContext& ctx) { ++void convTransposeShapeInference(InferenceContext& ctx) { + propagateElemTypeFromInputToOutput(ctx, 0, 0); + + // we need at least two inputs to have a shape for this inference. +@@ -1462,7 +1462,7 @@ ONNX_OPERATOR_SET_SCHEMA( + })); + + // For GlobalPool operations. +-static void globalPoolTypeShapeInference(InferenceContext& ctx) { ++void globalPoolTypeShapeInference(InferenceContext& ctx) { + propagateElemTypeFromInputToOutput(ctx, 0, 0); + + // needs at least one input with shape. +diff --git a/onnx/defs/nn/old.cc b/onnx/defs/nn/old.cc +index d8ca9a46f..1eda4c70b 100644 +--- a/onnx/defs/nn/old.cc ++++ b/onnx/defs/nn/old.cc +@@ -4023,7 +4023,6 @@ ONNX_OPERATOR_SET_SCHEMA( + GroupNormalization, + 18, + OpSchema() +- .Deprecate() + .SetDoc(GroupNormalization_ver18_doc) + .Attr("epsilon", "The epsilon value to use to avoid division by zero.", AttributeProto::FLOAT, 1e-5f) + .Attr( +diff --git a/onnx/defs/rnn/defs.cc b/onnx/defs/rnn/defs.cc +index c0ed3a393..6c8e29092 100644 +--- a/onnx/defs/rnn/defs.cc ++++ b/onnx/defs/rnn/defs.cc +@@ -5,7 +5,7 @@ + #include "onnx/defs/schema.h" + + namespace ONNX_NAMESPACE { +-static void RNNShapeInference(InferenceContext& ctx) { ++void RNNShapeInference(InferenceContext& ctx) { + TensorShapeProto::Dimension num_directions, seq_length, batch_size, hidden_size; + + auto direction = getAttribute(ctx, "direction", "forward"); +diff --git a/onnx/defs/schema.h b/onnx/defs/schema.h +index acf3aac7e..62c61fd97 100644 +--- a/onnx/defs/schema.h ++++ b/onnx/defs/schema.h +@@ -980,7 +980,7 @@ class OpSchemaRegistry final : public ISchemaRegistry { + class OpSchemaRegisterOnce final { + public: + // Export to cpp custom register macro +- explicit OpSchemaRegisterOnce( ++ OpSchemaRegisterOnce( + OpSchema op_schema, + int opset_version_to_load = 0, + bool fail_duplicate_schema = true) { +@@ -1312,8 +1312,8 @@ size_t ReplaceAll(std::string& s, const char* from, const char* to); + #define ONNX_OPERATOR_SCHEMA(name) ONNX_OPERATOR_SCHEMA_UNIQ_HELPER(__COUNTER__, name) + #define ONNX_OPERATOR_SCHEMA_UNIQ_HELPER(Counter, name) ONNX_OPERATOR_SCHEMA_UNIQ(Counter, name) + #define ONNX_OPERATOR_SCHEMA_UNIQ(Counter, name) \ +- static ONNX_NAMESPACE::OpSchemaRegistry::OpSchemaRegisterOnce(op_schema_register_once##name##Counter) ONNX_UNUSED = \ +- OpSchema(#name, __FILE__, __LINE__) ++ static ONNX_NAMESPACE::OpSchemaRegistry::OpSchemaRegisterOnce op_schema_register_once##name##Counter ONNX_UNUSED = \ ++ ONNX_NAMESPACE::OpSchema(#name, __FILE__, __LINE__) + + // Helper function + size_t ReplaceAll(std::string& s, const char* from, const char* to); +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch deleted file mode 100644 index e35b27de..00000000 --- a/meta-arago-extras/recipes-framework/onnx/onnx/0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7e118775c120ec802d13ac3e0125d726323aee87 Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Thu, 16 Jan 2025 11:44:56 -0600 -Subject: [PATCH] Try to find package Protobuf before checking if it was found - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b666eec4..f6fbf159 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -127,6 +127,8 @@ if(ONNX_BUILD_TESTS) - set(googletest_STATIC_LIBRARIES GTest::gtest) - endif() - -+find_package(Protobuf) -+ - if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf)) - # Sometimes we need to use protoc compiled for host architecture while linking - # libprotobuf against target architecture. See https://github.com/caffe2/caffe diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0002-Do-not-re-export-internal-targets-directories.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0002-Do-not-re-export-internal-targets-directories.patch deleted file mode 100644 index d6cc85e7..00000000 --- a/meta-arago-extras/recipes-framework/onnx/onnx/0002-Do-not-re-export-internal-targets-directories.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0bdd879060cb5022b62d06bff0f21a21c3be18ca Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Mon, 3 Feb 2025 11:28:52 -0600 -Subject: [PATCH] Do not re-export internal targets directories - -These can be specific to a given project build and should not -be automatically inherited to dependent projects. - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - cmake/ONNXConfig.cmake.in | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/cmake/ONNXConfig.cmake.in b/cmake/ONNXConfig.cmake.in -index d588f8ae..a61af089 100644 ---- a/cmake/ONNXConfig.cmake.in -+++ b/cmake/ONNXConfig.cmake.in -@@ -6,8 +6,6 @@ - # library version information - set(ONNX_VERSION "@ONNX_VERSION@") - --list(APPEND CMAKE_PREFIX_PATH "@PROTOBUF_DIR@") --set(Protobuf_INCLUDE_DIR "@PROTOBUF_INCLUDE_DIR@") - find_package(Protobuf REQUIRED) - - # import targets diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0002-cmake-Fix-Protobuf-target-check-by-calling-find_pack.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0002-cmake-Fix-Protobuf-target-check-by-calling-find_pack.patch new file mode 100644 index 00000000..8c01a2c7 --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnx/onnx/0002-cmake-Fix-Protobuf-target-check-by-calling-find_pack.patch @@ -0,0 +1,36 @@ +From b6628fa7ee3acd35076d617157342b25c432715b Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 17:23:40 +0530 +Subject: [PATCH 2/5] cmake: Fix Protobuf target check by calling find_package + first + +Add find_package(Protobuf) before checking if protobuf targets exist +in the ONNX_BUILD_CUSTOM_PROTOBUF conditional. This ensures Protobuf +targets are properly defined before being referenced. + +Without this change, the target existence checks fails even when +Protobuf is available. + +Upstream-Status: Pending + +Signed-off-by: Pratham Deshmukh +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8593fe4a3..9fed84add 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,6 +142,8 @@ if(ONNX_BUILD_TESTS) + set(googletest_STATIC_LIBRARIES GTest::gtest) + endif() + ++find_package(Protobuf) ++ + if(NOT ONNX_BUILD_CUSTOM_PROTOBUF) + if((ONNX_USE_LITE_PROTO AND TARGET protobuf::libprotobuf-lite) OR ((NOT ONNX_USE_LITE_PROTO) AND TARGET protobuf::libprotobuf)) + # Sometimes we need to use protoc compiled for host architecture while linking +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0003-cmake-Remove-Protobuf-directory-exports-from-config-.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0003-cmake-Remove-Protobuf-directory-exports-from-config-.patch new file mode 100644 index 00000000..c6e9c698 --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnx/onnx/0003-cmake-Remove-Protobuf-directory-exports-from-config-.patch @@ -0,0 +1,37 @@ +From 6ce0573c3661424c5723f9bab6773a3f6ede79fd Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 17:24:56 +0530 +Subject: [PATCH 3/5] cmake: Remove Protobuf directory exports from config + template + +Remove CMAKE_PREFIX_PATH and Protobuf_INCLUDE_DIR exports from +ONNXConfig.cmake.in as these paths are specific to the ONNX build +environment and should not be propagated to dependent projects. + +Dependent projects should find Protobuf through their own +find_package(Protobuf REQUIRED) call instead of inheriting +build-specific paths. + +Upstream-Status: Pending + +Signed-off-by: Pratham Deshmukh +--- + cmake/ONNXConfig.cmake.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/cmake/ONNXConfig.cmake.in b/cmake/ONNXConfig.cmake.in +index d588f8ae1..a61af0894 100644 +--- a/cmake/ONNXConfig.cmake.in ++++ b/cmake/ONNXConfig.cmake.in +@@ -6,8 +6,6 @@ + # library version information + set(ONNX_VERSION "@ONNX_VERSION@") + +-list(APPEND CMAKE_PREFIX_PATH "@PROTOBUF_DIR@") +-set(Protobuf_INCLUDE_DIR "@PROTOBUF_INCLUDE_DIR@") + find_package(Protobuf REQUIRED) + + # import targets +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch new file mode 100644 index 00000000..8422dcea --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnx/onnx/0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch @@ -0,0 +1,34 @@ +From 8e19cae53e24126cb57e486e0e7da96f02b3cbf7 Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 17:26:07 +0530 +Subject: [PATCH 4/5] Linker failed when trying to create the final onnx_gtests + executable + +The main onnx library target was missing the ONNX_API compile +definitions that are needed to properly export symbols on Linux +platforms with hidden visibility. This causes undefined reference +errors when linking tests because symbols like OpSchemaRegistry::Schema() +are not visible. + +Upstream-Status: Pending + +Signed-off-by: Pratham Deshmukh +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9fed84add..89d4fed84 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -547,6 +547,7 @@ target_include_directories(onnx PUBLIC + $) + target_link_libraries(onnx PUBLIC onnx_proto) + add_onnx_global_defines(onnx) ++target_compile_definitions(onnx PRIVATE ${ONNX_API_DEFINE}) + + if(ONNX_BUILD_PYTHON) + Python3_add_library(onnx_cpp2py_export MODULE WITH_SOABI "${ONNX_ROOT}/onnx/cpp2py_export.cc") +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnx/onnx/0005-Fix-symbol-visibility-when-tests-are-enabled.patch b/meta-arago-extras/recipes-framework/onnx/onnx/0005-Fix-symbol-visibility-when-tests-are-enabled.patch new file mode 100644 index 00000000..2cbb8444 --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnx/onnx/0005-Fix-symbol-visibility-when-tests-are-enabled.patch @@ -0,0 +1,36 @@ +From b745ae1fed1e0819cac764a07d8f82abc1c438da Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 17:27:17 +0530 +Subject: [PATCH 5/5] Fix symbol visibility when tests are enabled + +The onnx target uses hidden visibility which hides C++ API symbols +that tests need. Most C++ API symbols (OpSchema methods, OpSchemaRegistry +functions, etc.) are not marked with ONNX_API, so they remain hidden +even with ONNX_API_DEFINE set. + +When tests are enabled, we need access to these internal symbols, +so disable hidden visibility for the main onnx library. + +Upstream-Status: Pending + +Signed-off-by: Pratham Deshmukh +--- + CMakeLists.txt | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89d4fed84..c4cded129 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -538,8 +538,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX") + else() + add_library(onnx ${ONNX_SRCS}) + endif() +-set_target_properties(onnx PROPERTIES CXX_VISIBILITY_PRESET hidden) +-set_target_properties(onnx PROPERTIES VISIBILITY_INLINES_HIDDEN ON) + + target_include_directories(onnx PUBLIC + $ +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnx/onnx_1.16.1.bb b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb similarity index 87% rename from meta-arago-extras/recipes-framework/onnx/onnx_1.16.1.bb rename to meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb index 3cfb4097..06a84b24 100644 --- a/meta-arago-extras/recipes-framework/onnx/onnx_1.16.1.bb +++ b/meta-arago-extras/recipes-framework/onnx/onnx_1.18.0.bb @@ -4,12 +4,15 @@ HOMEPAGE = "https://www.onnx.ai/" LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "git://github.com/onnx/onnx.git;protocol=https;branch=rel-1.16.1" +SRC_URI = "git://github.com/onnx/onnx.git;protocol=https;branch=rel-1.18.0" SRC_URI += "\ - file://0001-Try-to-find-package-Protobuf-before-checking-if-it-w.patch \ - file://0002-Do-not-re-export-internal-targets-directories.patch \ + file://0001-Patch-onnx.patch-apply.patch \ + file://0002-Try-to-find-package-Protobuf-before-checking-if-it-w.patch \ + file://0003-Do-not-re-export-internal-targets-directories.patch \ + file://0004-Linker-failed-when-trying-to-create-the-final-onnx_g.patch \ + file://0005-Fix-symbol-visibility-when-tests-are-enabled.patch \ " -SRCREV = "595228d99e3977ac27cb79d5963adda262af99ad" +SRCREV = "e709452ef2bbc1d113faf678c24e6d3467696e83" DEPENDS += "\ abseil-cpp \ From patchwork Mon Mar 2 14:58:46 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pratham Deshmukh X-Patchwork-Id: 82268 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F08D2EA4E18 for ; Mon, 2 Mar 2026 14:59:25 +0000 (UTC) Received: from PH8PR06CU001.outbound.protection.outlook.com (PH8PR06CU001.outbound.protection.outlook.com [40.107.209.25]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.162286.1772463563294965113 for ; Mon, 02 Mar 2026 06:59:23 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ti.com header.s=selector1 header.b=aHPmADf+; spf=permerror, err=parse error for token &{10 18 spf.protection.outlook.com}: limit exceeded (domain: ti.com, ip: 40.107.209.25, mailfrom: p-deshmukh@ti.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Xt/EQFZI7TRupZ/gAtAiILSRtlTMwpnph5nKlnoZZkQMbIcxO+u7ocJi2RkrRL47i1dGeO0HgQmOzTPyCoSG6tKntFu0AAJPlPgGUDtiZUiCzNbiab2qIupJBLr1qy7CTkwIcuVKXzhsqk49sqq0dHPbXEvuszHpycFqNhnbq7/3hcjwlaJwSl7zcw+LIpg9L7BGm7CGOvMgjIZVahnkyuru2eE5fxep8R41vnZ+Ii6emX0Z2JfV4CaULoV3x7gij3mzsJEGBXRJ/IozY0toLMvTjlaXDWlwEy0NwA/wxLIWTJOQX+zNo4PiAjw0DrdasOyjAw0iEJxpO7VEuLfjXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vQV+fWLntYK/C6KcOZ3e7q9PKyHoi5k7+3VXW3PELOw=; b=GKwxlAQucHWf/mxHSE4V5ahSKd8N8hbQ8gEo09gbisHwsLkPrOJ9kjSQnUpyXzDXlZIV5kmGWk5iXmI9x7BJX9PmWxcguv4tIhxt27D5iS9matGFC1Vzlae6HRLePWSHkDY9esFdb+F4EQxGkhBkPqlCbEEOeZZaC3tURmJVdNoHqG23pQ3zDstV3N13xMqoS3jP/oUUVy34aJSktYHfCu1qIUBU8PGKnJz5hPhi41KimCTbn7KYivInS4ckXiwadoa0MLU1nhUYev9OjiyaRqpVaoWwbHcdfO5J6vcs5qzmmt/X7lvE6kWn+UG4fIBs6qYUvfKIFLioH1tjP3bPAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 198.47.23.195) smtp.rcpttodomain=konsulko.com smtp.mailfrom=ti.com; dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vQV+fWLntYK/C6KcOZ3e7q9PKyHoi5k7+3VXW3PELOw=; b=aHPmADf+a1KOLDkDPeS8J1F+Dy7Ot0GFWYPRVjcskP1226YAcP9XGuBQiJnBxj0MaXuqmdVwRUXSkOs5zh3jhMb4tboSRjRPzFsdfVTWokk7xwVxc4fXPQiazFblhf9Db7A4VqKQ1cxOy+CvxsB8rWteIFzUjNW2waoljrUNf6A= Received: from DM6PR02CA0152.namprd02.prod.outlook.com (2603:10b6:5:332::19) by SJ0PR10MB5613.namprd10.prod.outlook.com (2603:10b6:a03:3d0::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.18; Mon, 2 Mar 2026 14:59:20 +0000 Received: from DS3PEPF000099E2.namprd04.prod.outlook.com (2603:10b6:5:332:cafe::b) by DM6PR02CA0152.outlook.office365.com (2603:10b6:5:332::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9654.21 via Frontend Transport; Mon, 2 Mar 2026 14:59:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 198.47.23.195) smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ti.com; Received-SPF: Pass (protection.outlook.com: domain of ti.com designates 198.47.23.195 as permitted sender) receiver=protection.outlook.com; client-ip=198.47.23.195; helo=lewvzet201.ext.ti.com; pr=C Received: from lewvzet201.ext.ti.com (198.47.23.195) by DS3PEPF000099E2.mail.protection.outlook.com (10.167.17.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.16 via Frontend Transport; Mon, 2 Mar 2026 14:59:19 +0000 Received: from DLEE206.ent.ti.com (157.170.170.90) by lewvzet201.ext.ti.com (10.4.14.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 2 Mar 2026 08:59:19 -0600 Received: from DLEE204.ent.ti.com (157.170.170.84) by DLEE206.ent.ti.com (157.170.170.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Mon, 2 Mar 2026 08:59:11 -0600 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE204.ent.ti.com (157.170.170.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 2 Mar 2026 08:59:11 -0600 Received: from pratham-TI.dhcp.ti.com (pratham-ti.dhcp.ti.com [172.24.233.101]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 622Ewvkb960610; Mon, 2 Mar 2026 08:59:09 -0600 From: Pratham Deshmukh To: CC: , , , , , , Pratham Deshmukh Subject: [PATCH 2/2] meta-arago-extras: Migrate ONNXRuntime v1.20.1 to v1.23.2 Date: Mon, 2 Mar 2026 20:28:46 +0530 Message-ID: <20260302145846.828106-3-p-deshmukh@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260302145846.828106-1-p-deshmukh@ti.com> References: <20260302145846.828106-1-p-deshmukh@ti.com> MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099E2:EE_|SJ0PR10MB5613:EE_ X-MS-Office365-Filtering-Correlation-Id: f670b368-0ed5-4df8-6fb8-08de786c4861 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013|34020700016|13003099007; X-Microsoft-Antispam-Message-Info: DLQ9a9VGZvR2PsLwns6Xmcdz4LFB/ZdlbeuklCZWW33hhLjDRxMnFqukDf20PqJ9hzzMBHzltBAac+KtyvpFiCAaLKUmngZqf63JEFsm/r4T9lZ+SGlUecUTC0GquM90wKDY7/gUbkD03/tcH1eq/MzffZTRJM5Y/hPhGRG300X4dDL+zr6CZitrui+y5U/ATKP5fqO8qE/S3t6LW9Pif3xvNKBcGcAoKlChPLrBM5PwTPCBxEVe74rcfulhRR0KtcVwJUNeNNauX2ehWBOlbvL00br1VwudAKHEGe5hyL284NORjry79SUFIuxzTg9PkbgmAudlIWEW2Tx+JLRm7PrMpmArbXymEuLHq1BWG3kAduFgPzd505IAevXBUVUWXS0zoaoxnhwAK2fYuonjVZgY1kSqXdTI8tPZQvxGEpXdW3q1pDVObmsQfmaJVup22maKiq7P21JfSjt5R6F24iY778KR6NNzSD0FH7JYYXMRcEPXtDHGOD8EbX7PT4PJjtN6/XRxsC0r0nO7c2pIMRvZR66/2JhJVx2YhW+ZKJjwElegK672qzJICvgJ0un57Pgl43WS0a2x5LLXBZij7e3hAtJshrlul8aV80aXjeZhvRjQUT8JJgKaUSm2X30pD787VKH8RBVa7pVLwgi80gaBGstImFjlWEVsr8TLcFD6UReMJkAnKUyOFDzGDwubQRCuuI58z/YVGraBfITSsn7OnNwWQiInXvZwJv/wf2iobc8kfuU6I71Ix3sC9l03ZfB1ARneXz48nvaWZc50vqRGpykMryThRNDQp377u6A= X-Forefront-Antispam-Report: CIP:198.47.23.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:lewvzet201.ext.ti.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013)(34020700016)(13003099007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: feeZL7XxCG6IRREX3huQX0kEBDEjSFJci4lILuGmm+UQzp9A1VDOHfODQQZADAS2zJyLMMwFv/Mxh0a3Lk9Wc9puH21WvhGPYRhazxUyaQFjmrG1HL1jbZ0DWrxf8m+G85GVN0jMMlpEDcxjYrtL5OUerjgQrdxcOnxA4zjwmuKoLdlB8fRxSYWicbf9ZCzbQieP1YAo3id5F5bY+JTeYPHDg1e2qCcZqkTWcMV+lqlxOSyGz/UgBOSMQuPa7jhznTRQdo/nSWNRo7JCvflJZAKg9tCv3pxxthrfreCahgR3CbmLlRNFLu7oTocDK8O8wJJKaaGK1OfADelssNxQJG/XVqjs9y7xGe/ziW1nLIDjiIn3EquLVkFnWIPOm7I28lnSQV+Bnyeeey7LN43ZKd+KP8qr4OPBZYhUmvibbHwJ+RApuw80WSJxeVbfhRII X-OriginatorOrg: ti.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2026 14:59:19.8212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f670b368-0ed5-4df8-6fb8-08de786c4861 X-MS-Exchange-CrossTenant-Id: e5b49634-450b-4709-8abb-1e2b19b982b7 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.23.195];Helo=[lewvzet201.ext.ti.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099E2.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5613 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 02 Mar 2026 14:59:25 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/17172 We are migrating ONNXRuntime from v1.20.1 to the latest stable version v1.23.2. Removed Patches (Fixed Upstream): • 0001-Remove-executable-permission-bit-from-source-files.patch - Upstream Link: https://github.com/microsoft/onnxruntime/blob/rel-1.23.2/onnxruntime/contrib_ops/cpu/utils/console_dumper.h#L6 • 0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch - Upstream Link: https://github.com/microsoft/onnxruntime/blob/rel-1.23.2/cmake/CMakeLists.txt#L64 • 0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch - Upstream Link: https://github.com/microsoft/onnxruntime/blob/rel-1.23.2/cmake/onnxruntime_providers_acl.cmake#L16 • 0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch - Upstream Link: https://github.com/microsoft/onnxruntime/blob/rel-1.23.2/cmake/CMakeLists.txt • 0005-cmake-Print-out-result-of-find_package.patch - With the updated helper_functions.cmake this patch is no needed. Added Patches (New Requirements): • 0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch - Fixes missing stdint.h include causing uint32_t compilation errors Signed-off-by: Pratham Deshmukh --- ...g-header-to-fix-uint32_t-compilation.patch | 27 +++ ...ble-permission-bit-from-source-files.patch | 72 -------- ...-in-option-text-s-buildings-bindings.patch | 25 --- ...D_LIBRARY_PATH-to-search-path-when-n.patch | 32 ---- ...MAKE_CXX_FLAGS-in-build-information-.patch | 30 ---- ...ake-Print-out-result-of-find_package.patch | 37 ---- .../onnxruntime/onnxruntime_1.20.1.bb | 157 ----------------- .../onnxruntime/onnxruntime_1.23.2.bb | 163 ++++++++++++++++++ 8 files changed, 190 insertions(+), 353 deletions(-) create mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Remove-executable-permission-bit-from-source-files.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0005-cmake-Print-out-result-of-find_package.patch delete mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.20.1.bb create mode 100644 meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.23.2.bb diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch new file mode 100644 index 00000000..21e0a301 --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch @@ -0,0 +1,27 @@ +From cb67823df8cfa19cf1c0c0ddd1b9aa29ee7773ba Mon Sep 17 00:00:00 2001 +From: Pratham Deshmukh +Date: Thu, 12 Feb 2026 16:02:40 +0530 +Subject: [PATCH] Added the missing header to fix uint32_t compilation error. + +Upstream-Status: Backport [https://github.com/microsoft/onnxruntime/commit/d6e712c] + +Signed-off-by: Pratham Deshmukh +--- + onnxruntime/core/common/semver.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/onnxruntime/core/common/semver.h b/onnxruntime/core/common/semver.h +index a07c24f016..98bb6a2cef 100644 +--- a/onnxruntime/core/common/semver.h ++++ b/onnxruntime/core/common/semver.h +@@ -3,6 +3,7 @@ + + #pragma once + ++#include + #include + #include + +-- +2.34.1 + diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Remove-executable-permission-bit-from-source-files.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Remove-executable-permission-bit-from-source-files.patch deleted file mode 100644 index b64e32ca..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0001-Remove-executable-permission-bit-from-source-files.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 626066499c34c524924302342fc071f32442caae Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Sun, 12 Jan 2025 12:48:49 -0600 -Subject: [PATCH] Remove executable permission bit from source files - -These are source files, not executables, do not set the executable -permission bit on these files. - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - onnxruntime/contrib_ops/cpu/utils/console_dumper.h | 1 + - onnxruntime/core/optimizer/bias_softmax_fusion.cc | 0 - onnxruntime/core/providers/acl/acl_execution_provider.h | 0 - onnxruntime/core/providers/acl/acl_fwd.h | 0 - onnxruntime/core/providers/acl/acl_provider_factory.cc | 0 - onnxruntime/core/providers/acl/math/gemm.cc | 0 - onnxruntime/core/providers/acl/nn/batch_norm.cc | 0 - onnxruntime/core/providers/acl/nn/batch_norm.h | 0 - onnxruntime/test/optimizer/graph_transform_test.cc | 0 - onnxruntime/test/optimizer/graph_transform_test_layernorm.cc | 0 - 10 files changed, 1 insertion(+) - mode change 100755 => 100644 onnxruntime/core/optimizer/bias_softmax_fusion.cc - mode change 100755 => 100644 onnxruntime/core/providers/acl/acl_execution_provider.h - mode change 100755 => 100644 onnxruntime/core/providers/acl/acl_fwd.h - mode change 100755 => 100644 onnxruntime/core/providers/acl/acl_provider_factory.cc - mode change 100755 => 100644 onnxruntime/core/providers/acl/math/gemm.cc - mode change 100755 => 100644 onnxruntime/core/providers/acl/nn/batch_norm.cc - mode change 100755 => 100644 onnxruntime/core/providers/acl/nn/batch_norm.h - mode change 100755 => 100644 onnxruntime/test/optimizer/graph_transform_test.cc - mode change 100755 => 100644 onnxruntime/test/optimizer/graph_transform_test_layernorm.cc - -diff --git a/onnxruntime/contrib_ops/cpu/utils/console_dumper.h b/onnxruntime/contrib_ops/cpu/utils/console_dumper.h -index 9ebc44f441..64bd2b7b18 100644 ---- a/onnxruntime/contrib_ops/cpu/utils/console_dumper.h -+++ b/onnxruntime/contrib_ops/cpu/utils/console_dumper.h -@@ -3,6 +3,7 @@ - - #pragma once - #include -+#include - #include "core/framework/ort_value.h" - #include "core/framework/float16.h" - #include "contrib_ops/cpu/utils/debug_macros.h" -diff --git a/onnxruntime/core/optimizer/bias_softmax_fusion.cc b/onnxruntime/core/optimizer/bias_softmax_fusion.cc -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/acl_execution_provider.h b/onnxruntime/core/providers/acl/acl_execution_provider.h -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/acl_fwd.h b/onnxruntime/core/providers/acl/acl_fwd.h -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/acl_provider_factory.cc b/onnxruntime/core/providers/acl/acl_provider_factory.cc -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/math/gemm.cc b/onnxruntime/core/providers/acl/math/gemm.cc -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/nn/batch_norm.cc b/onnxruntime/core/providers/acl/nn/batch_norm.cc -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/core/providers/acl/nn/batch_norm.h b/onnxruntime/core/providers/acl/nn/batch_norm.h -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/test/optimizer/graph_transform_test.cc b/onnxruntime/test/optimizer/graph_transform_test.cc -old mode 100755 -new mode 100644 -diff --git a/onnxruntime/test/optimizer/graph_transform_test_layernorm.cc b/onnxruntime/test/optimizer/graph_transform_test_layernorm.cc -old mode 100755 -new mode 100644 diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch deleted file mode 100644 index 88423190..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch +++ /dev/null @@ -1,25 +0,0 @@ -From be67663e9a44d146033aeb97804145a60b4032db Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Thu, 16 Jan 2025 12:35:03 -0600 -Subject: [PATCH] [cmake] Fix typo in option text s/buildings/bindings - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - cmake/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index d90a2a3550..e0cde678db 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -77,7 +77,7 @@ option(onnxruntime_GENERATE_TEST_REPORTS "Enable test report generation" OFF) - option(onnxruntime_ENABLE_STATIC_ANALYSIS "Enable static analysis" OFF) - option(onnxruntime_USE_CUSTOM_STATIC_ANALYSIS_RULES "Use a custom SDL Rule. It is mainly for our CI build" OFF) - option(onnxruntime_REDIRECT_STATIC_ANALYSIS_OUTPUTS_TO_FILE "Use a custom SDL Rule. It is mainly for our CI build" OFF) --option(onnxruntime_ENABLE_PYTHON "Enable python buildings" OFF) -+option(onnxruntime_ENABLE_PYTHON "Enable python bindings" OFF) - # Enable it may cause LNK1169 error - option(onnxruntime_ENABLE_MEMLEAK_CHECKER "Experimental: Enable memory leak checker in Windows debug build" OFF) - option(onnxruntime_USE_CUDA "Build with CUDA support" OFF) diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch deleted file mode 100644 index 75cb9b18..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b1689f3f963f4c07d3329a838569ac4c2fa2bd5f Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Thu, 16 Jan 2025 12:38:13 -0600 -Subject: [PATCH] [ACL] Do not add LD_LIBRARY_PATH to search path when not - defined - -If LD_LIBRARY_PATH is not defined a blank "-L" is added to the -link command. This causes the next object to be linked to get -treated as if it was a search path and causes link failure. - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - cmake/onnxruntime_providers_acl.cmake | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/cmake/onnxruntime_providers_acl.cmake b/cmake/onnxruntime_providers_acl.cmake -index e23d289271..19d41dc73f 100644 ---- a/cmake/onnxruntime_providers_acl.cmake -+++ b/cmake/onnxruntime_providers_acl.cmake -@@ -13,7 +13,9 @@ - onnxruntime_common onnxruntime_framework onnx onnx_proto ${PROTOBUF_LIB} flatbuffers::flatbuffers Boost::mp11 safeint_interface - ) - -- target_link_libraries(onnxruntime_providers_acl -L$ENV{LD_LIBRARY_PATH}) -+ if (DEFINED ENV{LD_LIBRARY_PATH}) -+ target_link_libraries(onnxruntime_providers_acl -L$ENV{LD_LIBRARY_PATH}) -+ endif() - add_dependencies(onnxruntime_providers_acl ${onnxruntime_EXTERNAL_DEPENDENCIES}) - set_target_properties(onnxruntime_providers_acl PROPERTIES FOLDER "ONNXRuntime") - target_include_directories(onnxruntime_providers_acl diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch deleted file mode 100644 index e8f086a8..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 7ea6e35d3630f8c19080a0cb5a4a4c55c242a36b Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Thu, 16 Jan 2025 12:40:57 -0600 -Subject: [PATCH] Do not include CMAKE_CXX_FLAGS in build information string - -While this information can be useful, it often includes information -that may be specific to the build machine (like include paths with -usernames, e.g. -I /home/myname/externalproject/fakeroot/inlcude). - -This causes issues for reproducible builds (resulting binaries will -be different between different build machines). - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - cmake/CMakeLists.txt | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt -index e0cde678db..e0d8fd0a17 100644 ---- a/cmake/CMakeLists.txt -+++ b/cmake/CMakeLists.txt -@@ -1439,7 +1439,6 @@ if (Git_FOUND) - string(APPEND ORT_BUILD_INFO "git-branch=${ORT_GIT_BRANCH}, git-commit-id=${ORT_GIT_COMMIT}, ") - endif() - string(APPEND ORT_BUILD_INFO "build type=${CMAKE_BUILD_TYPE}") --string(APPEND ORT_BUILD_INFO ", cmake cxx flags: ${CMAKE_CXX_FLAGS}") - configure_file(onnxruntime_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/onnxruntime_config.h) - get_property(onnxruntime_GENERATOR_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0005-cmake-Print-out-result-of-find_package.patch b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0005-cmake-Print-out-result-of-find_package.patch deleted file mode 100644 index 249aadee..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime/0005-cmake-Print-out-result-of-find_package.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a73d9b9f4dba6d164e128d6c768d1b0a04e969ab Mon Sep 17 00:00:00 2001 -From: Andrew Davis -Date: Thu, 16 Jan 2025 12:47:27 -0600 -Subject: [PATCH] [cmake] Print out result of find_package - -A verbose only message is already printed that states the CMake will -attempt to find a package using find_package(): - -> Trying find_package(...) before FetchContent - -But it never prints if the package was found this way or not. -Add this result message. - -Upstream-Status: Pending - -Signed-off-by: Andrew Davis ---- - cmake/external/helper_functions.cmake | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/cmake/external/helper_functions.cmake b/cmake/external/helper_functions.cmake -index e3f2211f96..9ca6a967da 100644 ---- a/cmake/external/helper_functions.cmake -+++ b/cmake/external/helper_functions.cmake -@@ -138,9 +138,12 @@ macro(onnxruntime_fetchcontent_makeavailable) - unset(__cmake_fpArgs) - - if(${__cmake_contentName}_FOUND) -+ message(VERBOSE "Found ${__cmake_contentName} with find_package()") - FetchContent_SetPopulated(${__cmake_contentName}) - FetchContent_GetProperties(${__cmake_contentName}) - continue() -+ else() -+ message(VERBOSE "Could not find ${__cmake_contentName} with find_package()") - endif() - endif() - else() diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.20.1.bb b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.20.1.bb deleted file mode 100644 index a5026484..00000000 --- a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.20.1.bb +++ /dev/null @@ -1,157 +0,0 @@ -DESCRIPTION = "ONNX Runtime is a cross-platform, high performance machine learning inferencing framework" -SUMMARY = "ONNX Runtime Python package & C++ library" -HOMEPAGE = "https://www.onnxruntime.ai/" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0f7e3b1308cb5c00b372a6e78835732d" - -SRC_URI = "\ - git://github.com/microsoft/onnxruntime.git;protocol=https;branch=rel-1.20.1 \ - git://github.com/HowardHinnant/date.git;protocol=https;branch=master;name=date;destsuffix=${S}/cmake/external/date \ - git://github.com/pytorch/cpuinfo.git;protocol=https;branch=main;name=cpuinfo;destsuffix=${S}/cmake/external/cpuinfo \ - git://github.com/google/flatbuffers.git;protocol=https;branch=master;name=flatbuffers;destsuffix=${S}/cmake/external/flatbuffers \ - git://github.com/dcleblanc/SafeInt.git;protocol=https;branch=master;name=safeint;destsuffix=${S}/cmake/external/safeint \ - git://gitlab.com/libeigen/eigen.git;protocol=https;branch=3.4;name=eigen;destsuffix=${S}/cmake/external/eigen \ - git://github.com/google/nsync.git;protocol=https;branch=master;name=nsync;destsuffix=${S}/cmake/external/nsync \ -" -SRC_URI += "\ - file://0002-cmake-Fix-typo-in-option-text-s-buildings-bindings.patch \ - file://0003-ACL-Do-not-add-LD_LIBRARY_PATH-to-search-path-when-n.patch \ - file://0004-Do-not-include-CMAKE_CXX_FLAGS-in-build-information-.patch \ - file://0005-cmake-Print-out-result-of-find_package.patch \ - file://0001-Remove-executable-permission-bit-from-source-files.patch \ -" - -SRCREV_FORMAT = "default" -SRCREV = "5c1b7ccbff7e5141c1da7a9d963d660e5741c319" -SRCREV_date = "6e921e1b1d21e84a5c82416ba7ecd98e33a436d0" -SRCREV_cpuinfo = "ca678952a9a8eaa6de112d154e8e104b22f9ab3f" -SRCREV_flatbuffers = "0100f6a5779831fa7a651e4b67ef389a8752bd9b" -SRCREV_safeint = "4cafc9196c4da9c817992b20f5253ef967685bf8" -SRCREV_eigen = "e7248b26a1ed53fa030c5c459f7ea095dfd276ac" -SRCREV_nsync = "13de152c2a1cd73ff4df97bd2c406b6d15d34af3" - -# Only compatible with armv7a, armv7ve, and aarch64 -COMPATIBLE_MACHINE = "(^$)" -COMPATIBLE_MACHINE:aarch64 = "(.*)" -COMPATIBLE_MACHINE:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}" -COMPATIBLE_MACHINE:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}" - -DEPENDS += "\ - onnx \ - abseil-cpp \ - protobuf \ - protobuf-native \ - boost \ - re2 \ - nlohmann-json \ - microsoft-gsl \ -" - -PYTHON_DEPENDS = "\ - python3 \ - python3-numpy \ - python3-numpy-native \ - python3-pybind11 \ - python3-pybind11-native \ -" - -PYTHON_RDEPENDS = "\ - python3 \ - python3-onnx \ - python3-numpy \ - python3-protobuf \ - python3-coloredlogs \ - python3-flatbuffers \ - python3-sympy \ -" - -OECMAKE_SOURCEPATH = "${S}/cmake" - -PACKAGECONFIG ??= "python sharedlib unittests acl" - -PACKAGECONFIG[python] = "-Donnxruntime_ENABLE_PYTHON=ON, -Donnxruntime_ENABLE_PYTHON=OFF, ${PYTHON_DEPENDS}" -PACKAGECONFIG[sharedlib] = "-Donnxruntime_BUILD_SHARED_LIB=ON, -Donnxruntime_BUILD_SHARED_LIB=OFF" -PACKAGECONFIG[unittests] = "-Donnxruntime_BUILD_UNIT_TESTS=ON, -Donnxruntime_BUILD_UNIT_TESTS=OFF, googletest" - -PACKAGECONFIG[acl] = "-Donnxruntime_USE_ACL=ON, -Donnxruntime_USE_ACL=OFF, arm-compute-library" -PACKAGECONFIG[armnn] = "-Donnxruntime_USE_ARMNN=ON, -Donnxruntime_USE_ARMNN=OFF, armnn" -PACKAGECONFIG[armnn-relu] = "-Donnxruntime_ARMNN_RELU_USE_CPU=ON, -Donnxruntime_ARMNN_RELU_USE_CPU=OFF" -PACKAGECONFIG[armnn-bn] = "-Donnxruntime_ARMNN_BN_USE_CPU=ON, -Donnxruntime_ARMNN_BN_USE_CPU=OFF" - -EXTRA_OECMAKE:append = " \ - -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ - -DFETCHCONTENT_SOURCE_DIR_DATE=${S}/cmake/external/date \ - -DFETCHCONTENT_SOURCE_DIR_PYTORCH_CPUINFO=${S}/cmake/external/cpuinfo \ - -DFETCHCONTENT_SOURCE_DIR_PYTORCH_CLOG=${S}/cmake/external/cpuinfo \ - -DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${S}/cmake/external/flatbuffers \ - -DFETCHCONTENT_SOURCE_DIR_SAFEINT=${S}/cmake/external/safeint \ - -DFETCHCONTENT_SOURCE_DIR_EIGEN=${S}/cmake/external/eigen \ - -DFETCHCONTENT_SOURCE_DIR_GOOGLE_NSYNC=${S}/cmake/external/nsync \ -" - -EXTRA_OECMAKE:append = " \ - -DONNX_CUSTOM_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ - -Donnx_SOURCE_DIR=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR} \ - -DPython_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ - --compile-no-warning-as-error \ - --log-level=VERBOSE \ -" - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} -inherit python3-dir cmake - -do_install:append() { - CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" - - # Install test binaries and data in test package - install -d ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/libcustom_op_library.so ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/libcustom_op_get_const_input_test_library.so ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/libcustom_op_local_function.so ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/libcustom_op_invalid_library.so ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/libtest_execution_provider.so ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_customopregistration_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_global_thread_pools_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_logging_apis_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_mlas_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_perf_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_shared_lib_test ${D}${bindir}/${BPN}-tests - install -m 0755 ${B}/onnxruntime_test_all ${D}${bindir}/${BPN}-tests - cp $CP_ARGS ${B}/testdata ${D}${bindir}/${BPN}-tests - - # Install python tests and data - cp $CP_ARGS ${S}/onnxruntime/test/python/* ${D}${bindir}/${BPN}-tests - - # Install the Python package. - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - install -d ${D}${PYTHON_SITEPACKAGES_DIR} - cp $CP_ARGS ${B}/onnxruntime ${D}${PYTHON_SITEPACKAGES_DIR} - find ${D}${PYTHON_SITEPACKAGES_DIR} -name "libonnx*.so*" -exec rm {} \; - fi -} - -# Add Python package -PACKAGE_BEFORE_PN += "python3-${PN}" -FILES:python3-${PN} += "${PYTHON_SITEPACKAGES_DIR}" -RDEPENDS:python3-${PN} += "${PYTHON_RDEPENDS} onnxruntime" - -# Add Python tests package -PACKAGE_BEFORE_PN += "python3-${PN}-tests" -FILES:python3-${PN}-tests += "\ - ${bindir}/${BPN}-tests/*.py \ - ${bindir}/${BPN}-tests/contrib_ops \ - ${bindir}/${BPN}-tests/quantization \ - ${bindir}/${BPN}-tests/transformers \ -" -RDEPENDS:python3-${PN}-tests += "python3-${PN}" - -# Add tests package -PACKAGE_BEFORE_PN += "${PN}-tests" -FILES:${PN}-tests = "${bindir}/${BPN}-tests" -INSANE_SKIP:${PN}-tests += "libdir" - -# package unversioned .so files in PN (they are not dev symlinks) -FILES_SOLIBSDEV = "${libdir}/libonnxruntime.so" -FILES:${PN} += "${libdir}/libonnxruntime_providers_shared.so" - -INSANE_SKIP:${PN}-dbg += "libdir" diff --git a/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.23.2.bb b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.23.2.bb new file mode 100644 index 00000000..f47523ca --- /dev/null +++ b/meta-arago-extras/recipes-framework/onnxruntime/onnxruntime_1.23.2.bb @@ -0,0 +1,163 @@ +DESCRIPTION = "ONNX Runtime is a cross-platform, high performance machine learning inferencing framework" +SUMMARY = "ONNX Runtime Python package & C++ library" +HOMEPAGE = "https://www.onnxruntime.ai/" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0f7e3b1308cb5c00b372a6e78835732d" + +SRC_URI = "\ + git://github.com/microsoft/onnxruntime.git;protocol=https;branch=rel-1.23.2 \ + git://github.com/HowardHinnant/date.git;protocol=https;branch=master;name=date;destsuffix=${S}/_deps/date-src \ + git://github.com/pytorch/cpuinfo.git;protocol=https;branch=main;name=cpuinfo;destsuffix=${S}/_deps/pytorch_cpuinfo-src \ + git://github.com/google/flatbuffers.git;protocol=https;branch=master;name=flatbuffers;destsuffix=${S}/_deps/flatbuffers-src \ + git://github.com/dcleblanc/SafeInt.git;protocol=https;branch=master;name=safeint;destsuffix=${S}/_deps/safeint-src \ + git://github.com/eigen-mirror/eigen.git;protocol=https;branch=master;name=eigen;destsuffix=${S}/_deps/eigen3-src \ + git://github.com/google/nsync.git;protocol=https;branch=master;name=nsync;destsuffix=${S}/_deps/google_nsync-src \ + git://github.com/boostorg/mp11.git;protocol=https;branch=master;name=mp11;destsuffix=${S}/_deps/mp11-src \ + git://github.com/dmlc/dlpack.git;protocol=https;branch=main;name=dlpack;destsuffix=${S}/_deps/dlpack-src \ + git://github.com/abseil/abseil-cpp.git;protocol=https;branch=lts_2025_05_12;name=abseil-cpp;destsuffix=${S}/_deps/abseil_cpp-src \ + git://github.com/google/re2.git;protocol=https;branch=main;name=re2;destsuffix=${S}/_deps/re2-src \ +" +SRC_URI += "\ + file://0001-Added-the-missing-header-to-fix-uint32_t-compilation.patch \ +" + +SRCREV_FORMAT = "default" +SRCREV = "a83fc4d58cb48eb68890dd689f94f28288cf2278" +SRCREV_date = "6e921e1b1d21e84a5c82416ba7ecd98e33a436d0" +SRCREV_cpuinfo = "8a1772a0c5c447df2d18edf33ec4603a8c9c04a6" +SRCREV_flatbuffers = "0100f6a5779831fa7a651e4b67ef389a8752bd9b" +SRCREV_safeint = "4cafc9196c4da9c817992b20f5253ef967685bf8" +SRCREV_eigen = "1d8b82b0740839c0de7f1242a3585e3390ff5f33" +SRCREV_nsync = "13de152c2a1cd73ff4df97bd2c406b6d15d34af3" +SRCREV_mp11 = "0a0b5fb001ce0233ae3a6f99d849c0649e5a7361" +SRCREV_dlpack = "5c210da409e7f1e51ddf445134a4376fdbd70d7d" +SRCREV_abseil-cpp = "bc257a88f7c1939f24e0379f14a3589e926c950c" +SRCREV_re2 = "6dcd83d60f7944926bfd308cc13979fc53dd69ca" + +#Only compatible with armv7a, armv7ve, and aarch64 +COMPATIBLE_MACHINE = "(^$)" +COMPATIBLE_MACHINE:aarch64 = "(.*)" +COMPATIBLE_MACHINE:armv7a = "${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}" +COMPATIBLE_MACHINE:armv7ve = "${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}" + +DEPENDS += "\ + onnx \ + protobuf \ + protobuf-native \ + boost \ + nlohmann-json \ + microsoft-gsl \ +" + +PYTHON_DEPENDS = "\ + python3 \ + python3-numpy \ + python3-numpy-native \ + python3-pybind11 \ + python3-pybind11-native \ +" + +PYTHON_RDEPENDS = "\ + python3 \ + python3-onnx \ + python3-numpy \ + python3-protobuf \ + python3-coloredlogs \ + python3-flatbuffers \ + python3-sympy \ +" + +OECMAKE_SOURCEPATH = "${S}/cmake" + +PACKAGECONFIG ??= "python sharedlib unittests acl" + +PACKAGECONFIG[python] = "-Donnxruntime_ENABLE_PYTHON=ON, -Donnxruntime_ENABLE_PYTHON=OFF, ${PYTHON_DEPENDS}" +PACKAGECONFIG[sharedlib] = "-Donnxruntime_BUILD_SHARED_LIB=ON, -Donnxruntime_BUILD_SHARED_LIB=OFF" +PACKAGECONFIG[unittests] = "-Donnxruntime_BUILD_UNIT_TESTS=ON, -Donnxruntime_BUILD_UNIT_TESTS=OFF, googletest" + +PACKAGECONFIG[acl] = "-Donnxruntime_USE_ACL=ON, -Donnxruntime_USE_ACL=OFF, arm-compute-library" +PACKAGECONFIG[armnn] = "-Donnxruntime_USE_ARMNN=ON, -Donnxruntime_USE_ARMNN=OFF, armnn" +PACKAGECONFIG[armnn-relu] = "-Donnxruntime_ARMNN_RELU_USE_CPU=ON, -Donnxruntime_ARMNN_RELU_USE_CPU=OFF" +PACKAGECONFIG[armnn-bn] = "-Donnxruntime_ARMNN_BN_USE_CPU=ON, -Donnxruntime_ARMNN_BN_USE_CPU=OFF" + + +EXTRA_OECMAKE:append = " \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_SOURCE_DIR_DATE=${S}/_deps/date-src \ + -DFETCHCONTENT_SOURCE_DIR_PYTORCH_CPUINFO=${S}/_deps/pytorch_cpuinfo-src \ + -DFETCHCONTENT_SOURCE_DIR_PYTORCH_CLOG=${S}/_deps/pytorch_cpuinfo-src \ + -DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${S}/_deps/flatbuffers-src \ + -DFETCHCONTENT_SOURCE_DIR_SAFEINT=${S}/_deps/safeint-src \ + -DFETCHCONTENT_SOURCE_DIR_EIGEN3=${S}/_deps/eigen3-src \ + -DFETCHCONTENT_SOURCE_DIR_GOOGLE_NSYNC=${S}/_deps/google_nsync-src \ + -DFETCHCONTENT_SOURCE_DIR_ABSEIL_CPP=${S}/_deps/abseil_cpp-src \ + -DFETCHCONTENT_SOURCE_DIR_MP11=${S}/_deps/mp11-src \ + -DFETCHCONTENT_SOURCE_DIR_DLPACK=${S}/_deps/dlpack-src \ + -DFETCHCONTENT_SOURCE_DIR_RE2=${S}/_deps/re2-src \ +" +EXTRA_OECMAKE:append = " \ + -DONNX_CUSTOM_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/protoc \ + -Donnx_SOURCE_DIR=${RECIPE_SYSROOT}${PYTHON_SITEPACKAGES_DIR} \ + -DPython_INCLUDE_DIR=${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI} \ + --compile-no-warning-as-error \ + --log-level=VERBOSE \ +" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)} +inherit python3-dir cmake + +do_install:append() { + CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" + + # Install test binaries and data in test package + install -d ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/libcustom_op_library.so ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/libcustom_op_get_const_input_test_library.so ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/libcustom_op_local_function.so ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/libcustom_op_invalid_library.so ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/libtest_execution_provider.so ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_customopregistration_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_global_thread_pools_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_logging_apis_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_mlas_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_perf_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_shared_lib_test ${D}${bindir}/${BPN}-tests + install -m 0755 ${B}/onnxruntime_test_all ${D}${bindir}/${BPN}-tests + cp $CP_ARGS ${B}/testdata ${D}${bindir}/${BPN}-tests + + # Install python tests and data + cp $CP_ARGS ${S}/onnxruntime/test/python/* ${D}${bindir}/${BPN}-tests + + # Install the Python package. + if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + cp $CP_ARGS ${B}/onnxruntime ${D}${PYTHON_SITEPACKAGES_DIR} + find ${D}${PYTHON_SITEPACKAGES_DIR} -name "libonnx*.so*" -exec rm {} \; + fi +} + +# Add Python package +PACKAGE_BEFORE_PN += "python3-${PN}" +FILES:python3-${PN} += "${PYTHON_SITEPACKAGES_DIR}" +RDEPENDS:python3-${PN} += "${PYTHON_RDEPENDS} onnxruntime" + +# Add Python tests package +PACKAGE_BEFORE_PN += "python3-${PN}-tests" +FILES:python3-${PN}-tests += "\ + ${bindir}/${BPN}-tests/*.py \ + ${bindir}/${BPN}-tests/contrib_ops \ + ${bindir}/${BPN}-tests/quantization \ + ${bindir}/${BPN}-tests/transformers \ +" +RDEPENDS:python3-${PN}-tests += "python3-${PN}" + +# Add tests package +PACKAGE_BEFORE_PN += "${PN}-tests" +FILES:${PN}-tests = "${bindir}/${BPN}-tests" +INSANE_SKIP:${PN}-tests += "libdir" + +# package unversioned .so files in PN (they are not dev symlinks) +FILES_SOLIBSDEV = "${libdir}/libonnxruntime.so" +FILES:${PN} += "${libdir}/libonnxruntime_providers_shared.so" + +INSANE_SKIP:${PN}-dbg += "libdir"