[v2,00/34] Implemenation of revised ml/cnxk driver

Message ID 20230920072528.14185-1-syalavarthi@marvell.com (mailing list archive)
Headers
Series Implemenation of revised ml/cnxk driver |

Message

Srikanth Yalavarthi Sept. 20, 2023, 7:24 a.m. UTC
  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
  

Comments

Jerin Jacob Sept. 21, 2023, 12:15 p.m. UTC | #1
On Wed, Sep 20, 2023 at 12:55 PM Srikanth Yalavarthi
<syalavarthi@marvell.com> wrote:
>
> 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.


For new feature as when add it the patch, please update
doc/guides/rel_notes/release_23_11.rst
under "* **Updated Marvell cnxk ml driver.**"
  
Srikanth Yalavarthi Sept. 27, 2023, 6:39 p.m. UTC | #2
> -----Original Message-----
> From: Jerin Jacob <jerinjacobk@gmail.com>
> Sent: 21 September 2023 17:46
> To: Srikanth Yalavarthi <syalavarthi@marvell.com>
> Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao
> <sshankarnara@marvell.com>; Anup Prabhu <aprabhu@marvell.com>;
> Prince Takkar <ptakkar@marvell.com>; Srikanth Yalavarthi
> <syalavarthi@marvell.com>
> Subject: [EXT] Re: [PATCH v2 00/34] Implemenation of revised ml/cnxk driver
> 
> External Email
> 
> ----------------------------------------------------------------------
> On Wed, Sep 20, 2023 at 12:55 PM Srikanth Yalavarthi
> <syalavarthi@marvell.com> wrote:
> >
> > 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.
> 
> 
> For new feature as when add it the patch, please update
> doc/guides/rel_notes/release_23_11.rst
> under "* **Updated Marvell cnxk ml driver.**"

Updated. Added details in release notes.