Skip to content

Commit

Permalink
Fix the ci error caused by llm benchmark test. (#1894)
Browse files Browse the repository at this point in the history
Signed-off-by: Ye Cao <[email protected]>
  • Loading branch information
dashanji authored May 21, 2024
1 parent c8de264 commit f0a0772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/llm-cache/tests/kv_state_cache_benchmark_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void benchmark_inference(std::vector<std::vector<int>>& tokens) {
std::chrono::duration<double> query_duration(0);

std::vector<int> inference_tokens;
std::map<int, std::pair<LLMKV, LLMKV>> kv_state_list;
std::vector<std::pair<LLMKV, LLMKV>> kv_state_list;
void* key_state = malloc(TENSORBYTES);
void* value_state = malloc(TENSORBYTES);

Expand Down Expand Up @@ -116,8 +116,8 @@ void benchmark_inference(std::vector<std::vector<int>>& tokens) {
}
for (auto& kv : kv_state_list) {
for (int currentLayer = 0; currentLayer < LAYER; currentLayer++) {
memcpy(key_state, kv.second.first.data, kv.second.first.length);
memcpy(value_state, kv.second.second.data, kv.second.second.length);
memcpy(key_state, kv.first.data, kv.first.length);
memcpy(value_state, kv.second.data, kv.second.length);
}
}
end = std::chrono::steady_clock::now();
Expand Down

0 comments on commit f0a0772

Please sign in to comment.