[PyOpenCL] how to learn pyopencl-for beginners

2016-09-29 Thread aseem hegshetye
Hi, I want to run my computationally expensive AI algorithms on gpu. PyOpenCL is the best option for me coz all my AI code is in python. I have never used GPUs before. I dont know how to learn pyOpenCL . The official documentation assumes i know openCL i guess. Should I first learn OpenCL and then

[PyOpenCL] PyOpenCL Detailed Documentation

2016-10-08 Thread aseem hegshetye
Hi, PyOpenCL is awesome and its been around since 2011. Its extremely easy to program but frustrating in the beginning. There is absolutely no comprehensive detailed documentation explaining PyOpenCL to beginners who have never programmed GPUs before. Should we start drafting a simple easy to under

[PyOpenCL] Docker File for pyopencl

2017-03-14 Thread aseem hegshetye
Hi, Is there a detailed description of how to create a docker image for python code that uses pyopencl and few other libraries. Procedures for creating a docker file and running that file to create a container are well documented, but i am struggling to find out how to write a docker file which wou

[PyOpenCL] error when using Jupyter notebook

2017-03-28 Thread aseem hegshetye
Hi, I installed Jupyter notebook through anaconda3 package. It comes with all required python modules. when i do "import pyopencl" i get an error saying no module found. So i did "import sys sys.path.append('/Users/xyz/')" where i have a pyopencl folder extracted from the tar zip file i downloaded

Re: [PyOpenCL] error when using Jupyter notebook

2017-03-28 Thread aseem hegshetye
like conda/pip. > > > - Sam > > > > On Mar 28, 2017, 4:59 AM -0400, aseem hegshetye , > wrote: > > Hi, > I installed Jupyter notebook through anaconda3 package. It comes with all > required python modules. > when i do "import pyopencl" i get

[PyOpenCL] Memory cleaning

2017-04-26 Thread aseem hegshetye
Hi, Does pyopencl have inbuilt memory cleaning. Does "pyopencl.enqueue_copy" clear corresponding memory ( memory allocated to the object that was copied to CPU via enqueue command) from the GPU or is the data still in the GPU and gets cleaned only after some other process. Is there a "pyopencl.cl

[PyOpenCL] Reusing data on GPU and reusing same space for different data on GPU

2017-05-16 Thread aseem hegshetye
Hi, I am going to load 3 arrays from CPU to GPU 4 times in a loop in my function. Then GPU will work on those arrays and generate output. 1 of the 3 arrays is going to be the same every time. SO i want to find a way to keep that 1 array *(arrazy_z)* constant instead of loading it each time. I als

[PyOpenCL] GPU release memory

2017-05-26 Thread aseem hegshetye
Hi, How to release read_only & write_only memory in GPU. suppose i load a write only array and another read only array in GPU. Then later once I am done retrieving the output from GPU, i want to load new arrays in the GPU. But i want to get rid of old arrays in the GPU. This would help me when I

[PyOpenCL] Debugging and printing in GPu kernel

2018-03-09 Thread aseem hegshetye
Hi, Is there a way to debug and/or print intermediate variables while running a c kernel on GPu via pyopencl. Debugging is very painful for GPu kernels. Currently I have loop over number of threads in my local machine. Aseem ___ PyOpenCL mailing list

Re: [PyOpenCL] Debugging and printing in GPu kernel

2018-03-10 Thread aseem hegshetye
I think this is a good, simple & platform independent approach. There are very few options when using pyopencl on nvidia GPUs. Aseem On Fri, Mar 9, 2018 at 10:09 PM, Karl Czajkowski wrote: > On Mar 09, aseem hegshetye modulated: > > Hi, > > Is there a way to debug and/or

[PyOpenCL] clGetPlatformIDs failed

2018-03-10 Thread aseem hegshetye
Hi, I get this error when i run following code: *import pyopencl as cl* *cl.get_platforms()* I tried following command in ubuntu terminal to fix it: * sudo echo e- 'echo libnvidia-opencl.so.1' >> /etc/OpenCL/vendors/nvidia.icd* and *echo libnvidia-opencl.so.1 >> /etc/OpenCL/vendors/nvidia.icd

Re: [PyOpenCL] clGetPlatformIDs failed

2018-03-11 Thread aseem hegshetye
I was able to log in as root user by doing "sudo -i" after ssh to the aws ec2 instance. but now the command *echo libnvidia-opencl.so.1 >> /etc/OpenCL/vendors/nvidia.icd* says "-bash: /etc/OpenCL/vendors/nvidia.icd: No such file or directory" On Sun, Mar 11, 2018 a

Re: [PyOpenCL] clGetPlatformIDs failed

2018-03-11 Thread aseem hegshetye
tforms() clGetPlatformIDs failed: On Sun, Mar 11, 2018 at 4:58 PM, aseem hegshetye wrote: > I was able to log in as root user by doing "sudo -i" after ssh to the aws > ec2 instance. > > but now the command *echo libnvidia-opencl.so.1 >> > /etc/OpenCL/vendors/nvidia.icd* say

[PyOpenCL] invalid_value error

2018-03-27 Thread aseem hegshetye
Hi, What does following pyopencl error mean : clEnqueueNDRangeKernel failed: INVALID_VALUE How to solve it. Aseem ___ PyOpenCL mailing list PyOpenCL@tiker.net https://lists.tiker.net/listinfo/pyopencl

[PyOpenCL] Calling custom function inside c kernel

2018-05-03 Thread aseem hegshetye
Hi, How to declare a custom function and call it inside a c kernel that runs on GPU using pyopencl. Thanks Aseem ___ PyOpenCL mailing list PyOpenCL@tiker.net https://lists.tiker.net/listinfo/pyopencl

[PyOpenCL] array c_int has -1 in place of 0

2018-05-21 Thread aseem hegshetye
my Pyopencl code works perfect when ran on CPU by looping on thread_id. but when ran on gpu on aws p2.xlarge ubuntu, an array who is specifically initialized with 0's returns -1 instead of 0's. this arrays is of type ctypes.c_int. is there some other datatype for c int that I should be using. thank

[PyOpenCL] assigning unexpected value to global variable

2018-05-21 Thread aseem hegshetye
Hi, I have a kernel as follows: if (condition is true):# is always true x=array[0,0]; if (cond2 is true): x[i]++; global_x[i]=x[i]; This gives me negative values in global_x. But when i declare x outside the condition and copy x to global_x outside the if condition universally,

[PyOpenCL] Non responsive kernel

2018-06-03 Thread aseem hegshetye
Hi , My pyopencl kernel just stops responding for specific data. Code runs smoothly if data has total 30296 transactions. But becomes non responsive when data has 30297 trans. If I take that one extra trans and run the code separately on that trans , it works fine. Code can run on more than 40

[PyOpenCL] GPU speed wrt number of threads

2018-06-05 Thread aseem hegshetye
Hi, Does GPU speed exponentially drop as number of threads increase beyond a certain number?. I used to allocate number of threads= number of transactions in data under consideration. For Tesla K80 I see exponential drop in speed above 30290 Threads. If true, is it a best practice to keep number of

Re: [PyOpenCL] GPU speed wrt number of threads

2018-06-06 Thread aseem hegshetye
CS-2016-143.pdf > Do you use atomic operations? Or maybe you have too many thread fences? > I have no problem starting many threads: the number of threads alone is > not the issues. > > Cheers, > Sven > > > Op 6-6-2018 om 8:37 schreef aseem hegshetye: > > Hi,

Re: [PyOpenCL] GPU speed wrt number of threads

2018-06-06 Thread aseem hegshetye
The findings below are considering I already have a 20 million * 57 bits int array in the GPu. > On Jun 6, 2018, at 3:05 AM, aseem hegshetye wrote: > > Hi, > I did some testing with number of threads. I changed number of threads and > recorded the time in seconds it took f