DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/1] ml/cnxk: enable data caching for TVM models
@ 2024-01-07 15:20 Srikanth Yalavarthi
  2024-01-10 17:25 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Srikanth Yalavarthi @ 2024-01-07 15:20 UTC (permalink / raw)
  To: Srikanth Yalavarthi; +Cc: dev, aprabhu, sshankarnara, ptakkar

Enabled data caching for TVM models with MRVL only layers.

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 drivers/ml/cnxk/cn10k_ml_ops.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c
index 53700387335..834e55e88e9 100644
--- a/drivers/ml/cnxk/cn10k_ml_ops.c
+++ b/drivers/ml/cnxk/cn10k_ml_ops.c
@@ -996,8 +996,13 @@ cn10k_ml_layer_start(void *device, uint16_t model_id, const char *layer_name)
 	if (ret < 0) {
 		cn10k_ml_layer_stop(device, model_id, layer_name);
 	} else {
-		if (cn10k_mldev->cache_model_data && model->type == ML_CNXK_MODEL_TYPE_GLOW)
-			ret = cn10k_ml_cache_model_data(cnxk_mldev, layer);
+		if (cn10k_mldev->cache_model_data) {
+			if ((model->type == ML_CNXK_MODEL_TYPE_GLOW &&
+			     model->subtype == ML_CNXK_MODEL_SUBTYPE_GLOW_MRVL) ||
+			    (model->type == ML_CNXK_MODEL_TYPE_TVM &&
+			     model->subtype == ML_CNXK_MODEL_SUBTYPE_TVM_MRVL))
+				ret = cn10k_ml_cache_model_data(cnxk_mldev, layer);
+		}
 	}
 
 	return ret;
-- 
2.42.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] ml/cnxk: enable data caching for TVM models
  2024-01-07 15:20 [PATCH 1/1] ml/cnxk: enable data caching for TVM models Srikanth Yalavarthi
@ 2024-01-10 17:25 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2024-01-10 17:25 UTC (permalink / raw)
  To: Srikanth Yalavarthi; +Cc: dev, aprabhu, sshankarnara, ptakkar

On Sun, Jan 7, 2024 at 8:50 PM Srikanth Yalavarthi
<syalavarthi@marvell.com> wrote:
>
> Enabled data caching for TVM models with MRVL only layers.
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> ---
Applied to dpdk-next-net-mrvl/for-main. Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-10 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-07 15:20 [PATCH 1/1] ml/cnxk: enable data caching for TVM models Srikanth Yalavarthi
2024-01-10 17:25 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).