From patchwork Wed Sep 20 07:24:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Yalavarthi X-Patchwork-Id: 158 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17057425E4; Wed, 20 Sep 2023 09:25:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D805F40E5E; Wed, 20 Sep 2023 09:25:35 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id AD2C0406B8 for ; Wed, 20 Sep 2023 09:25:34 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38K633lW002294 for ; Wed, 20 Sep 2023 00:25:33 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=ZSGpKUq244hfJLYW7u8yQqnFtdSQ8BzYfRz7tO65MUk=; b=eaWfBe1iXCtYlyV5xtgqQB4GkZmCtnPql/I/jEtqX0hq4zWOHiFX35oRyy3Itdl84Blg k7s7zzKBJndTU++WMvVDv6tHO9iXxRp+JRY/012KHu27b+la3dN2F/HXP6eUkqUVAuAW YKGyi9z/28S5nkzshbio8n6b4kVid6fR5C2jkJmZo/e3IdFx+VgBdsgfv0NEeaFXm6o/ MHRwhgCjHVsoKFCSM+/DAprRaV6M0RXpvuBwtIvISxHkvdYq8M51tZ8qhRdt4ZtrVBYb YrRZ8JkBJt0dn2C3f7R4IWDu2t5BTCkY31TihMp+8kI4UU4/qlf0iXVmSYXkR7n2KNNp PA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3t7u4d89j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 20 Sep 2023 00:25:33 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Sep 2023 00:25:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 20 Sep 2023 00:25:31 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id E35555B6926; Wed, 20 Sep 2023 00:25:31 -0700 (PDT) From: Srikanth Yalavarthi To: CC: , , , , Subject: [PATCH v2 00/34] Implemenation of revised ml/cnxk driver Date: Wed, 20 Sep 2023 00:24:51 -0700 Message-ID: <20230920072528.14185-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230830155927.3566-1-syalavarthi@marvell.com> References: <20230830155927.3566-1-syalavarthi@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: -7mP_8wdpcoDrDImReggeRgj0w0mzJoS X-Proofpoint-GUID: -7mP_8wdpcoDrDImReggeRgj0w0mzJoS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_02,2023-09-19_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch series is an implementation of revised ml/cnxk driver to support models compiled with TVM compiler framework. TVM models use a hybrid mode for execution, with regions of the model executing on the ML accelerator and the rest executing on CPU cores. This series of commits reorganizes the ml/cnxk driver and adds support to execute multiple regions with-in a TVM model. v2: - Fix xstats reporting - Fix issues reported by klocwork static analysis tool - Update external header inclusions v1: - Initial changes Anup Prabhu (1): ml/cnxk: enable fast-path ops for TVM models Prince Takkar (2): ml/cnxk: update internal TVM model info structure ml/cnxk: support quantize and dequantize callback Srikanth Yalavarthi (31): ml/cnxk: drop support for register polling ml/cnxk: drop use of RTE API for firmware read ml/cnxk: add generic cnxk device structure ml/cnxk: add generic model and layer structures ml/cnxk: add generic cnxk request structure ml/cnxk: add generic cnxk xstats structures ml/cnxk: rename cnxk ops function pointers struct ml/cnxk: update device handling functions ml/cnxk: update queue-pair handling functions ml/cnxk: update model load and unload functions ml/cnxk: update model start and stop functions ml/cnxk: update model utility functions ml/cnxk: update data quantization functions ml/cnxk: update device debug functions ml/cnxk: update device stats functions ml/cnxk: update device and model xstats functions ml/cnxk: update fast path functions ml/cnxk: move error handling to cnxk layer ml/cnxk: support config and close of tvmdp library ml/cnxk: add structures to support TVM model type ml/cnxk: add support for identify model type ml/cnxk: add support to parse TVM model objects ml/cnxk: fetch layer info and load TVM model ml/cnxk: update internal info for TVM model ml/cnxk: enable model unload in tvmdp library ml/cnxk: support start and stop for TVM models ml/cnxk: support device dump for TVM models ml/cnxk: enable reporting model runtime as xstats ml/cnxk: implement I/O alloc and free callbacks ml/cnxk: add generic ML malloc and free callback ml/cnxk: enable creation of mvtvm virtual device doc/guides/mldevs/cnxk.rst | 16 - drivers/ml/cnxk/cn10k_ml_dev.c | 477 ++--- drivers/ml/cnxk/cn10k_ml_dev.h | 457 +---- drivers/ml/cnxk/cn10k_ml_model.c | 383 ++-- drivers/ml/cnxk/cn10k_ml_model.h | 148 +- drivers/ml/cnxk/cn10k_ml_ocm.c | 109 +- drivers/ml/cnxk/cn10k_ml_ocm.h | 15 +- drivers/ml/cnxk/cn10k_ml_ops.c | 2915 ++++++++++-------------------- drivers/ml/cnxk/cn10k_ml_ops.h | 351 +++- drivers/ml/cnxk/cnxk_ml_dev.c | 22 + drivers/ml/cnxk/cnxk_ml_dev.h | 120 ++ drivers/ml/cnxk/cnxk_ml_io.c | 95 + drivers/ml/cnxk/cnxk_ml_io.h | 88 + drivers/ml/cnxk/cnxk_ml_model.c | 143 ++ drivers/ml/cnxk/cnxk_ml_model.h | 187 ++ drivers/ml/cnxk/cnxk_ml_ops.c | 1789 ++++++++++++++++++ drivers/ml/cnxk/cnxk_ml_ops.h | 85 + drivers/ml/cnxk/cnxk_ml_utils.c | 15 + drivers/ml/cnxk/cnxk_ml_utils.h | 17 + drivers/ml/cnxk/cnxk_ml_xstats.h | 152 ++ drivers/ml/cnxk/meson.build | 70 + drivers/ml/cnxk/mvtvm_ml_dev.c | 198 ++ drivers/ml/cnxk/mvtvm_ml_dev.h | 40 + drivers/ml/cnxk/mvtvm_ml_model.c | 322 ++++ drivers/ml/cnxk/mvtvm_ml_model.h | 88 + drivers/ml/cnxk/mvtvm_ml_ops.c | 581 ++++++ drivers/ml/cnxk/mvtvm_ml_ops.h | 74 + 27 files changed, 5964 insertions(+), 2993 deletions(-) create mode 100644 drivers/ml/cnxk/cnxk_ml_dev.c create mode 100644 drivers/ml/cnxk/cnxk_ml_dev.h create mode 100644 drivers/ml/cnxk/cnxk_ml_io.c create mode 100644 drivers/ml/cnxk/cnxk_ml_io.h create mode 100644 drivers/ml/cnxk/cnxk_ml_model.c create mode 100644 drivers/ml/cnxk/cnxk_ml_model.h create mode 100644 drivers/ml/cnxk/cnxk_ml_ops.c create mode 100644 drivers/ml/cnxk/cnxk_ml_ops.h create mode 100644 drivers/ml/cnxk/cnxk_ml_utils.c create mode 100644 drivers/ml/cnxk/cnxk_ml_utils.h create mode 100644 drivers/ml/cnxk/cnxk_ml_xstats.h create mode 100644 drivers/ml/cnxk/mvtvm_ml_dev.c create mode 100644 drivers/ml/cnxk/mvtvm_ml_dev.h create mode 100644 drivers/ml/cnxk/mvtvm_ml_model.c create mode 100644 drivers/ml/cnxk/mvtvm_ml_model.h create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.c create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.h