Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GraphBolt] Add CPUCachedFeature. [2] #7537

Merged
merged 10 commits into from
Jul 19, 2024
Prev Previous commit
Next Next commit
move change to the other PR.
  • Loading branch information
mfbalin committed Jul 18, 2024
commit 82b4b3c8747ae264d9a508188d5b6d72f62a0c1f
7 changes: 0 additions & 7 deletions python/dgl/graphbolt/impl/feature_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ def __init__(
), f"{list(caching_policies.keys())} are the available caching policies."
if num_parts is None:
num_parts = torch.get_num_threads()
min_num_cache_items = num_parts * (10 if policy == "s3-fifo" else 1)
# Since we partition the cache, each partition needs to have a positive
# number of slots. In addition, each "s3-fifo" partition needs at least
# 10 slots since the small queue is 10% and the small queue needs a
# positive size.
if cache_shape[0] < min_num_cache_items:
cache_shape = (min_num_cache_items,) + cache_shape[1:]
self._policy = caching_policies[policy](cache_shape[0], num_parts)
self._cache = torch.ops.graphbolt.feature_cache(
cache_shape, dtype, pin_memory
Expand Down
Loading