Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cupy.linalg.pinv very very Low performance #5

Open
Rongzihan opened this issue Dec 13, 2020 · 0 comments
Open

Cupy.linalg.pinv very very Low performance #5

Rongzihan opened this issue Dec 13, 2020 · 0 comments

Comments

@Rongzihan
Copy link

I encounter a problem when using Cupy.linalg.pinv, but this function really cost time. Compared with cpu use 10s to get result, gpu use 13s. The larger the matrix, the more the delay on gpu. But for function like Cupy.linalg.inv and others, speed in gpu is much faster than cpu's. Could you tell me the reason?

My facility:
Ubuntu 16.04 server
Cuda10.1
Cupy also follow cuda10.1 version.

Code is here:


import time
import numpy as np
import cupy as cp

a = np.random.randn(3000, 3000)
a2 =cp.asarray(a,dtype=np.float64)
start=time.time()
a2 = cp.linalg.pinv(a2)
end=time.time()
print('gpu time',end-start)

start=time.time()
b=np.linalg.pinv(a)
end=time.time()
print('cpu time',end-start)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant