Note that there are some explanatory texts on larger screens.

plurals
  1. POAnaconda's NumbaPro CUDA Assertion Error
    primarykey
    data
    text
    <p>I am trying to use NumbaPro's cuda extension to multiply large array matrixes. What I want in the end is to multiply a matrix of size NxN by a diagonal matrix that would be fed in as a 1D matrix (thus, a.dot(numpy.diagflat(b)) which I have found to be synonymous to a * b). However, I am getting an assertion error that provides no information.</p> <p>I can only avoid this assertion error if I multiply two 1D array matrixes but that is not what I want to do.</p> <pre><code>from numbapro import vectorize, cuda from numba import f4,f8 import numpy as np def generate_input(n): import numpy as np A = np.array(np.random.sample((n,n))) B = np.array(np.random.sample(n) + 10) return A, B def product(a, b): return a * b def main(): cu_product = vectorize([f4(f4, f4), f8(f8, f8)], target='gpu')(product) N = 1000 A, B = generate_input(N) D = np.empty(A.shape) stream = cuda.stream() with stream.auto_synchronize(): dA = cuda.to_device(A, stream) dB = cuda.to_device(B, stream) dD = cuda.to_device(D, stream, copy=False) cu_product(dA, dB, out=dD, stream=stream) dD.to_host(stream) if __name__ == '__main__': main() </code></pre> <p>This is what my terminal spits out:</p> <pre><code>Traceback (most recent call last): File "cuda_vectorize.py", line 32, in &lt;module&gt; main() File "cuda_vectorize.py", line 28, in main cu_product(dA, dB, out=dD, stream=stream) File "/opt/anaconda1anaconda2anaconda3/lib/python2.7/site-packages/numbapro/_cudadispatch.py", line 109, in __call__ File "/opt/anaconda1anaconda2anaconda3/lib/python2.7/site-packages/numbapro/_cudadispatch.py", line 191, in _arguments_requirement AssertionError </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload