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 <syalavar...@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 via email to