Skip to content

Commit d51e39b

Browse files
committed
Fix: add event sync in fsdp tutorial
Signed-off-by: zzb610 <bwyuchi@gmail.com>
1 parent 222a367 commit d51e39b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

intermediate_source/FSDP_tutorial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ We add the following code snippets to a python script “FSDP_mnist.py”.
251251
init_end_event.record()
252252
253253
if rank == 0:
254+
init_end_event.synchronize()
254255
print(f"CUDA event elapsed time: {init_start_event.elapsed_time(init_end_event) / 1000}sec")
255256
print(f"{model}")
256257

0 commit comments

Comments
 (0)