Skip to content

Commit

Permalink
[GraphBolt] Cache policy replace fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin committed Jul 12, 2024
1 parent 945247e commit 98658d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion graphbolt/src/cache_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct CircularQueue {

struct CacheKey {
CacheKey(int64_t key, int64_t position)
: freq_(0), key_(key), position_in_cache_(position), reference_count_(0) {
: freq_(0), key_(key), position_in_cache_(position), reference_count_(1) {
static_assert(sizeof(CacheKey) == 2 * sizeof(int64_t));
}

Expand Down
1 change: 1 addition & 0 deletions python/dgl/graphbolt/impl/feature_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def replace(self, keys, values):
"""
positions = self._policy.replace(keys)
self._cache.replace(positions, values)
self._policy.reading_completed(keys)

@property
def miss_rate(self):
Expand Down

0 comments on commit 98658d7

Please sign in to comment.