Skip to content

Commit

Permalink
we can't record on pinned features so there is no need to record on t…
Browse files Browse the repository at this point in the history
…he features.
  • Loading branch information
mfbalin committed Jan 18, 2024
1 parent e537a15 commit eafc107
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion python/dgl/graphbolt/feature_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ def _read(self, data):
if self.stream is not None:
current_stream = torch.cuda.current_stream()
self.stream.wait_stream(current_stream)
self.feature_store.record_stream(self.stream)
with torch.cuda.stream(self.stream):
data = self._read_data(data, current_stream)
if self.stream is not None:
Expand Down
10 changes: 0 additions & 10 deletions python/dgl/graphbolt/impl/torch_based_feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ def to(self, device): # pylint: disable=invalid-name
self2._tensor = self2._tensor.to(device)
return self2

def record_stream(self, stream):
"""Record the given stream in the Feature."""
if self._tensor.is_cuda:
self._tensor.record_stream(stream)

def __repr__(self) -> str:
ret = (
"{Classname}(\n"
Expand Down Expand Up @@ -305,11 +300,6 @@ def to(self, device): # pylint: disable=invalid-name
self2._features = {k: v.to(device) for k, v in self2._features.items()}
return self2

def record_stream(self, stream):
"""Record the given stream in all the stored Features."""
for feature in self._features.values():
feature.record_stream(stream)

def __repr__(self) -> str:
ret = "{Classname}(\n" + " {features}\n" + ")"
features_str = textwrap.indent(str(self._features), " ").strip()
Expand Down

0 comments on commit eafc107

Please sign in to comment.