Questions tagged [pycuda]

PyCUDA is the Python module which provides a comprehensive pythonic interface to the NVIDIA CUDA GPU computing environment.

PyCUDA provides a python module to access the NVIDIA CUDA driver API from within Python code.

The module includes interoperability with numpy, and comprehensive metaprogramming facilities for dynamically generating and JIT compiling CUDA code using Python.

417 questions
0
votes
1 answer

Pycuda Vector arithmetic - Id inside Kernel

I'm trying to work out a simple program with pycuda to test it and latter compare it to my opencl implementation. Yet, I'm having trouble adding 2 1D arrays. The problem is that I can't seem to find the correct ID of each element. My code is very…
PeachMode
  • 397
  • 1
  • 4
  • 15
0
votes
1 answer

pyCUDA reduction doesn't work

I am using reduction code basically exactly like the examples in the docs. The code below should return 2^3 + 2^3 = 16, but it instead returns 9. What did I do wrong? import numpy import pycuda.reduction as reduct import pycuda.gpuarray as…
Elliot Gorokhovsky
  • 3,610
  • 2
  • 31
  • 56
0
votes
1 answer

PyCUDA using struct properly

I am trying to implement a struct in my Pycuda code but i am getting out of bounds errors. I tried following this tutorial but am unable to get it working for my case. The problem is most probably due to improper use of pointers, e.g. the tutorial…
nluigi
  • 1,263
  • 2
  • 15
  • 35
0
votes
0 answers

CUDA code without a GPU

I have a 13.02 Ubuntu desktop OS. I am a newbie in CUDA and have been given a task to write CUDA code without NIVDIA graphics card. Due to lack of my knowledge - that /dev/nivdia card & driver should be required for CUDA programming I wasted a week…
Programmer
  • 8,303
  • 23
  • 78
  • 162
0
votes
1 answer

Numbapro cuda python defining array in thread register in gpu

I know how to create a global device function inside Host using np.array or np.zeros or np.empty(shape, dtype) and then using cuda.to_device to copy. Also, one can declare shared array as cuda.shared.array(shape, dtype) But how to create an array of…
jalatif
  • 43
  • 6
0
votes
1 answer

How to do element-wise assignment in pycuda / scikits.cuda?

Here's the code: import pycuda.autoinit import pycuda.gpuarray as gpuarray import pycuda.driver as drv import numpy as np import scikits.cuda.linalg as culinalg import scikits.cuda.misc as cumisc culinalg.init() ag =…
Xing Shi
  • 2,152
  • 3
  • 21
  • 32
0
votes
1 answer

Profiling PyCUDA code with nvvp in CUDA 6.5

Judging by past StackOverflow questions (e.g., here and here), it seems that one should be able to profile PyCUDA programs using nvvp. When I tried running nvvp in CUDA 6.5 on a PyCUDA script that runs without any problems from the command line,…
lebedov
  • 1,371
  • 2
  • 12
  • 27
0
votes
1 answer

Core Dump Segfault While Executing An Example of scikits.cuda in Django

I tried to run following simple cublas example on both console environment and in Django framework. """ Demonstrates multiplication of two matrices on the GPU. """ import pycuda import pycuda.gpuarray as gpuarray import pycuda.driver as drv import…
Alex Gao
  • 2,073
  • 4
  • 24
  • 27
0
votes
1 answer

Cannot compile simple PyCuda OSX application

I've followed the PyCuda instructions here: http://wiki.tiker.net/PyCuda/Installation/Mac I'm trying to compile the following code: import pycuda.autoinit import pycuda.driver as drv import numpy from pycuda.compiler import SourceModule mod =…
mr-sk
  • 13,174
  • 11
  • 66
  • 101
0
votes
3 answers

clang error - CUDA directory not found on OSX Mavericks

I’m trying to install a CUDA package in Python called PyCUDA under OSX Maverics on a MacBook Pro 15” retina, but when trying to compile the files I get the following error: ld: warning: directory not found for option '-F /Library/Frameworks…
MA81
  • 93
  • 8
0
votes
1 answer

Enthought canopy python -lpython2.7 not found

I am using Canopy enthought on a machine without su access. Whenever i try to build any package dependent on python I get this error: /usr/bin/ld: cannot find -lpython2.7 collect2: ld returned 1 exit status error: command 'g++' failed with exit…
0
votes
2 answers

storing values between iterations (cache-like mechanism) in pyCUDA

Good morning all, I am kind of newbie with cuda/pyCuda, so probably this will have an easy solution employing some mechanism that I don't know.... I am employing pycuda to operate over pairs of values: I subtract the smallest from the biggest and…
0
votes
1 answer

Do threads in a warp execute instructions in sync? What about threads in a block?

I have a CUDA kernel in which each address of a global array is written to 4 times by each thread. It seems that two threads in a warp can potentially write to the same address at the same time, causing the process to be non-coalesced. What about…
Pippi
  • 2,451
  • 8
  • 39
  • 59
0
votes
1 answer

PyCUDA failing to include - error: no extern "C" linkage

I'm trying to create a random number from a normal distribution inside a CUDA kernel, using PyCUDA (version 2011,2,2), in Python 2.7.3 on a Tesla C2075 (CUDA 5.0, V0.2.1221). However I am having issues in trying to simply include the curand_kernel.h…
Azwok
  • 203
  • 1
  • 11
0
votes
1 answer

Have GTX Titan, having trouble with Dynamic Parallelism

I'm trying to call a CUDA kernel from another kernel, but get the following error : Traceback (most recent call last): File "C:\temp\GPU Program Shell.py", line 22, in """) File "C:\Python33\lib\site-packages\pycuda\compiler.py",…