Skip to content

Commit

Permalink
don't prohibit cpu #1
Browse files Browse the repository at this point in the history
  • Loading branch information
iiSeymour committed Nov 23, 2019
1 parent bdfeb69 commit 4ee06ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bonito/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
split_cigar = re.compile(r"(?P<len>\d+)(?P<op>\D+)")


def init(seed):
def init(seed, device):
"""
Initialise random libs and setup cudnn
Expand All @@ -35,6 +35,7 @@ def init(seed):
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
if device == "cpu": return
torch.backends.cudnn.enabled = True
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
Expand Down

0 comments on commit 4ee06ee

Please sign in to comment.