@vectorize(target='gpu') ufuncs 2D only?

0 views
Skip to first unread message

GC B

unread,
May 16, 2015, 11:07:30 PM5/16/15
to numba...@continuum.io
I apologize if this gets double posted-- I tried once already but it doesn't seem to be showing up...

I was excited to see a 1000x speedup when vectorizing my ufunc with gpu enabled, until I realized that it was only doing one 10,000th of the work...  The GPU targeted version doesn't seem to be iterating through the 3rd dimension of the array...  Am I doing something wrong, or is this a known limitation?:

a=np.random.randn(10000,3,1)
b=a.transpose(2,1,0)

def fn(a,b):
    return a-b

@vectorize(['float64(float64,float64)'],target='gpu')
def fngpu(a,b):
    return a-b

@vectorize(['float64(float64,float64)'])
def fncpu(a,b):
    return a-b

print(fn(a,b).shape)
print(fngpu(a,b).shape)
print(fncpu(a,b).shape)
(10000, 3, 10000)
(10000, 3, 1)
(10000, 3, 10000)

GC B

unread,
May 21, 2015, 1:43:58 AM5/21/15
to numba...@continuum.io
Continuum has confirmed this to be a bug and has filed a ticket against it.
Reply all
Reply to author
Forward
0 new messages