[v2,1/1] ml/cnxk: fix name of TVM model with single layer
Checks
Commit Message
Name field of TVM model with single MRVL layer is
currently set to empty string. Update the name with
the field from metadata.
Fixes: 5cea2c67edfc ("ml/cnxk: update internal TVM model info structure")
Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
v2:
- Replaced rte_memcpy with strlcpy
drivers/ml/cnxk/mvtvm_ml_model.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
22/11/2023 18:13, Srikanth Yalavarthi:
> Name field of TVM model with single MRVL layer is
> currently set to empty string. Update the name with
> the field from metadata.
>
> Fixes: 5cea2c67edfc ("ml/cnxk: update internal TVM model info structure")
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
Applied
@@ -352,6 +352,10 @@ mvtvm_ml_model_info_set(struct cnxk_ml_dev *cnxk_mldev, struct cnxk_ml_model *mo
tvm_mrvl_model:
cn10k_ml_model_info_set(cnxk_mldev, model, &model->mvtvm.info,
&model->layer[0].glow.metadata);
+
+ metadata = &model->mvtvm.metadata;
+ strlcpy(info->name, metadata->model.name, TVMDP_NAME_STRLEN);
+
info->io_layout = RTE_ML_IO_LAYOUT_SPLIT;
}