Faster conversion from numpy to cupy #43
saishashank85
started this conversation in
Show and tell
Replies: 1 comment
-
I don't think adding |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
def num_to_cud(k):
k = torch.tensor(k, device='cuda')
torch.cuda.synchronize()
k = cp.asarray(k.contiguous())
cp.cuda.runtime.deviceSynchronize()
return k
Beta Was this translation helpful? Give feedback.
All reactions