Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supported WASI-NN streaming extension for NNRPC. #3386

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

arvganesh
Copy link

@arvganesh arvganesh commented May 6, 2024

Addresses #3319. This PR did the following for the following functions: ComputeSingle, GetOutputSingle, and FiniSingle.

  • Defined new RPCs and messages for the NNRPC server.
  • Client Side: added RPC call code path for ComputeSingle, GetOutputSingle, FiniSingle
  • Server Side: updated backend to call rust bindings for the given functions.
  • Tests: Added corresponding tests for the given functions using the OpenVINO-backend.

Copy link
Member

juntao commented May 6, 2024

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


@github-actions github-actions bot added c-CLI An issue related to WasmEdge CLI tools c-Plugin An issue related to WasmEdge Plugin c-Test An issue/PR to enhance the test suite c-WASI-NN labels May 6, 2024
@arvganesh arvganesh force-pushed the streaming branch 2 times, most recently from fa3a2b6 to b792f9a Compare May 6, 2024 04:58
Signed-off-by: Arvind Ganesh <[email protected]>
Signed-off-by: Arvind Ganesh <[email protected]>
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.84%. Comparing base (5939b99) to head (ad57383).
Report is 32 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3386      +/-   ##
==========================================
- Coverage   79.93%   79.84%   -0.09%     
==========================================
  Files         251      253       +2     
  Lines       34368    34937     +569     
  Branches     5966     6148     +182     
==========================================
+ Hits        27471    27897     +426     
- Misses       5507     5621     +114     
- Partials     1390     1419      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Arvind Ganesh <[email protected]>
@@ -155,12 +155,30 @@ TEST(WasiNNTest, OpenVINOBackend) {
EXPECT_TRUE(FuncInst->isHostFunction());
auto &HostFuncGetOutput =
dynamic_cast<WasmEdge::Host::WasiNNGetOutput &>(FuncInst->getHostFunc());
// Get the function "get_output_single".
Copy link
Member

Choose a reason for hiding this comment

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

I got confused. Why do you add these tests to the OpenVINO backend? The OpenVINO backend does not implement these LLM-related extension functions. That's why the unit tests will fail when trying to get the non-existing functions.

Req.set_resource_handle(Context);
Req.set_index(Index);
wasi_ephemeral_nn::GetOutputResult Res;
auto Status = Stub->GetOutput(&ClientContext, Req, &Res);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
auto Status = Stub->GetOutput(&ClientContext, Req, &Res);
auto Status = Stub->GetOutputSingle(&ClientContext, Req, &Res);

@hydai
Copy link
Member

hydai commented May 26, 2024

Hi @arvganesh
Are you going to finish this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-CLI An issue related to WasmEdge CLI tools c-Plugin An issue related to WasmEdge Plugin c-Test An issue/PR to enhance the test suite c-WASI-NN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants