Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/models/llama/runner/static_attention_io_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,12 @@ class StaticAttentionIOManager {
* of the prompt and method's input length. Returns the position in the output
* that corresponds to the end of the prompt during the last inference.
*/
template <typename TokenT>
template <typename TokenT, typename LogitT>
size_t prefill(
executorch::runtime::Span<TokenT> tokens,
executorch::runtime::Span<TokenT> input_buffer,
executorch::runtime::Method& method,
std::function<void(executorch::runtime::Span<const float>)>
std::function<void(executorch::runtime::Span<const LogitT>)>
logits_callback = nullptr) {
ET_LOG(Info, "Prefilling at position %zu", input_pos_);
size_t input_len = input_buffer.size();
Expand Down Expand Up @@ -619,7 +619,7 @@ class StaticAttentionIOManager {
batch_len);
if (logits_callback) {
auto logits_tensor = method.get_output(0).toTensor();
auto* logits = logits_tensor.const_data_ptr<float>();
auto* logits = logits_tensor.const_data_ptr<LogitT>();
logits_callback(executorch::runtime::Span(
logits,
logits + batch_len * logits_tensor.size(logits_tensor.dim() - 1)));
Expand Down
Loading