Skip to content

Commit

Permalink
make the comment easier to understand
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Hill <[email protected]>
  • Loading branch information
guschmue and RyanUnderhill authored Feb 20, 2025
1 parent f08f30a commit ec1c6da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/kv_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ DefaultKeyValueCache::DefaultKeyValueCache(State& state)
sb_kv_caches_.empty() ? OrtValue::CreateTensor(Allocator(), shape_, type_)
: sb_kv_caches_[i]->CreateTensorOnStaticBuffer(shape_, type_));
// Zero the memory so we don't leak any data from the previous run
// WebGPU device has no Zero() implementation yet. Since this zeroing is optional we disable it for WebGPU for now
if (Device().GetType() != DeviceType::WEBGPU) {
// ort c api does not have a method to update device memory - temporarily disable.
ByteWrapTensor(Device(), *presents_.back()).Zero();
}
}
Expand Down

0 comments on commit ec1c6da

Please sign in to comment.