DPDK patches and discussions
 help / color / mirror / Atom feed
From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Srikanth Yalavarthi <syalavarthi@marvell.com>
Cc: <dev@dpdk.org>, <sshankarnara@marvell.com>, <aprabhu@marvell.com>,
	<ptakkar@marvell.com>, <jerinj@marvell.com>
Subject: [PATCH v1 1/1] ml/cnxk: fix updating internal I/O info
Date: Sun, 29 Oct 2023 06:25:08 -0700	[thread overview]
Message-ID: <20231029132508.21530-1-syalavarthi@marvell.com> (raw)

Update scale factor in IO info of TVM models from metadata.

Fixes: 35c3e790b4a0 ("ml/cnxk: update internal info for TVM model")

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

diff --git a/drivers/ml/cnxk/mvtvm_ml_model.c b/drivers/ml/cnxk/mvtvm_ml_model.c
index d28bd88a08..cd9461302c 100644
--- a/drivers/ml/cnxk/mvtvm_ml_model.c
+++ b/drivers/ml/cnxk/mvtvm_ml_model.c
@@ -216,6 +216,7 @@ mvtvm_ml_model_io_info_set(struct cnxk_ml_model *model)
 		model->mvtvm.info.input[i].sz_q =
 			model->mvtvm.info.input[i].nb_elements *
 			rte_ml_io_type_size_get(model->mvtvm.info.input[i].qtype);
+		model->mvtvm.info.input[i].scale = metadata->input[i].scale;
 
 		model->mvtvm.info.total_input_sz_d += model->mvtvm.info.input[i].sz_d;
 		model->mvtvm.info.total_input_sz_q += model->mvtvm.info.input[i].sz_q;
@@ -256,6 +257,7 @@ mvtvm_ml_model_io_info_set(struct cnxk_ml_model *model)
 		model->mvtvm.info.output[i].sz_q =
 			model->mvtvm.info.output[i].nb_elements *
 			rte_ml_io_type_size_get(model->mvtvm.info.output[i].qtype);
+		model->mvtvm.info.output[i].scale = metadata->output[i].scale;
 
 		model->mvtvm.info.total_output_sz_d += model->mvtvm.info.output[i].sz_d;
 		model->mvtvm.info.total_output_sz_q += model->mvtvm.info.output[i].sz_q;
-- 
2.42.0


             reply	other threads:[~2023-10-29 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-29 13:25 Srikanth Yalavarthi [this message]
2023-11-03 16:40 ` [PATCH v2 " Srikanth Yalavarthi
2023-11-06 10:56   ` Anup Prabhu
2023-11-06 15:13 ` [PATCH v1 " Shivah Shankar Shankar Narayan Rao
2023-11-07  7:11   ` Jerin Jacob

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231029132508.21530-1-syalavarthi@marvell.com \
    --to=syalavarthi@marvell.com \
    --cc=aprabhu@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=ptakkar@marvell.com \
    --cc=sshankarnara@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).