Skip to content

Commit

Permalink
Fix Stats in jni_layer_llama.cpp (#4527)
Browse files Browse the repository at this point in the history
Summary:
In #4499 `Runner::Stats` is moved to `Stats`. Fixing it in JNI.

Pull Request resolved: #4527

Reviewed By: kirklandsign

Differential Revision: D60694093

Pulled By: larryliu0820

fbshipit-source-id: bb206e216ecc6b8a74e2cae4cd0f4d9ad03bdf27
  • Loading branch information
larryliu0820 authored and facebook-github-bot committed Aug 2, 2024
1 parent fbc183f commit 76f0b61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/android/jni/jni_layer_llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ExecuTorchLlamaCallbackJni
method(self(), s);
}

void onStats(const Runner::Stats& result) const {
void onStats(const Stats& result) const {
static auto cls = ExecuTorchLlamaCallbackJni::javaClassStatic();
static const auto method = cls->getMethod<void(jfloat)>("onStats");
double eval_time =
Expand Down Expand Up @@ -132,7 +132,7 @@ class ExecuTorchLlamaJni
prompt->toStdString(),
128,
[callback](std::string result) { callback->onResult(result); },
[callback](const Runner::Stats& result) { callback->onStats(result); });
[callback](const Stats& result) { callback->onStats(result); });
return 0;
}

Expand Down

0 comments on commit 76f0b61

Please sign in to comment.