Skip to content

Commit 8f9e62e

Browse files
husimplicityLiSu
andauthored
remove if isinstance in shareipc (#150)
Co-authored-by: LiSu <[email protected]>
1 parent 4c4d610 commit 8f9e62e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

graphlearn_torch/python/distributed/dist_dataset.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,10 @@ def load_vineyard(
244244

245245
def share_ipc(self):
246246
super().share_ipc()
247-
if isinstance(self.node_pb, torch.Tensor):
248-
self.node_pb = share_memory(self.node_pb)
249-
self.edge_pb = share_memory(self.edge_pb)
250-
self._node_feat_pb = share_memory(self._node_feat_pb)
251-
self._edge_feat_pb = share_memory(self._edge_feat_pb)
247+
self.node_pb = share_memory(self.node_pb)
248+
self.edge_pb = share_memory(self.edge_pb)
249+
self._node_feat_pb = share_memory(self._node_feat_pb)
250+
self._edge_feat_pb = share_memory(self._edge_feat_pb)
252251
ipc_hanlde = (
253252
self.num_partitions, self.partition_idx,
254253
self.graph, self.node_features, self.edge_features, self.node_labels,

0 commit comments

Comments
 (0)