[1/1] ml/cnxk: enable data caching for all MRVL layers

Message ID 20240731060652.7937-1-syalavarthi@marvell.com (mailing list archive)
State New
Delegated to: Jerin Jacob
Headers
Series [1/1] ml/cnxk: enable data caching for all MRVL layers |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/Intel-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Srikanth Yalavarthi July 31, 2024, 6:06 a.m. UTC
From: Anup Prabhu <aprabhu@marvell.com>

Enabled data caching for all MRVL layers in TVM models

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

Patch

diff --git a/drivers/ml/cnxk/cn10k_ml_ops.c b/drivers/ml/cnxk/cn10k_ml_ops.c
index 834e55e88e9..f6b2baa0df0 100644
--- a/drivers/ml/cnxk/cn10k_ml_ops.c
+++ b/drivers/ml/cnxk/cn10k_ml_ops.c
@@ -996,13 +996,8 @@  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) {
-			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);
-		}
+		if (cn10k_mldev->cache_model_data)
+			ret = cn10k_ml_cache_model_data(cnxk_mldev, layer);
 	}
 
 	return ret;