Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin committed Jul 18, 2024
1 parent 1d49dc8 commit 10ba72c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions python/dgl/graphbolt/impl/gpu_cached_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import torch

from ..base import get_device_to_host_uva_stream, get_host_to_device_uva_stream
from ..feature_store import Feature

from .gpu_cache import GPUCache
from .torch_based_feature_store import DiskBasedFeature, TorchBasedFeature

__all__ = ["GPUCachedFeature"]

Expand Down Expand Up @@ -104,6 +102,7 @@ def read_async(self, ids: torch.Tensor):
class _Waiter:
@staticmethod
def wait():
"""Returns the stored value when invoked."""
return values

yield _Waiter()
Expand Down
3 changes: 3 additions & 0 deletions python/dgl/graphbolt/impl/torch_based_feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def read_async(self, ids: torch.Tensor):
class _Waiter:
@staticmethod
def wait():
"""Returns the stored value when invoked."""
values_copy_event.wait()
return values

Expand Down Expand Up @@ -185,6 +186,7 @@ def wait():
class _Waiter:
@staticmethod
def wait():
"""Returns the stored value when invoked."""
values_copy_event.wait()
return values_cuda

Expand Down Expand Up @@ -423,6 +425,7 @@ def read_async(self, ids: torch.Tensor = None):
class _Waiter:
@staticmethod
def wait():
"""Returns the stored value when invoked."""
values_copy_event.wait()
return values_cuda

Expand Down

0 comments on commit 10ba72c

Please sign in to comment.