Skip to content

Commit

Permalink
support for cupy
Browse files Browse the repository at this point in the history
  • Loading branch information
friguzzi committed Dec 30, 2023
1 parent 1723f0a commit 28526d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion prolog/liftcover.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@


import numpy as xp
import numpy as np
import torch

try:
import cupy as cp
cp.cuda.runtime.getDeviceCount()
print("GPU exists!")
xp=cp
except:
xp=np
print("GPU does not exist.")

def ll(pr, co, zero=0.000001):
probs=xp.array(pr)
counts=xp.array(co)
Expand Down

0 comments on commit 28526d2

Please sign in to comment.