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
5
votes
2 answers

How to generate random number inside pyCUDA kernel?

I am using pyCUDA for CUDA programming. I need to use random number inside kernel function. CURAND library doesn't work inside it (pyCUDA). Since, there is lot of work to be done in GPU, generating random number inside CPU and then transferring them…
Bhaskar Dhariyal
  • 1,343
  • 2
  • 13
  • 31
5
votes
1 answer

How to handle a python list with PyCUDA?

I guess this is a rather easy question for an expert, yet I can't find any answers in the net. Given a simple case: The problem: listToProcess = [] for i in range(0, 10): listToProcess.append(i) This list shall be transfered to the GPU, for…
user3085931
  • 1,757
  • 4
  • 29
  • 55
5
votes
0 answers

exchange gpu data from python (pycuda gpuarray) to opencv (cv::cuda::GpuMat) and vice versa

I have a pycuda gpuarray that I would like to feed to an opencv cuda function. As I understand there are currently no python bindings for the opencv 3 cv::cuda module. So I tried writing my own python wrapper for accessing cv::cuda functions (in my…
Wizard
  • 295
  • 1
  • 4
  • 15
5
votes
2 answers

cuda python GPU numbapro 3d loop poor performance

I am trying to set up a 3D loop with the assignment C(i,j,k) = A(i,j,k) + B(i,j,k) using Python on my GPU. This is my GPU: http://www.geforce.com/hardware/desktop-gpus/geforce-gt-520/specifications The sources I'm looking at / comparing with…
Charles
  • 947
  • 1
  • 15
  • 39
5
votes
2 answers

Is there a GPU accelerated numpy.max(X, axis=0) implementation in Theano?

Do we have a GPU accelerated of version of numpy.max(X, axis=None) in Theano. I looked into the documentation and found theano.tensor.max(X, axis=None), but it is 4-5 times slower than the numpy implementation. I can assure you, it is not slow…
hrs
  • 487
  • 5
  • 18
5
votes
1 answer

Difference between memcpy_htod and to_gpu in Pycuda?

I am learning PyCUDA, and while going through the documentation on pycuda.gpuarray, I am puzzled by the difference between pycuda.driver.memcpy_htod (also _dtoh) and pycuda.gpuarray.to_gpu (also get) functions. According to gpuarray documentation,…
Pippi
  • 2,451
  • 8
  • 39
  • 59
5
votes
2 answers

Installing pycuda-2013.1.1 on windows 7 64 bit

FYI, I have 64 bit version of Python 2.7 and I followed the pycuda installation instruction to install pycuda. And I don't have any problem running following script. import pycuda.driver as cuda import pycuda.autoinit from pycuda.compiler import…
Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240
5
votes
1 answer

pycuda ImportError in pycuda.driver

I'm trying to compile some sources for working with my GPU. I use pycuda for this. When I compile source code, I receive some errors from Python: C:\Users\Dmitriy\wcm>python ws_gpu.py test.dcm Traceback (most recent call last): File "ws_gpu.py",…
iDom
  • 115
  • 1
  • 7
5
votes
3 answers

driver.Context.synchronize()- what else to take into consideration -- -a clean-up operation failed

I have this code here (modified due to the answer). Info 32 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 46 registers, 120 bytes cmem[0], 176 bytes cmem[2], 76 bytes cmem[16] I don't know what else to take…
George
  • 5,808
  • 15
  • 83
  • 160
5
votes
1 answer

Print messages in PyCUDA

In simple CUDA programs we can print messages by threads by including cuPrintf.h but doing this in PyCUDA is not explained anywhere. How to do this in PyCUDA?
username_4567
  • 4,737
  • 12
  • 56
  • 92
5
votes
1 answer

pycuda; nvcc fatal : Visual Studio configuration file '(null)' could not be found

I'm trying to run pycuda introductory tutorial after installing Visual C++ Express 2010 and all kinds of Nvidia drivers, SDK, etc. I get to mod = SourceModule(""" __global__ void doublify(float *a) { int idx = threadIdx.x + threadIdx.y*4; a[idx] *=…
Konsta
  • 347
  • 4
  • 18
4
votes
1 answer

How to use the `prepare` function from PyCUDA

I have problems passing the right parameters to the prepare function (and to the prepared_call) to allocate of shared memory in PyCUDA. I understand the error message in this way, that one of the variables I pass to PyCUDA is a long instead of what…
Framester
  • 33,341
  • 51
  • 130
  • 192
4
votes
1 answer

Where can I find a "Cuda/PyCuda for Dummies" tutorial

I want to learn how to do GPU programming over the summer, and I'm open to all languages/libraries but most interested in PyCuda. I am not a strong programmer; I can bang out most programs I want in Java, and understand the rudiments of C, but when…
Elliot JJ
  • 543
  • 6
  • 19
4
votes
2 answers

PyCUDA/CUDA: Causes of non-deterministic launch failures?

Anyone following CUDA will probably have seen a few of my queries regarding a project I'm involved in, but for those who haven't I'll summarize. (Sorry for the long question in advance) Three Kernels, One Generates a data set based on some input…
Bolster
  • 7,460
  • 13
  • 61
  • 96
4
votes
1 answer

Question about pycuda._driver.LogicError: cuMemcpyDtoH failed: invalid argument

I was trying to run a code that is based off the following link https://documen.tician.de/pycuda/tutorial.html Running code in this link turned out to be fine. This is my version with similar definitions. Note that I was running under engine context…
macman
  • 91
  • 1
  • 7
1 2
3
27 28