Skip to content

Commit 30b6464

Browse files
committed
fix for MSVC C7555 error
1 parent 24cf047 commit 30b6464

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mobile_back_tflite/cpp/backend_tflite/llm_pipeline.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ kv_cache_t LLMPipeline::BuildKVCache(tflite::Interpreter *interpreter) {
334334
void LLMPipeline::PrepareRunner(tflite::SignatureRunner *runner,
335335
kv_cache_t &kv_cache) {
336336
for (auto &[name, cache] : kv_cache) {
337-
TfLiteCustomAllocation allocation = {
338-
.data = static_cast<void *>(cache.data()),
339-
.bytes = cache.size() * sizeof(float)};
337+
TfLiteCustomAllocation allocation = {};
338+
allocation.data = static_cast<void *>(cache.data());
339+
allocation.bytes = cache.size() * sizeof(float);
340340
// Both input and output tensors are set to the same buffer. Not all
341341
// delegates support this in-place update. For those cases, we need to do
342342
// a ping-pong buffer and update the pointers between inference calls.

0 commit comments

Comments
 (0)