Skip to content

Commit

Permalink
add the type of the argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfbalin committed Jul 18, 2024
1 parent 7fcc4b4 commit 83099bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/dgl/graphbolt/impl/gpu_cached_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def wait():

yield _Waiter()

def read_async_num_stages(self, ids_device):
def read_async_num_stages(self, ids_device: torch.device):
"""The number of stages of the read_async operation"""
assert ids_device.type == "cuda"
return self._fallback_feature.read_async_num_stages(ids_device) + 1
Expand Down
2 changes: 1 addition & 1 deletion python/dgl/graphbolt/impl/torch_based_feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def wait():
else:
yield torch.ops.graphbolt.index_select_async(self._tensor, ids)

def read_async_num_stages(self, ids_device):
def read_async_num_stages(self, ids_device: torch.device):
"""The number of stages of the read_async operation"""
if ids_device.type == "cuda":
return 1 if self.is_pinned() else 3
Expand Down

0 comments on commit 83099bc

Please sign in to comment.