Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133409/?format=api
http://patchwork.dpdk.org/api/patches/133409/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231026124347.22477-19-syalavarthi@marvell.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20231026124347.22477-19-syalavarthi@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231026124347.22477-19-syalavarthi@marvell.com", "date": "2023-10-26T12:43:27", "name": "[v9,18/34] ml/cnxk: support config and close of tvmdp library", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "b867f7f92a96872e17d46eee283d1c13ba1ad5b9", "submitter": { "id": 2480, "url": "http://patchwork.dpdk.org/api/people/2480/?format=api", "name": "Srikanth Yalavarthi", "email": "syalavarthi@marvell.com" }, "delegate": { "id": 310, "url": "http://patchwork.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231026124347.22477-19-syalavarthi@marvell.com/mbox/", "series": [ { "id": 30002, "url": "http://patchwork.dpdk.org/api/series/30002/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30002", "date": "2023-10-26T12:43:09", "name": "Implementation of revised ml/cnxk driver", "version": 9, "mbox": "http://patchwork.dpdk.org/series/30002/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/133409/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/133409/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2D2C643208;\n\tThu, 26 Oct 2023 14:48:13 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 581A942E9C;\n\tThu, 26 Oct 2023 14:44:25 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 2CAE442E0C\n for <dev@dpdk.org>; Thu, 26 Oct 2023 14:44:03 +0200 (CEST)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 39QAKqcY006841; Thu, 26 Oct 2023 05:44:00 -0700", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3txcsr25pj-9\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 26 Oct 2023 05:44:00 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 26 Oct 2023 05:43:58 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 26 Oct 2023 05:43:58 -0700", "from ml-host-33.caveonetworks.com (unknown [10.110.143.233])\n by maili.marvell.com (Postfix) with ESMTP id 973613F70C1;\n Thu, 26 Oct 2023 05:43:57 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=gMRozJKY7Ntb7Et2jFMq2kpzjKhpRC3klSZYIfWeAvQ=;\n b=kFXaMZGo7Spx84A3CpbWFAmzNQ2uK8ngWG+JRgs6kKC7mgsOj6IBclaw8EWipyRwoyMY\n lKfcxoliVC5HR9jwKQFWUdfsINe5IEBahRoLt9kjGI9Xg6nCvs9i2RLJhGEZY86Otso9\n D6SFcHauR0LyOLf55Z5DsyLq9qNRw2hpUhpiiPdVhqNBM0MbqBOnUfkZVmyXG0HT5pyS\n f7paTMQDKFXPsPTFhTk/KMGZHAVeA+JvNtffYN7u8C0PSkUUCAtkIW3ZCugw/ko4xNdj\n 2SrwcLs9wUaNTBHZTYjlQmgNQm9ZEaLXizsMKVz4X5koh2Sy9rmS1rC+4VaUtuj6eHLa nw==", "From": "Srikanth Yalavarthi <syalavarthi@marvell.com>", "To": "Ruifeng Wang <ruifeng.wang@arm.com>, Bruce Richardson\n <bruce.richardson@intel.com>, Srikanth Yalavarthi <syalavarthi@marvell.com>", "CC": "<dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,\n <ptakkar@marvell.com>", "Subject": "[PATCH v9 18/34] ml/cnxk: support config and close of tvmdp library", "Date": "Thu, 26 Oct 2023 05:43:27 -0700", "Message-ID": "<20231026124347.22477-19-syalavarthi@marvell.com>", "X-Mailer": "git-send-email 2.42.0", "In-Reply-To": "<20231026124347.22477-1-syalavarthi@marvell.com>", "References": "<20230830155927.3566-1-syalavarthi@marvell.com>\n <20231026124347.22477-1-syalavarthi@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "l6eqiFHYwT0SszUNn6auTEJsdIADIfwo", "X-Proofpoint-GUID": "l6eqiFHYwT0SszUNn6auTEJsdIADIfwo", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-10-26_10,2023-10-26_01,2023-05-22_02", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Added support to configure and close TVMDP library based\non ML device configuration options.\n\nUpdated meson build to enable Jansson, TVM runtime, TVMDP\nlibrary as build dependencies.\n\nSigned-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>\n---\n config/arm/arm64_cn10k_linux_gcc | 1 +\n config/arm/arm64_cn9k_linux_gcc | 1 +\n doc/guides/mldevs/cnxk.rst | 169 +++++++++++++++++++++++++++++++\n drivers/ml/cnxk/cnxk_ml_ops.c | 7 ++\n drivers/ml/cnxk/cnxk_ml_ops.h | 6 ++\n drivers/ml/cnxk/meson.build | 58 +++++++++++\n drivers/ml/cnxk/mvtvm_ml_ops.c | 41 ++++++++\n drivers/ml/cnxk/mvtvm_ml_ops.h | 19 ++++\n drivers/ml/cnxk/mvtvm_ml_stubs.c | 26 +++++\n drivers/ml/cnxk/mvtvm_ml_stubs.h | 15 +++\n 10 files changed, 343 insertions(+)\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.c\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_ops.h\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_stubs.c\n create mode 100644 drivers/ml/cnxk/mvtvm_ml_stubs.h", "diff": "diff --git a/config/arm/arm64_cn10k_linux_gcc b/config/arm/arm64_cn10k_linux_gcc\nindex 05d2d64cf2..fa904af5d0 100644\n--- a/config/arm/arm64_cn10k_linux_gcc\n+++ b/config/arm/arm64_cn10k_linux_gcc\n@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-gcc-ar'\n strip = 'aarch64-linux-gnu-strip'\n pkgconfig = 'aarch64-linux-gnu-pkg-config'\n pcap-config = ''\n+cmake = 'cmake'\n \n [host_machine]\n system = 'linux'\ndiff --git a/config/arm/arm64_cn9k_linux_gcc b/config/arm/arm64_cn9k_linux_gcc\nindex 7416454de0..646ce4b5d3 100644\n--- a/config/arm/arm64_cn9k_linux_gcc\n+++ b/config/arm/arm64_cn9k_linux_gcc\n@@ -5,6 +5,7 @@ ar = 'aarch64-linux-gnu-gcc-ar'\n strip = 'aarch64-linux-gnu-strip'\n pkgconfig = 'aarch64-linux-gnu-pkg-config'\n pcap-config = ''\n+cmake = 'cmake'\n \n [host_machine]\n system = 'linux'\ndiff --git a/doc/guides/mldevs/cnxk.rst b/doc/guides/mldevs/cnxk.rst\nindex 1834b1f905..a4d8903896 100644\n--- a/doc/guides/mldevs/cnxk.rst\n+++ b/doc/guides/mldevs/cnxk.rst\n@@ -46,6 +46,175 @@ or cross-compiled on an x86 platform.\n \n Refer to :doc:`../platform/cnxk` for instructions to build your DPDK application.\n \n+Compilation Prerequisites\n+-------------------------\n+\n+This driver requires external libraries to optionally enable support for\n+models compiled using Apache TVM framework. The following dependencies are\n+not part of DPDK and must be installed separately:\n+\n+- **Jansson**\n+\n+ This library enables support to parse and read JSON files.\n+\n+- **DLPack**\n+\n+ This library provides headers for open in-memory tensor structures.\n+\n+.. note::\n+\n+ DPDK CNXK ML driver requires DLPack version 0.7\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/dmlc/dlpack.git\n+ cd dlpack\n+ git checkout v0.7 -b v0.7\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DBUILD_MOCK=OFF\n+ make -C build\n+ make -C build install\n+\n+*Cross-compiling for AArch64*\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/dmlc/dlpack.git\n+ cd dlpack\n+ git checkout v0.7 -b v0.7\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix>\n+ -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \\\n+ -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \\\n+ -DBUILD_MOCK=OFF\n+ make -C build\n+ make -C build install\n+\n+- **DMLC**\n+\n+ This is a common bricks library for building scalable and portable distributed\n+ machine learning.\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/dmlc/dmlc-core.git\n+ cd dmlc-core\n+ git checkout main\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DCMAKE_C_FLAGS=\"-fpermissive\" \\\n+ -DCMAKE_CXX_FLAGS=\"-fpermissive\" \\\n+ -DUSE_OPENMP=OFF\n+ make -C build\n+ make -C build install\n+\n+*Cross-compiling for AArch64*\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/dmlc/dmlc-core.git\n+ cd dmlc-core\n+ git checkout main\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \\\n+ -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \\\n+ -DCMAKE_C_FLAGS=\"-fpermissive\" \\\n+ -DCMAKE_CXX_FLAGS=\"-fpermissive\" \\\n+ -DUSE_OPENMP=OFF\n+ make -C build\n+ make -C build install\n+\n+- **TVM**\n+\n+ Apache TVM provides a runtime libraries used to execute models on CPU cores\n+ or hardware accelerators.\n+\n+.. note::\n+\n+ DPDK CNXK ML driver requires TVM version 0.10.0\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/apache/tvm.git\n+ cd tvm\n+ git checkout v0.11.0 -b v0.11.0\n+ git submodule update --init\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DBUILD_STATIC_RUNTIME=OFF\n+ make -C build\n+ make -C build install\n+\n+*Cross-compiling for AArch64*\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/apache/tvm.git\n+ cd tvm\n+ git checkout v0.11.0 -b v0.11.0\n+ git submodule update --init\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \\\n+ -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \\\n+ -DMACHINE_NAME=aarch64-linux-gnu \\\n+ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \\\n+ -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \\\n+ -DBUILD_STATIC_RUNTIME=OFF\n+ make -C build\n+ make -C build install\n+\n+- **TVMDP**\n+\n+ Marvell's `TVM Dataplane Library <https://github.com/MarvellEmbeddedProcessors/tvmdp>`_\n+ works as an interface between TVM runtime and DPDK drivers. TVMDP library\n+ provides a simplified C interface for TVM's runtime based on C++.\n+\n+.. note::\n+\n+ TVMDP library is dependent on TVM, dlpack, jansson and dmlc-core libraries.\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/MarvellEmbeddedProcessors/tvmdp.git\n+ cd tvmdp\n+ git checkout main\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DBUILD_SHARED_LIBS=ON\n+ make -C build\n+ make -C build install\n+\n+*Cross-compiling for AArch64*\n+\n+.. code-block:: console\n+\n+ git clone https://github.com/MarvellEmbeddedProcessors/tvmdp.git\n+ cd tvmdp\n+ git checkout main\n+ cmake -S ./ -B build \\\n+ -DCMAKE_INSTALL_PREFIX=<install_prefix> \\\n+ -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \\\n+ -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \\\n+ -DCMAKE_FIND_ROOT_PATH=<install_prefix> \\\n+ -DBUILD_SHARED_LIBS=ON\n+ make -C build\n+ make -C build install\n+\n+- **libarchive**\n+\n+ Apached TVM framework generates compiled models as tar archives. This\n+ library enables support to decompress and read archive files in tar,\n+ xz and other formats.\n+\n+.. note::\n+\n+ In order for meson to find the dependencies during the configure stage,\n+ it is required to add the cmake paths <install_prefix>/lib/cmake/dlpack,\n+ <install_prefix>/lib/cmake/dmlc and <install_prefix>/lib/cmake/tvm to\n+ CMAKE_PREFIX_PATH and <install_prefix>/lib/pkgconfig to PKG_CONFIG_PATH.\n \n Initialization\n --------------\ndiff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c\nindex 3d21a31374..33d13d5514 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.c\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.c\n@@ -564,6 +564,10 @@ cnxk_ml_dev_configure(struct rte_ml_dev *dev, const struct rte_ml_dev_config *co\n \t\tgoto error;\n \t}\n \n+\tret = mvtvm_ml_dev_configure(cnxk_mldev, conf);\n+\tif (ret != 0)\n+\t\tgoto error;\n+\n \t/* Set device capabilities */\n \tcnxk_mldev->max_nb_layers =\n \t\tcnxk_mldev->cn10k_mldev.fw.req->cn10k_req.jd.fw_load.cap.s.max_models;\n@@ -624,6 +628,9 @@ cnxk_ml_dev_close(struct rte_ml_dev *dev)\n \t/* Un-initialize xstats */\n \tcnxk_ml_xstats_uninit(cnxk_mldev);\n \n+\tif (mvtvm_ml_dev_close(cnxk_mldev) != 0)\n+\t\tplt_err(\"Failed to close MVTVM ML Device\");\n+\n \tif (cn10k_ml_dev_close(cnxk_mldev) != 0)\n \t\tplt_err(\"Failed to close CN10K ML Device\");\n \ndiff --git a/drivers/ml/cnxk/cnxk_ml_ops.h b/drivers/ml/cnxk/cnxk_ml_ops.h\nindex d0c126f34b..b22a2b0d95 100644\n--- a/drivers/ml/cnxk/cnxk_ml_ops.h\n+++ b/drivers/ml/cnxk/cnxk_ml_ops.h\n@@ -12,6 +12,12 @@\n \n #include \"cn10k_ml_ops.h\"\n \n+#ifdef RTE_MLDEV_CNXK_ENABLE_MVTVM\n+#include \"mvtvm_ml_ops.h\"\n+#else\n+#include \"mvtvm_ml_stubs.h\"\n+#endif\n+\n /* Request structure */\n struct cnxk_ml_req {\n \t/* Device specific request */\ndiff --git a/drivers/ml/cnxk/meson.build b/drivers/ml/cnxk/meson.build\nindex 5d27a87d91..1ef2b3c335 100644\n--- a/drivers/ml/cnxk/meson.build\n+++ b/drivers/ml/cnxk/meson.build\n@@ -7,6 +7,37 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64')\n subdir_done()\n endif\n \n+enable_mvtvm = true\n+\n+if not jansson_dep.found()\n+ message('drivers/ml/cnxk: jansson not found')\n+ enable_mvtvm = false\n+endif\n+\n+dlpack_dep = dependency('dlpack', method: 'cmake', required: false, cmake_args: 'CONFIG')\n+if not dlpack_dep.found()\n+ message('drivers/ml/cnxk: dlpack not found')\n+ enable_mvtvm = false\n+endif\n+\n+dmlc_dep = dependency('dmlc', method: 'cmake', required: false, cmake_args: 'CONFIG')\n+if not dmlc_dep.found()\n+ message('drivers/ml/cnxk: dmlc not found')\n+ enable_mvtvm = false\n+endif\n+\n+tvm_dep = dependency('tvm', method: 'cmake', required: false, cmake_args: 'CONFIG', modules : ['tvm::tvm_runtime'])\n+if not tvm_dep.found()\n+ message('drivers/ml/cnxk: tvm_runtime not found')\n+ enable_mvtvm = false\n+endif\n+\n+tvmdp_dep = dependency('tvmdp', method: 'pkg-config', required: false)\n+if not tvmdp_dep.found()\n+ message('drivers/ml/cnxk: tvmdp not found')\n+ enable_mvtvm = false\n+endif\n+\n sources = files(\n 'cn10k_ml_dev.c',\n 'cn10k_ml_ops.c',\n@@ -21,6 +52,33 @@ sources = files(\n \n deps += ['mldev', 'common_cnxk', 'kvargs', 'hash']\n \n+if enable_mvtvm\n+\n+dpdk_conf.set('RTE_MLDEV_CNXK_ENABLE_MVTVM', 1)\n+\n+sources += files(\n+ 'mvtvm_ml_ops.c',\n+)\n+\n+ext_deps += jansson_dep\n+ext_deps += dlpack_dep\n+ext_deps += dmlc_dep\n+ext_deps += tvm_dep\n+ext_deps += tvmdp_dep\n+ext_deps += cc.find_library('stdc++', required: true)\n+\n+deps += ['bus_vdev']\n+\n+message('drivers/ml/cnxk: Enabled TVM model support')\n+else\n+message('drivers/ml/cnxk: Disabled TVM model support')\n+\n+sources += files(\n+ 'mvtvm_ml_stubs.c',\n+)\n+\n+endif\n+\n require_iova_in_mbuf = false\n \n if get_option('buildtype').contains('debug')\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_ops.c b/drivers/ml/cnxk/mvtvm_ml_ops.c\nnew file mode 100644\nindex 0000000000..88c6d5a864\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_ops.c\n@@ -0,0 +1,41 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#include <rte_common.h>\n+#include <rte_cycles.h>\n+#include <rte_mldev.h>\n+#include <rte_mldev_pmd.h>\n+\n+#include \"cnxk_ml_dev.h\"\n+#include \"cnxk_ml_ops.h\"\n+\n+int\n+mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf)\n+{\n+\tint ret;\n+\n+\tRTE_SET_USED(conf);\n+\n+\t/* Configure TVMDP library */\n+\tret = tvmdp_configure(cnxk_mldev->mldev->data->nb_models, rte_get_tsc_cycles);\n+\tif (ret != 0)\n+\t\tplt_err(\"TVMDP configuration failed, error = %d\\n\", ret);\n+\n+\treturn ret;\n+}\n+\n+int\n+mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev)\n+{\n+\tint ret;\n+\n+\tRTE_SET_USED(cnxk_mldev);\n+\n+\t/* Close TVMDP library configuration */\n+\tret = tvmdp_close();\n+\tif (ret != 0)\n+\t\tplt_err(\"TVMDP close failed, error = %d\\n\", ret);\n+\n+\treturn ret;\n+}\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_ops.h b/drivers/ml/cnxk/mvtvm_ml_ops.h\nnew file mode 100644\nindex 0000000000..305b4681ed\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_ops.h\n@@ -0,0 +1,19 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#ifndef _MVTVM_ML_OPS_H_\n+#define _MVTVM_ML_OPS_H_\n+\n+#include <dlpack/dlpack.h>\n+\n+#include <tvmdp.h>\n+\n+#include <rte_mldev.h>\n+\n+struct cnxk_ml_dev;\n+\n+int mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf);\n+int mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev);\n+\n+#endif /* _MVTVM_ML_OPS_H_ */\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_stubs.c b/drivers/ml/cnxk/mvtvm_ml_stubs.c\nnew file mode 100644\nindex 0000000000..a31cd39cfa\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_stubs.c\n@@ -0,0 +1,26 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#include <rte_mldev.h>\n+\n+#include \"mvtvm_ml_stubs.h\"\n+\n+#include \"cnxk_ml_dev.h\"\n+\n+int\n+mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf)\n+{\n+\tRTE_SET_USED(cnxk_mldev);\n+\tRTE_SET_USED(conf);\n+\n+\treturn 0;\n+}\n+\n+int\n+mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev)\n+{\n+\tRTE_SET_USED(cnxk_mldev);\n+\n+\treturn 0;\n+}\ndiff --git a/drivers/ml/cnxk/mvtvm_ml_stubs.h b/drivers/ml/cnxk/mvtvm_ml_stubs.h\nnew file mode 100644\nindex 0000000000..11c56e5144\n--- /dev/null\n+++ b/drivers/ml/cnxk/mvtvm_ml_stubs.h\n@@ -0,0 +1,15 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2023 Marvell.\n+ */\n+\n+#ifndef _MVTVM_ML_STUBS_H_\n+#define _MVTVM_ML_STUBS_H_\n+\n+#include <rte_mldev.h>\n+\n+struct cnxk_ml_dev;\n+\n+int mvtvm_ml_dev_configure(struct cnxk_ml_dev *cnxk_mldev, const struct rte_ml_dev_config *conf);\n+int mvtvm_ml_dev_close(struct cnxk_ml_dev *cnxk_mldev);\n+\n+#endif /* _MVTVM_ML_STUBS_H_ */\n", "prefixes": [ "v9", "18/34" ] }{ "id": 133409, "url": "