Skip to content

Commit

Permalink
sync wait before L1 and L2 flush (#3709)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #3709

X-link: facebookresearch/FBGEMM#791

during flush, make sure we blocking wait on all the pending kernels before we do sync flush on L1 and L2

Reviewed By: q10, sryap

Differential Revision: D69557437

fbshipit-source-id: 04d4a7850709f94055f8b2d5beab0fe622903378
  • Loading branch information
duduyi2013 authored and facebook-github-bot committed Feb 19, 2025
1 parent eb7e7e0 commit 56d6e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fbgemm_gpu/fbgemm_gpu/tbe/ssd/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -1831,12 +1831,12 @@ def flush(self) -> None:

torch.cuda.current_stream().wait_stream(self.ssd_eviction_stream)

torch.cuda.synchronize()
self.ssd_db.set(
active_ids_cpu,
active_weights_cpu,
torch.tensor([active_ids_cpu.numel()]),
)

self.ssd_db.flush()

def prepare_inputs(
Expand Down

0 comments on commit 56d6e4a

Please sign in to comment.