RE: [PATCH v5 39/39] ml/cnxk: enable support for configurable ocm page
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > To: Srikanth Yalavarthi > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran ; > Anup Prabhu ; Prince Takkar ; > Parijat Shukla > Subject: [PATCH v5 39/39] ml/cnxk: enable support for configurable ocm page > > Enabled support for configurable OCM page size. A new device argument > "ocm_page_size" is added to specify the page size for OCM management. > Supported page sizes are 1KB, 2KB, 4KB, 8KB and 16KB. Default page size is > 16KB. > > Signed-off-by: Srikanth Yalavarthi > --- > doc/guides/mldevs/cnxk.rst | 16 + > drivers/ml/cnxk/cn10k_ml_dev.c | 61 > drivers/ml/cnxk/cn10k_ml_dev.h | 3 ++ > drivers/ml/cnxk/cn10k_ml_model.c | 6 ++-- > drivers/ml/cnxk/cn10k_ml_ocm.c | 18 +++--- > drivers/ml/cnxk/cn10k_ml_ocm.h | 14 +++- > drivers/ml/cnxk/cn10k_ml_ops.c | 17 ++--- > 7 files changed, 107 insertions(+), 28 deletions(-) > Acked-by: Prince Takkar <>
RE: [PATCH v5 32/39] ml/cnxk: enable support to get xstats in cycles
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > To: Srikanth Yalavarthi > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran ; > Anup Prabhu ; Prince Takkar ; > Parijat Shukla > Subject: [PATCH v5 32/39] ml/cnxk: enable support to get xstats in cycles > > Enabled support to retrieve xstats in either cycles or ns. > Access to sclk is enabled only if an RVU device is probed during > initialization. > Driver would return the xstats in nanoseconds only when an RVU device is > probed, else would fallback to cycles. > > Signed-off-by: Srikanth Yalavarthi > --- > drivers/ml/cnxk/cn10k_ml_ops.c | 19 +-- > 1 file changed, 17 insertions(+), 2 deletions(-) > Acked-by: Prince Takkar <>
RE: [PATCH v5 38/39] ml/cnxk: add user guide for marvell cnxk ml driver
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > To: Thomas Monjalon ; Srikanth Yalavarthi > > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran ; > Anup Prabhu ; Prince Takkar ; > Parijat Shukla > Subject: [PATCH v5 38/39] ml/cnxk: add user guide for marvell cnxk ml driver > > Added user guide for Marvell cnxk ML driver for Marvell Octeon cnxk Soc > family. > Added details about device initialization, debug options and runtime device > args > supported by the driver. > > Signed-off-by: Srikanth Yalavarthi > --- > MAINTAINERS | 1 + > doc/guides/index.rst| 1 + > doc/guides/mldevs/cnxk.rst | 238 > doc/guides/mldevs/index.rst | 14 +++ > 4 files changed, 254 insertions(+) > create mode 100644 doc/guides/mldevs/cnxk.rst create mode 100644 > doc/guides/mldevs/index.rst > Acked-by: Prince Takkar <>
RE: [PATCH v5 28/39] ml/cnxk: add internal function for sync mode run
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > To: Srikanth Yalavarthi > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran ; > Anup Prabhu ; Prince Takkar ; > Parijat Shukla > Subject: [PATCH v5 28/39] ml/cnxk: add internal function for sync mode run > > Added internal function to execute ML inference requests in synchronous mode. > Sync mode inference execution is used to launch inference requests without > using a queue-pair. > > Signed-off-by: Srikanth Yalavarthi > --- > drivers/ml/cnxk/cn10k_ml_ops.c | 53 ++ > drivers/ml/cnxk/cn10k_ml_ops.h | 1 + > 2 files changed, 54 insertions(+) > Acked-by: Prince Takkar <>
RE: [PATCH v5 35/39] ml/cnxk: add support to select OCM allocation mode
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > To: Srikanth Yalavarthi > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran ; > Anup Prabhu ; Prince Takkar ; > Parijat Shukla > Subject: [PATCH v5 35/39] ml/cnxk: add support to select OCM allocation mode > > Added device argument "ocm_alloc_mode" to select OCM allocation method > during model start. Two modes are supported by the driver. > > Added implementation for ocm_alloc_mode lowest as default. > > ocm_alloc_mode: > lowest: Allocate from first available free slot / lowest > tile ID in OCM (default) > largest: Allocate from a slot with maximum free memory > > Signed-off-by: Srikanth Yalavarthi > --- > drivers/ml/cnxk/cn10k_ml_dev.c | 45 +- > drivers/ml/cnxk/cn10k_ml_ocm.c | 6 ++--- drivers/ml/cnxk/cn10k_ml_ocm.h | > 3 +++ > 3 files changed, 44 insertions(+), 10 deletions(-) > Acked-by: Prince Takkar <>
RE: [PATCH v5 00/39] Implementation of ML CNXK driver
> -Original Message- > From: Srikanth Yalavarthi > Sent: Tuesday, February 7, 2023 9:37 PM > Cc: dev@dpdk.org; Shivah Shankar Shankar Narayan Rao > ; Jerin Jacob Kollanukkaran > ; Anup Prabhu ; Prince Takkar > ; Parijat Shukla ; Srikanth > Yalavarthi > Subject: [PATCH v5 00/39] Implementation of ML CNXK driver > > Marvell ML CNXK Driver > -- > > This patch series implements common Machine Learning (ML) ROC code and > driver for Marvell Octeon 10 (cnxk) platform. ML inferencing is supported on > cnxk platform through an integrated ML inferencing processor. The current > driver supports programming the ML hardware engine through offload > mode. > > All APIs proposed in the DPDK ML device specification are supported on the > cnxk platform. > > v5: > * Updated model_id to uint16_t > * Updated release notes for 23.03 > > v4: > * Update function names of ML common code > * Added support for configurable OCM page size > * Minor typo fixes > > v3: > * Skip installation of internal headers > * Update internal comments and code cleanup > > v2: > * Typo and formatting fixes > > Srikanth Yalavarthi (39): > common/cnxk: add ML headers and ROC code for cnxk > ml/cnxk: add skeleton for ML cnxk driver > ml/cnxk: enable probe and remove of ML device > ml/cnxk: add driver support to get device info > ml/cnxk: add support for configure and close > ml/cnxk: parse ML firmware path from device args > ml/cnxk: enable firmware load and device reset > ml/cnxk: enable support for simulator environment > ml/cnxk: enable support for device start and stop > ml/cnxk: add support to create device queue-pairs > ml/cnxk: add functions to load and unload models > ml/cnxk: enable validity checks for model metadata > ml/cnxk: add internal structures for derived info > ml/cnxk: add internal structures for tiles and OCM > ml/cnxk: add structures for slow and fast path JDs > ml/cnxk: find OCM mask and page slots for a model > ml/cnxk: add support to reserve and free OCM pages > ml/cnxk: enable support to start an ML model > ml/cnxk: enable support to stop an ML models > ml/cnxk: enable support to get model information > ml/cnxk: enable support to update model params > ml/cnxk: add support to get IO buffer sizes > ml/cnxk: enable quantization and dequantization > ml/cnxk: enable support to dump device debug info > ml/cnxk: add driver support for device selftest > ml/cnxk: enqueue a burst of inference requests > ml/cnxk: dequeue a burst of inference requests > ml/cnxk: add internal function for sync mode run > ml/cnxk: enable support for firmware error codes > ml/cnxk: add support to get and reset device stats > ml/cnxk: add support to handle extended dev stats > ml/cnxk: enable support to get xstats in cycles > ml/cnxk: add support to report DPE FW warnings > ml/cnxk: add support to enable model data caching > ml/cnxk: add support to select OCM allocation mode > ml/cnxk: add support to use lock during jcmd enq > ml/cnxk: add support to select poll memory region > ml/cnxk: add user guide for marvell cnxk ml driver > ml/cnxk: enable support for configurable ocm page > > MAINTAINERS| 11 + > doc/guides/index.rst |1 + > doc/guides/mldevs/cnxk.rst | 254 +++ > doc/guides/mldevs/index.rst| 14 + > doc/guides/rel_notes/release_23_03.rst |7 + > drivers/common/cnxk/hw/ml.h| 170 ++ > drivers/common/cnxk/meson.build|1 + > drivers/common/cnxk/roc_api.h |4 + > drivers/common/cnxk/roc_constants.h|2 + > drivers/common/cnxk/roc_dev_priv.h |1 + > drivers/common/cnxk/roc_ml.c | 626 +++ > drivers/common/cnxk/roc_ml.h | 152 ++ > drivers/common/cnxk/roc_ml_priv.h | 24 + > drivers/common/cnxk/roc_platform.c |1 + > drivers/common/cnxk/roc_platform.h |2 + > drivers/common/cnxk/roc_priv.h |3 + > drivers/common/cnxk/version.map| 29 + > drivers/meson.build|1 + > drivers/ml/cnxk/cn10k_ml_dev.c | 870 + > drivers/ml/cnxk/cn10k_ml_dev.h | 429 + > drivers/ml/cnxk/cn10k_ml_model.c | 413 + > drivers/ml/cnxk/cn10k_ml_model.h | 508 ++ > drivers/ml/cnxk/cn10k_ml_ocm.c | 519 ++ > drivers/ml/cnxk/cn10k_ml_ocm.h | 85 + > drivers/ml/cnxk/cn10k_ml_ops.c | 2316 > drivers/ml/cnxk/cn10k_ml_ops.h | 94 + > drivers/ml/cnxk/meson.build| 32 + > drivers/ml/meson.build