From 120c938086cad2e6b2108611c04ed17862f476e5 Mon Sep 17 00:00:00 2001 From: Yongjoo Ahn Date: Tue, 29 Oct 2024 16:51:04 +0900 Subject: [PATCH] [api] Add a new nnfw `EXECUTORCH_LLAMA` - Add a enum for new nnfw `EXECUTORCH_LLAMA` Signed-off-by: Yongjoo Ahn --- c/include/ml-api-common.h | 1 + c/src/ml-api-inference-single.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/c/include/ml-api-common.h b/c/include/ml-api-common.h index cd9a6150..0dca611c 100644 --- a/c/include/ml-api-common.h +++ b/c/include/ml-api-common.h @@ -75,6 +75,7 @@ typedef enum { ML_NNFW_TYPE_NCNN = 18, /**< Tencent ncnn (Since 9.0) */ ML_NNFW_TYPE_TENSORRT = 19, /**< NVidia Tensor-RT (Since 9.0) */ ML_NNFW_TYPE_QNN = 20, /**< Qualcomm QNN (Qualcomm® AI Engine Direct) (Since 9.0) */ + ML_NNFW_TYPE_EXECUTORCH_LLAMA = 21, /**< ExecuTorch Llama runner */ ML_NNFW_TYPE_SNAP = 0x2001, /**< SNAP (Samsung Neural Acceleration Platform), only for Android. (Since 6.0) */ } ml_nnfw_type_e; diff --git a/c/src/ml-api-inference-single.c b/c/src/ml-api-inference-single.c index b0736a1d..7ef11498 100644 --- a/c/src/ml-api-inference-single.c +++ b/c/src/ml-api-inference-single.c @@ -112,6 +112,7 @@ static const char *ml_nnfw_subplugin_name[] = { [ML_NNFW_TYPE_NCNN] = "ncnn", [ML_NNFW_TYPE_TENSORRT] = "tensorrt", [ML_NNFW_TYPE_QNN] = "qnn", + [ML_NNFW_TYPE_EXECUTORCH_LLAMA] = "executorch-llama", NULL }; @@ -1957,6 +1958,7 @@ _ml_validate_model_file (const char *const *model, case ML_NNFW_TYPE_ONNX_RUNTIME: case ML_NNFW_TYPE_NCNN: case ML_NNFW_TYPE_TENSORRT: + case ML_NNFW_TYPE_EXECUTORCH_LLAMA: case ML_NNFW_TYPE_QNN: /** * We cannot check the file ext with NNFW.