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
2
votes
1 answer

Pycuda Compilation Error

I am on windows machine with python 2.7 ( 32 bit ) and pycuda with cuda 7.5 whl installed . I get error while running a sample program to test pycuda. Traceback (most recent call last): File "C:\Users\newbie\Desktop\roo.py", line 82, in
Rahul rao
  • 45
  • 5
2
votes
1 answer

CUDA indexing does not work as expected

I'm trying to process a 2D array using PyCUDA and I need the x,y coordinates of each thread. This question has been asked and answered here and here, but the linked solutions do not work for me for 2D data that exceeds my block size. Why? Here's…
2
votes
1 answer

install pycuda in ubuntu 14.04 with cuda 7.0

i am trying install pycuda with cuda 7.0 no problem and run code nice but i can't install and run pycuda after install pycuda with Installing PyCUDA on Ubuntu Linux try run simple code with pycuda simple code is import pycuda.driver as cuda import…
2
votes
2 answers

pycuda fail; Theano with Anaconda

I'm using Anaconda to install Theano on MacOSX (Mavericks 10.9 ), just like this post explains: "How to make Theano operate on Mac Lion?" theano.test() This command gives the same error as in the post above. It gives that error on an Ubuntu…
Michele Reilly
  • 643
  • 2
  • 9
  • 19
2
votes
1 answer

Efficient library to detect and clip overlapping rectangles with python

I have a set of rectangles overlapping each other. I need to detect that overlaps exist in a set of rectangles. If overlaps exist, then I need to update the coordinates so the set of rectangles do not overlap anymore. I wonder if there are existing…
ttback
  • 2,051
  • 5
  • 27
  • 40
2
votes
1 answer

cudaMemcpyToSymbol in pycuda

I am using pycuda and i would like to know if there is an equivalent to the function cudaMemcpyToSymbol I would like to copy a constant from the host to the device like below import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler…
SOCKet
  • 191
  • 1
  • 2
  • 15
2
votes
1 answer

Interfacing cuSOLVER-sparse using PyCUDA

I'm trying to interface the sparse cuSOLVER routine cusolverSpDcsrlsvqr() (>= CUDA 7.0) using PyCUDA and am facing some difficulties: I have tried wrapping the methods the same way the dense cuSolver routines are wrapped in scikits-cuda…
Ste
  • 58
  • 7
2
votes
1 answer

pycuda._driver import error (Windows)

I am trying to run pycuda on my windows 7 machine. I have installed the following- 1. Python 2.7.9 2. cuda_7.0.28_windows 3. numpy-1.9.2-win32-superpack-python2.7 4. pycuda-2014.1+cuda6514-cp27-none-win32 (whl from christopher gohlke's libraries…
Swastik Padhi
  • 1,849
  • 15
  • 27
2
votes
1 answer

how to create a cuda shared library used in python

I have created a C shared library which is used in python it works perfectly when i test it. I compile like this: gcc -shared -std=c99 -I/usr/include/python2.6 -fPIC -lpython2.6 -opymod.so pymod.c I have a cuda source code "pymod.cu" which is the…
SOCKet
  • 191
  • 1
  • 2
  • 15
2
votes
1 answer

How to initialize 2D surface correctly in PyCUDA? (pycuda._driver.LogicError)

I'm trying to initialize 2D surface in PyCUDA and fill it with values from NumPy 2D array.The idea, as I get it, is open drv.ArrayDescriptor, create drv.Array using this descriptor, copy data from NumPy array with drv.Memcpy2D, do set_array for…
a5kin
  • 1,335
  • 16
  • 20
2
votes
3 answers

python+ pycuda (linux) error

I've installed python+pycuda (and other libraries) through this link: http://wiki.tiker.net/PyCuda/Installation/Linux But when I run test program, it says: Traceback (most recent call last): File "test_driver.py", line 17, in import…
Saeed
  • 141
  • 2
  • 13
2
votes
0 answers

How to use thrust with PyCuda?

I just want to call this code (sort algorithm provided by thrust) from python #include #include #include #include #include void initialize(thrust::device_vector&…
ilciavo
  • 3,069
  • 7
  • 26
  • 40
2
votes
0 answers

Pycuda performance benchmark: ElementwiseKernel vs cumath?

I wanted to check the difference in speed between cumath and ElementwiseKernel, since this example shows that Elementwise can perform faster than cumath. I am testing a different operation, where I would guess that Elementwise would be the faster…
Pablo Riera
  • 349
  • 3
  • 15
2
votes
1 answer

PyCUDA NPP Library Compatibility

I've been trying to access the Nvidia Performance Primitives library through Python, and I found a very useful tutorial last updated in 2011 at this site: http://openvidia.sourceforge.net/index.php/OpenVIDIA/python However, after downloading the…
Dan Lenton
  • 105
  • 9
2
votes
1 answer

PyCUDA either fails to find function in NVIDIA source code or throws 'may not have extern "C" Linkage' error

I am trying to use (and learn from) Mark Harris's optimized reduction kernel, by copying his source code into a simple pycuda application (full source of my attempt is listed below). Unfortunately, I run into one of the two following erros. The…
weemattisnot
  • 889
  • 5
  • 16