[ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Charles Determan
Greetings, I am working on writing some additional opencl kernels (potentially to incorporate in to viennacl) which involve column-wise reductions. A simple case would simply be the sum of each column of a matrix. However, I am having an extremely difficult time getting my kernel correct

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Sumit Kumar
, July 27, 2015 8:27 PM Subject: Re: [ViennaCL-devel] Column-wise kernels? Hi Charles, I am working on writing some additional opencl kernels (potentially to incorporate in to viennacl) which involve column-wise reductions.  A simple case would simply be the sum of each column of a matrix

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Karl Rupp
Hi Charles, I am working on writing some additional opencl kernels (potentially to incorporate in to viennacl) which involve column-wise reductions. A simple case would simply be the sum of each column of a matrix. However, I am having an extremely difficult time getting my kernel correct

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Karl Rupp
Excellent, thank you. I thought that would be the way to go initially but I hesitated because of concerns about having additional temporary objects taking up memory when matrices begin to get larger but it certainly is simpler this way. Just pushed:

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Charles Determan
Excellent, thank you. I thought that would be the way to go initially but I hesitated because of concerns about having additional temporary objects taking up memory when matrices begin to get larger but it certainly is simpler this way. Glad to hear that 1.7.0 is nearly completed. Does that

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Philippe Tillet
Hi, Such row-rise / column-wise reductions could be generate-able by the OpenCL backend, but this won't work on the Host of CUDA backend. Plus, this is not really maintained at the moment. I would recommend Karl's solution, even though it won't be optimal when the vector does not fit in the L2

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Charles Determan
Philippe, I definitely understand and support such a solution for ViennaCL. I don't mean to say it should be included, I was just curious what the current approach was. However, I am interested in additional OpenCL development outside of the framework. Do you have any recommendations in

Re: [ViennaCL-devel] Column-wise kernels?

2015-07-27 Thread Karl Rupp
Hi, in addition to what Philippe said, let me give you a short code snippet used as a prototype for a couple of reductions in ViennaCL. It certainly takes a little to get your head around it, but once you figured it out it's like a swiss army knife ;-) The overall workflow is always the same: