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
11 changes: 9 additions & 2 deletions backends/xnnpack/runtime/XNNWeightsCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,18 @@ Error XNNWeightsCache::save_packed_index() {
ET_LOG(Error, "fsync of packed cache failed (errno=%d)", errno);
// Continue — data is in page cache; durability is best-effort.
}
// Log the final file size (= index_start + trailer) so production
// logs surface unbounded growth from orphan packs: a same-name
// re-pack leaves the old packed bytes in the file even though the
// trailer drops the old entry. Monitoring file_bytes over time tells
// us when GC or a size cap is needed.
const size_t file_bytes = index_start + buf.size();
ET_LOG(
Info,
"Saved packed weight index: %u entries at offset %zu",
"Saved packed weight index: %u entries at offset %zu, file_bytes=%zu",
entry_count,
index_start);
index_start,
file_bytes);

// Promote freshly-packed entries to from_load now that they're durable
// on disk, so delete_packed_data preserves them across unload/reload.
Expand Down
Loading