Skip to content

Commit b22ead6

Browse files
duduyi2013facebook-github-bot
authored andcommitted
sync wait before L1 and L2 flush (pytorch#791)
Summary: X-link: pytorch#3709 Pull Request resolved: 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
1 parent b2ca727 commit b22ead6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fbgemm_gpu/fbgemm_gpu/tbe/ssd/training.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1831,12 +1831,12 @@ def flush(self) -> None:
18311831

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

1834+
torch.cuda.synchronize()
18341835
self.ssd_db.set(
18351836
active_ids_cpu,
18361837
active_weights_cpu,
18371838
torch.tensor([active_ids_cpu.numel()]),
18381839
)
1839-
18401840
self.ssd_db.flush()
18411841

18421842
def prepare_inputs(

0 commit comments

Comments
 (0)