pyculib questions?

0 views
Skip to first unread message

Jeffrey Layton

unread,
Dec 4, 2017, 11:29:21 AM12/4/17
to Numba...@continuum.io
Good morning,

Is this is the proper place to ask pyculib questions?

Thanks!

Jeff

stuart

unread,
Dec 4, 2017, 11:49:24 AM12/4/17
to Numba Public Discussion - Public, Numba...@continuum.io
You are welcome to ask them here, though if it is a bug/issue/feature request please consider using the github issue tracker https://github.com/numba/pyculib/issues

Many Thanks,

-- 
stuart

Jeffrey Layton

unread,
Dec 4, 2017, 1:26:34 PM12/4/17
to numba...@continuum.io
Let me take a stab then...  Are they any good intro sites or papers for pyculib?

Thanks!

Jeff

--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users+unsubscribe@continuum.io.
To post to this group, send email to numba...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/numba-users/5d6c279b-c197-4d4f-9255-996e50377a93%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

stuart

unread,
Dec 5, 2017, 7:23:03 AM12/5/17
to Numba Public Discussion - Public
The user docs are probably the place to start, http://pyculib.readthedocs.io/en/latest/. Each section has a reference to the library it binds to, e.g. http://pyculib.readthedocs.io/en/latest/cublas.html has `see NVIDIA cuBLAS`, this reference is to the NVIDIA documentation for the underlying library which explains in greater detail the functions and their use. For examples of API use, the tests also might be a place to start looking: https://github.com/numba/pyculib/tree/master/pyculib/tests

Hope this helps.

-- 
stuart


On Monday, December 4, 2017 at 6:26:34 PM UTC, Jeffrey Layton wrote:
Let me take a stab then...  Are they any good intro sites or papers for pyculib?

Thanks!

Jeff

Durgesh Reddiyar

unread,
Feb 21, 2018, 6:25:15 AM2/21/18
to Numba Public Discussion - Public, Numba...@continuum.io
can anyone please provide me with a working example of 2D fft using pyculib?
following is the code i tried with limited documentation ...
from pyculib.fft import fft
import numpy as np

data
= np.load('gauss.npy')
out_pyculib
= np.asarray(data, dtype = np.complex128)
fft
(data, out_pyculib)

data file :  https://nofile.io/f/bjGRQGRVSCG/gauss.npy

stuart

unread,
Feb 22, 2018, 8:09:13 AM2/22/18
to Numba Public Discussion - Public
Here is a quick example that I think might do what you are looking for?
from numpy.fft import rfft2
from pyculib.fft import fft
import numpy as np

# setup data
n = 64
m = 32
data = np.random.random((n, m))

# compute output size and allocate
if m % 2:
    mout = m // 2
else:
    mout = m // 2 + 1

out_pyculib = np.empty((n, mout), dtype=np.complex128)

bkup = np.copy(data)

# make the call
fft(data, out_pyculib)

# assert data is not mutated
np.testing.assert_allclose(data, bkup)

# compute expected
expected = rfft2(data)

# assert data is not mutated
np.testing.assert_allclose(data, bkup)

# assert result match
np.testing.assert_allclose(out_pyculib, expected)


Hope this helps.

-- 
stuart
Reply all
Reply to author
Forward
0 new messages