High performance with gpu

Hi!

If you have an nvidia card with cuda look at these specifications, you may be interested in improving performance.

A&E.

3 Likes

Hi, @Edelberth! Thanks for sharing this link. You’ve shared some useful resources in the Community. Have you thought about writing an article on DQ Direct and talking about one of the packages you’ve discovered? The magazine is temporarily paused but I guess you’ll be able to publish it later:)

2 Likes

I appreciate your words, coming from you is a great gift.

The truth is that it is a very good idea, if Cupy people are updated to the latest version of cuda toolkit (thats is my current version) then that may be the time to carry it out.

Greeting is very appreciated read comments like this.

Thank you.

A&E

2 Likes

Hey @artur.sannikov96

A couple of days ago I was able to install Cupy (also Numba) the process is “very simple” if you dont have issues with Linux and Nvdia as I have (something usually)

example:

array_cpu

array([[167,  34,  37, ..., 233,  45, 219],
       [241, 166, 161, ..., 162, 164, 215],
       [ 62, 202, 136, ..., 155,  58,  77],
       ...,
       [130,  59,  65, ..., 217,   9, 121],
       [ 55,  63, 170, ..., 193, 220, 164],
       [ 96, 181, 162, ...,  30, 179,  88]])

# array_cpu.nbytes / 1e6

# send array to memory

array_gpu = cp.asarray(array_cpu)


%%timeit

cp.asarray(array_cpu)

9.72 ms ± 245 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)


from scipy import fft

%%timeit

fft.fftn(array_cpu)

197 ms ± 1.26 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)



from cupyx.scipy import fft as fft_gpu 

%%timeit

fft_gpu.fftn(array_gpu)

77.3 µs ± 36.7 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)

Here the place where I replay the example:

From minute 08:40 easy to follow.

if you need help tell me, I am reviewing those things you have told me in the forums so it is a good time to attend to these things.

Hope goes well.

A&E

1 Like