Skip to content

Commit

Permalink
Fix typo with torch cuda is_available call
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
mmcdermott and coderabbitai[bot] authored Sep 22, 2024
1 parent 6b60297 commit 8a303a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mixins/tensorable.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TensorableMixin:
Tensor_T = Union[torch.Tensor, tuple["Tensor_T"], dict[Hashable, "Tensor_T"]]

def __init__(self, *args, **kwargs):
self.do_cuda = kwargs.get("do_cuda", torch.cuda.is_available)
self.do_cuda = kwargs.get("do_cuda", torch.cuda.is_available())

def _cuda(self, T: torch.Tensor, do_cuda: bool | None = None):
if do_cuda is None:
Expand Down

0 comments on commit 8a303a3

Please sign in to comment.