Skip to content

Commit

Permalink
flush data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Dec 18, 2023
1 parent 03b6002 commit ed52a3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/graphstorm/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from ..gconstruct.file_io import stream_dist_tensors_to_hdf5
from ..utils import get_rank, barrier, get_world_size, create_dist_tensor
from ..data.utils import alltoallv_cpu, alltoallv_nccl
from ..distributed import flush_data

# placeholder of the ntype for homogeneous graphs
NTYPE = dgl.NTYPE
Expand Down Expand Up @@ -1039,7 +1040,7 @@ def _load_id_mapping(self, g, ntype, id_mappings):
f"Expect {id_mapping.shape[0]}, but get {num_nodes}"
# Save ID mapping into dist tensor
id_mapping_info[th.arange(num_nodes)] = id_mapping
barrier()
flush_data()
return id_mapping_info

def shuffle_nids(self, ntype, nids):
Expand Down

0 comments on commit ed52a3c

Please sign in to comment.