Skip to content

Conversation

@anyj0527
Copy link
Member

  • Let single API handle flexible filter (executorch-llama)
  • Add a enum for new nnfw EXECUTORCH_LLAMA
  • Add a simple disabled test to show how to use executorch-llama with single api

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 29, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #574. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

@anyj0527 anyj0527 force-pushed the single-llama branch 2 times, most recently from 83c9879 to ed9a143 Compare October 29, 2024 08:24
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anyj0527, 💯 All CI checkers are successfully verified. Thanks.

ml_tensors_info_set_tensor_type (in_info, 0, ML_TENSOR_TYPE_UINT8);
ml_tensors_info_set_tensor_dimension (in_info, 0, dim);

ml_tensors_data_create (in_info, &in_data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about checking if in_data is created properly?

status = ml_tensors_data_create (in_info, &in_data);
EXPECT_EQ (status, ML_ERROR_NONE);

ml_tensors_info_set_tensor_dimension (in_info, 0, dim);

ml_tensors_data_create (in_info, &in_data);
ml_tensors_data_set_tensor_data (in_data, 0, prompt.c_str (), prompt.size () + 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's check the result, how about you?
EXPECT_EQ (status, ML_ERROR_NONE);

Copy link
Contributor

@songgot songgot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

goto error;
}
/* handle flexible single */
if (info->nnfw == ML_NNFW_TYPE_EXECUTORCH_LLAMA) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if there are more flexible filter, we may revise this part later.
The llama2c filter I created doesn't seem to be scalable due to API limitations, so I won't add it now.

Copy link
Contributor

@niley7464 niley7464 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

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 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Tizen version requirement

@jaeyun-jung
Copy link
Collaborator

Please do not merge this until tizen gbm release is done!

- Let single API handle flexible filter.

Signed-off-by: Yongjoo Ahn <[email protected]>
- Add a enum for new nnfw `EXECUTORCH_LLAMA`

Signed-off-by: Yongjoo Ahn <[email protected]>
@anyj0527 anyj0527 changed the title [api] Let single handle flexible filter [After #607][api/single] Support executorch-llama Feb 5, 2025
- Let single API handle executorch-llama as flexible filter
  thus do invoke-dynamic.

Signed-off-by: Yongjoo Ahn <[email protected]>
- Add a simple test to show how to use executorch-llama with single api

Signed-off-by: Yongjoo Ahn <[email protected]>
@anyj0527 anyj0527 marked this pull request as draft March 18, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants