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 were being
created with the correct context.  For example:

// ctx_id previously passed as int
viennacl::context ctx(viennacl::ocl::get_context(ctx_id));

// new matrix
viennacl::matrix<T> vclMat(K,M, ctx = ctx);

Now, obviously if I am using the CUDA backend, there is no
`viennacl::ocl::get_contex` method.  What is the recommendation in this
instance?

2. Compilation is failing with Eigen::Map classes
I thought this was previously resolved with a previous issue (
https://github.com/viennacl/viennacl-dev/issues/137) but when I try to
compile with nvcc I get the following error (representative example of
many):

/usr/local/lib/R/site-library/RViennaCL/include/viennacl/traits/size.hpp(164):
error: class "Eigen::Map<Eigen::Matrix<int, -1, -1, 0, -1, -1>, 0,
Eigen::OuterStride<-1>>" has no member "size1"
          detected during:
            instantiation of "viennacl::vcl_size_t
viennacl::traits::size1(const MatrixType &) [with
MatrixType=Eigen::Map<Eigen::Matrix<int, -1, -1, 0, -1, -1>, 0,
Eigen::OuterStride<-1>>]"
/usr/local/lib/R/site-library/RViennaCL/include/viennacl/matrix.hpp(1178):
here
            instantiation of "void viennacl::copy(const
viennacl::matrix<NumericT, F, AlignmentV> &, CPUMatrixT &) [with
CPUMatrixT=Eigen::Map<Eigen::Matrix<int, -1, -1, 0, -1, -1>, 0,
Eigen::OuterStride<-1>>, NumericT=int, F=viennacl::row_major,
AlignmentV=1U]"
../inst/include/gpuR/dynEigenMat.hpp(353): here
            instantiation of "void dynEigenMat<T>::to_host() [with T=int]"
../inst/include/gpuR/dynEigenMat.hpp(377): here

Regards,
Charles
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to