Skip to content

Enable dirty-bit tracking through the sharded map#5852

Open
lizhe-ji wants to merge 2 commits into
pytorch:mainfrom
lizhe-ji:export-D107967620
Open

Enable dirty-bit tracking through the sharded map#5852
lizhe-ji wants to merge 2 commits into
pytorch:mainfrom
lizhe-ji:export-D107967620

Conversation

@lizhe-ji

@lizhe-ji lizhe-ji commented Jun 9, 2026

Copy link
Copy Markdown

Summary: Add an enable_dirty_tracking option to SynchronizedShardedMap and forward it to the pool constructor, and thread the same parameter through InferenceFixedBlockPool so the shared template instantiates for both pool types. Defaults to false, so existing behavior is unchanged. This lets callers (e.g. the FeatureEvict SSD writeback path) construct pools that track dirty blocks.

Differential Revision: D107967620

Lizhe Ji added 2 commits June 8, 2026 21:30
Summary:
X-link: facebookresearch/FBGEMM#2743


Add out-of-band dirty bit tracking to FixedBlockPool using a striped concurrent hash set. The dirty bit is tracked separately from MetaHeader to maintain backward compatibility with serialization. Blocks are marked dirty when their embedding data is modified, and the bit is cleared on allocate/deallocate. This is foundational for the DRAM+SSD composite backend to know which DRAM blocks need to be flushed to SSD.

Reviewed By: EddyLXJ

Differential Revision: D107291829
Summary: Add an `enable_dirty_tracking` option to `SynchronizedShardedMap` and forward it to the pool constructor, and thread the same parameter through `InferenceFixedBlockPool` so the shared template instantiates for both pool types. Defaults to false, so existing behavior is unchanged. This lets callers (e.g. the FeatureEvict SSD writeback path) construct pools that track dirty blocks.

Differential Revision: D107967620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant