Greetings,
I have discovered something rather odd.
If I run an minimal example (as shown in eigen-with-viennacl.cpp) all runs
fine where I pass a compressed_matrix directly to the copy e.g.
Eigen::SparseMatrix spAm;
... code to fill spAm;
viennacl::matrix A = viennacl::compressed_matrix(K, M)
Greetings,
Is there a way to take proxy (i.e. matrix_range) subsets of
compressed_matrix objects?
Currently, when I try to compile the g++ returns an error:
error: no type named 'cpu_value_type' in 'class
viennacl::compressed_matrix'
typedef matrix_basebase_type;
I want to make sure if I
Greetings,
I am currently working on setting up an existing project which uses
ViennaCL with the OpenCL backend to also compile with the CUDA backend. I
have encountered two issues that I would like to ask about.
1. CUDA 'contexts'
I previously was making sure that new viennacl::matrix objects w
Greetings,
I have another curious situation. I have installed pocl 0.14 on a ubuntu
14.04 system. I can install and run clinfo without any problems. However,
when I compile and run my context.cpp file (
https://github.com/cdeterman/gpuR/blob/develop/src/context.cpp) and try to
run the initConte
Greetings,
I am working on implementing some conversions from complex Eigen matrices
to viennacl matrices. I understand there is no native complex data types
but instead expanded to have real/imaginary components in every other
column.
That said, I have run in to a problem when trying to use the
columns in parallel in a single kernel.
>
> Best regards,
> Karli
>
>
> On 12/14/2016 06:01 PM, Charles Determan wrote:
>
>> A quick addition, it also only seems to crash when the number of rows in
>> the input matrix match or exceed 1000 (i.e. it works with the tri
A quick addition, it also only seems to crash when the number of rows in
the input matrix match or exceed 1000 (i.e. it works with the trivial
example with 100 rows).
Charles
On Wed, Dec 14, 2016 at 10:55 AM, Charles Determan
wrote:
> I have a function where I use a custom opencl kernel.
I have a function where I use a custom opencl kernel. The function is
below. The function runs without problem and provides the correct result
after the *first time* I call it. However, if I try to call the function
again it crashes right after the 'initialized' output where it is trying to
add
I have been looking through the documentation and I can't find any
direction on how to create a matrix without the default padding. This is
providing to be a memory problem for me when working with very 'narrow'
matrices that are also quite long filling up the available memory. If it
is in the do
That works perfectly, thanks Karl.
Regards,
Charles
On Wed, Nov 23, 2016 at 2:53 PM, Karl Rupp wrote:
> Hi Charles,
>
> Right now, if I want to take the negative of every element in a matrix I
>> end up doing the following:
>>
>> // previously assigned
>> viennacl::matrix vcl_A;
>>
>> // matrix
Greetings,
Right now, if I want to take the negative of every element in a matrix I
end up doing the following:
// previously assigned
viennacl::matrix vcl_A;
// matrix of zeros to subtract from
viennacl::matrix vcl_Z =
viennacl::zero_matrix(vcl_A.size1(),vcl_A.size2());
// subtract in-place
vc
Greetings,
What exactly is the distinction between vector and vector_base classes? I
assume that users would mostly use 'vector' but it appears 'vector_base'
has useful features such as casting a matrix to be interpreted as a vector
while sharing the memory (this would be very useful for 'vector'
I am trying to calculate the inverse of a matrix taking the advice from a
previous post (
https://sourceforge.net/p/viennacl/discussion/1143678/thread/ba394d35/)
suggesting the use of LU factorization. So I do the following:
I have vcl_A matrix
viennacl::vector vcl_lu_rhs(vcl_A.size1());
:
cl_command_queue queue =
vcl_A.handle().opencl_handle().context().get_queue().handle().get();
The program appears to run without problem now.
Regards,
Charles
On Wed, Aug 17, 2016 at 3:18 PM, Charles Determan
wrote:
> Ok, thanks, I will try asking those with clBLAS (I haven't started messing
> w
Ok, thanks, I will try asking those with clBLAS (I haven't started messing
with clMAGMA yet until I can get the clBLAS interface working). I will
report back if I manage to solve the problem.
Regards,
Charles
On Wed, Aug 17, 2016 at 3:16 PM, Karl Rupp wrote:
>
> Running again and printing the
Thanks for explanation Karl,
Running again and printing the cl_mem objects (from opencl_handle().get())
it appears that the relevant addresses (last three lines) are being used in
multiple areas such as 'Writing data'.
ViennaCL: Initializing context no. 1
ViennaCL: Initializing new ViennaCL conte
Just adding my opinion here as I have been following this thread. Would it
be possible to have both the .so library and header only options available
or is it a strictly 'this-or-that' scenario?
Regards,
Charles
On Wed, Aug 17, 2016 at 2:53 PM, Karl Rupp wrote:
> Hi Dmitriy,
>
> > We could
There is a fair amount of output, hopefully something here provides a clue
that you can understand.
ViennaCL: Initializing context no. 1
ViennaCL: Initializing new ViennaCL context.
ViennaCL: Setting all devices for context...
ViennaCL: Getting platform...
ViennaCL: Querying devices available at c
regards,
> Karli
>
>
>
>> On Tue, Aug 16, 2016 at 4:33 AM, Karl Rupp > <mailto:r...@iue.tuwien.ac.at>> wrote:
>>
>> Hi,
>>
>>
>>
>> On 08/15/2016 08:56 PM, Charles Determan wrote:
>>
>> Karl,
>>
>>
< numKernelArgs; i++) {
CL_CHECK( clSetKernelArg( clKernel, i, kernelArgSizes[i],
kernelArgs[i]) )
}
Regards,
Charles
On Tue, Aug 16, 2016 at 4:33 AM, Karl Rupp wrote:
> Hi,
>
>
>
> On 08/15/2016 08:56 PM, Charles Determan wrote:
>
>> Karl,
>>
>> I hav
gt;
>
>> I will continue to poke around (maybe I need to use internal_size
>> numbers) but thought I would ask you about this.
>>
>> Any insight?
>>
>> Thanks,
>>
>> Charles
>>
>> On Fri, Aug 12, 2016 at 3:21 PM, Charles Determan > <m
.
Any insight?
Thanks,
Charles
On Fri, Aug 12, 2016 at 3:21 PM, Charles Determan
wrote:
> Thanks Karl,
>
> One followup question, what distinguishes handle(), handle1(), and
> handle2()? Do they refer to different buffers?
>
> Regards,
> Charles
>
> On Fri, Aug 12,
t regards,
> Karli
>
>
> On 08/12/2016 09:39 PM, Charles Determan wrote:
>
>> I also would need to access the command queue handle (cl_command_queue)
>> object to pass to clBLAS and clMAGMA functions. Is this easily
>> accessible as well?
>>
>> Thank
I also would need to access the command queue handle (cl_command_queue)
object to pass to clBLAS and clMAGMA functions. Is this easily accessible
as well?
Thanks,
Charles
On Fri, Aug 12, 2016 at 11:45 AM, Charles Determan
wrote:
> Thanks Karl,
>
> I have been looking through the d
Thanks Karl,
I have been looking through the docs and I can't find an example for how to
pull the OpenCL handles from a matrix. I saw a couple I think from a
context but not sure that is what I need. Is this in the documentation
somewhere? The closest I could fine is this page (
http://viennacl
I have recently expressed some interest in different factorizations such as
QR and SVD. I am aware that these or currently experimental within
ViennaCL. Until such a time that these factorizations are fully supported
(I hope to contribute but the algorithms are quite complex) would it be
feasible
I know the intent is to remove boost from viennacl. As such, I was looking
at some files I could contribute to that removal. That said, before I
start blindly making changes, is there a plan for how to replace elements
such as `boost::numeric::ublas::prod`?
Is the intent to just use std objects
Hi Dmitriy,
If you have already initialized the matrix I believe you can get the padded
sizes use the respective 'internal' calls.
mat.internal_size1()
mat.internal_size2()
Regards,
Charles
On Tue, Jul 12, 2016 at 11:19 AM, Dmitriy Lyubimov
wrote:
> Thank you, Karl!
>
> Aha, so the fast_copy
gards,
Charles
On Fri, Jun 10, 2016 at 7:42 AM, Charles Determan
wrote:
> I neglected one further question you had
>
> Which local and global work sizes do you use?
>
> I am not setting any local/global work sizes as I thought the defaults
> specified by ViennaCL were supposed to be
Hi Karl,
I have been trying on and off to get this to work and I am completely
stumped. I have reversed the kernel so it is for row-major format. Right
now, if I use the logic you suggested (switching the '<' for '>') though
the kernel stops after the first column. So only the first element of
custom kernel section (at the very least another friendly
reminder). Not all repetition is bad :)
Thanks,
Charles
On Mon, May 23, 2016 at 2:03 PM, Karl Rupp wrote:
> Hi,
>
>
> On 05/23/2016 05:38 PM, Charles Determan wrote:
>
>> I am experimenting with the custom OpenCL ker
I am experimenting with the custom OpenCL kernel functionality,
specifically a naive matrix multiplication as an example.
My OpenCL Kernel:
__kernel void iMatMult(const int Mdim, const int Pdim,
__global const int *A, __global const int *B,
__global int *C) {
// Get the
In light of the recent question coming here regarding gpuR I was wondering
if I should alter the error function within RViennaCL. Do you mind the
users may come here if a function throws a ViennaCL error? I am trying to
implement many error checks from the R end and direct users of the R
packages
he 'other' context (in
> this example: with ID 0) first. Automatic context migration is not
> supported, because that can cause quite a couple of undesired side effects.
>
> If you want to make sure that ['A' resides on the correct context, call
> .switch_
afely but this doesn't appear to behave the way I was expecting.
Regards,
Charles
On Tue, May 10, 2016 at 10:54 AM, Charles Determan
wrote:
> That does it, didn't think to look for an explicit context.hpp file.
> Makes sense that the it is with the matrix.hpp file now.
>
> T
u tried to include viennacl/context.hpp directly?
>
> Best regards,
> Karli
>
>
>
> On Tue, May 10, 2016 at 8:40 AM, Charles Determan > <mailto:cdeterma...@gmail.com>> wrote:
>>
>> Excellent, thank you for explaining that. One followup thing, I am
&
nt.
Regards,
Charles
On Tue, May 10, 2016 at 8:40 AM, Charles Determan
wrote:
> Excellent, thank you for explaining that. One followup thing, I am trying
> a trivial function to test this:
>
> int findContext(int x){
> viennacl::context ctx(viennacl::ocl::get_context(stati
ples here:
>
> https://github.com/viennacl/viennacl-dev/blob/master/examples/tutorial/multithreaded.cpp
>
> https://github.com/viennacl/viennacl-dev/blob/master/examples/tutorial/multithreaded_cg.cpp
>
> Best regards,
> Karli
>
>
>
>
> On 05/09/2016 10:32 PM, Charl
I am trying to use multiple GPU's in parallel using ViennaCL through my
gpuR package. In essence the context is selected at the R level (one
context per device already initialized). Then a matrix is created on that
device. The code looks like this:
create_matrix <- function(id){
# sets context
Thanks Karl,
No you aren't missing anything. Thanks for pointing out the obvious. Not
sure why I didn't think about that (recycling too much code on my end).
Regards,
Charles
On Tue, May 3, 2016 at 3:31 PM, Karl Rupp wrote:
> Hi Charles,
>
> > Is there any way to filter device types without
Greetings,
Is there any way to filter device types without initializing a context and
changing the default device type for example:
viennacl::ocl::set_context_device_type(id, viennacl::ocl::gpu_tag());
viennacl::ocl::current_context().devices().size();
I can access the platform(s) with
Karl,
At the moment, the only 'request' has been in the issue I linked to
previously where a user has a matrix too large to fit on one GPU. This can
be addressed by explicit matrix chunking that I could handle perhaps more
simply from the R end. It just starts to get more complex with the solvers
Hi Karl,
Thanks for getting back, there isn't anything else at the moment. The
issue was needing to use setup_context to explicitly assign the devices.
However, since I have you attention, is there any way for using multiple
GPUs on a single job (e.g. GEMM)?
Let's say I have two matrices that a
Greetings,
I am trying to set up a list of contexts whereby each context represents
one platform and one device. I was thinking the function found here (
https://github.com/cdeterman/gpuR/blob/develop/src/context.cpp) starting at
line 108 (listContexts) would work.
However, as seen in this issue
Greetings,
I read on a prior post on Karl Rupp's website regarding project ideas for
GSoC 2014 (
https://www.karlrupp.net/2014/02/mentored-project-ideas-for-gsoc-2014/).
One of those was to implement sort() methods. Was this ever
accomplished/implemented? I haven't found anything in the document
correctly again.
Apologies for the extra message on the board.
Regards,
Charles
On Mon, Feb 1, 2016 at 2:55 PM, Charles Determan
wrote:
> I am trying to convert some more of my raw OpenCL code over to use
> ViennaCL in my gpuR package (https://github.com/cdeterman/gpuR).
> However, I have ru
I am trying to convert some more of my raw OpenCL code over to use ViennaCL
in my gpuR package (https://github.com/cdeterman/gpuR). However, I have
run in to a very strange result that I can't seem to understand. I simply
want to count the number of devices for a given platform.
I can do this wi
no way of getting
>> the internal index. You can, however, edit viennacl/ocl/backend.hpp
>> and add a public member function in viennacl::ocl::backend returning
>> the index.
>>
>> Best regards,
>> Karli
>>
>>
>>
>>
owever, edit viennacl/ocl/backend.hpp and add a
> public member function in viennacl::ocl::backend returning the index.
>
> Best regards,
> Karli
>
>
>
> On 01/29/2016 04:00 PM, Charles Determan wrote:
>
>> While trying to figure out the device index I thought the
ssion? If this functionality doesn't exist I can likely write this.
I still have made no headway on the context index.
Regards,
Charles
On Thu, Jan 28, 2016 at 1:30 PM, Charles Determan
wrote:
> A user can switch contexts easily with
>
> long id = 1;
> viennacl::ocl::switch_cont
A user can switch contexts easily with
long id = 1;
viennacl::ocl::switch_context(id);
Is there a way to determine the current context index? In this case it
would return 1?
The corollary for platform is:
viennacl::ocl::current_context().platform_index()
I also don't see a method for device_
Okay, I just wanted to make sure I understood how resize currently works.
Regarding an interface, the simplest I would imagine something along the
lines of a flag for resize for example:
vclA.resize(0) - default for adding to right
vclA.resize(1) - default for adding to left
but perhaps a more d
Karl,
Okay, I thought that would be a workaround. Does the current `resize`
method create a copy of the matrix internally as well? Ideally one could
resize without the copying overhead.
Also, would you consider this as new functionality to be added in the
future? If so I can create a new githu
Greetings,
I can easily resize a matrix with the `resize` function
viennacl::matrix vcl_A(3,3);
vcl_A.resize(3,4);
but I notice that this adds the new column on the end of the matrix. Is
there a way to append it on to the front of the matrix?
Regards,
Charles
--
Greetings,
I know I can set a device type with:
viennacl::ocl::set_context_device_type(id, viennacl::ocl::gpu_tag());
but is there a where for me to subsequently change that to `cpu_tag()`
within the same main() function? I see I can change devices with:
viennacl::ocl::current_context().switch
I have read in the documentation that I can use viennacl::range or
viennacl::slice to subset a matrix. However, is there a way to subset a
matrix with indices that aren't in a patter?
Lets say I have a matrix with dimensions 10x10 and I want to subset the
1,2,5,8, and 9 columns so the resulting
lumn is more
> involved, though...
>
> In either case you really want to iterate over elements and use
> per-element access. This is because each access entails a host<->device
> communication, which is very costly with CUDA and OpenCL.
>
> Best regards,
> Karli
>
&
I have seen in the documentation that it is simple to access an individual
element in a viennacl::matrix with
mat(i,j)
but how could I access an entire row or column? Is there similar syntax or
would I need to iterate over each element of a row/column?
Thanks,
Charles
--
Sure enough, don't know how I overlooked that :)
Thanks,
Charles
On Wed, Aug 12, 2015 at 12:56 PM, wrote:
> Hi,
>
> you are looking for outer_prod:
>
>
> http://viennacl.sourceforge.net/doc/manual-operations.html#manual-operations-blas2
>
> :-)
>
> Best regar
Is there a way to get the outer product of two viennacl::vector objects
where the output would be a new viennacl::matrix? The use of inner_prod is
simple enough and naturally I assumed I would use prod.hpp. But my code
errors out with:
vcl_C = viennacl::linalg::prod(vcl_A, vcl_B);
no match for
Charles,
>>
>> can you please quantify what you mean by 'slower'? How does
>> 'slower'
>> change as you increase the problem size? I would not be
>> surprised if
>> you see no performance gains below matr
27;
>> change as you increase the problem size? I would not be surprised if
>> you see no performance gains below matrices of size 500-by-500. With
>> the extra back-and-forth through PCI-Express you may even need
>> matrices of at least 1000-by-1000.
>>
>>
xtra
> back-and-forth through PCI-Express you may even need matrices of at least
> 1000-by-1000.
>
> Best regards,
> Karli
>
>
>
> On 07/31/2015 09:04 PM, Charles Determan wrote:
>
>> Greetings,
>>
>> Brief background, I am developing a series of R
Greetings,
Brief background, I am developing a series of R packages to bring ViennaCL
to the R community. I have had success with the development of my gpuR
package (https://github.com/cdeterman/gpuR) which relies on the OpenCL
backend of ViennaCL (which is housed in the package RViennaCL). I am
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 learnin
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 mean
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 (reduct
tion has been updated to also
>> return eigenvectors:
>>
>> https://github.com/viennacl/viennacl-dev/commit/e80cc2141f266eb9b279dd45b7c4075b557bf558
>>
>> Please let me know if you run into issues.
>>
>> Best regards,
>> Karli
>>
>
.com/viennacl/viennacl-dev/commit/e80cc2141f266eb9b279dd45b7c4075b557bf558
>
> Please let me know if you run into issues.
>
> Best regards,
> Karli
>
>
>
> On 07/08/2015 06:58 PM, Charles Determan wrote:
>
>> Greetings,
>>
>> I have seen that I can get all th
Greetings,
I have seen that I can get all the eigenvalues with the lanczos algorithm
in the lanczos.cpp example file but I don't see any documentation on
eigenvectors. The only thing I have found is on the
feature-improve-lanczos branch
https://github.com/viennacl/viennacl-dev/blob/karlrupp/featu
> interactive through a plugin loader. Such a plugin system might be too
> 'radical' with respect to the way libraries are used for scientific
> computing, so I'm still hesitant whether this would be worth the effort for
> the future. Any input on this is of course appre
015 03:08 PM, Charles Determan wrote:
>
>> Thank you Karli,
>>
>> The ViennaCL library does appear to be impressive and I am excited to
>> begin using it. Just so I know I understand you clearly. Unless I
>> compile the libviennacl shared library (with dense linea
Thank you Karli,
The ViennaCL library does appear to be impressive and I am excited to begin
using it. Just so I know I understand you clearly. Unless I compile the
libviennacl shared library (with dense linear algebra focuse) and link
against it I would need to use nvcc to compile a program I w
compiled CUDA programs simply with g++ previously. If viennacl does
require NVCC to use CUDA backend, could someone kindly explain why this is
so?
Thank you,
Charles Determan
--
One dashboard for servers and applications
74 matches
Mail list logo