This forum has been archived. All content is frozen. Please use KDE Discuss instead.

compile error with Visual Studio & CUDA

Tags: None
(comma "," separated)
lievenv
Registered Member
Posts
1
Karma
0
Hello everyone,

I'm building a CUDA project on Windows with Visual Studio 2013, using VC12 and the newest nvcc from CUDA 7.0 RC.
As recommended I'm using the latest Eigen-dev branch.

Currently I'm trying to pass a Vector3d to a kernel, but during compilation I'm getting these errors, and I'm hoping that someone could help me with them.
Thanks in advance! :)
Error : declaration is incompatible with "void Eigen::BDCSVD<_MatrixType>::structured_update(Eigen::Block<Eigen::Matrix<Eigen::NumTraits<_MatrixType::Scalar>::Real, Eigen::Dynamic, Eigen::Dynamic, <expression>, Eigen::Dynamic, Eigen::Dynamic>, Eigen::Dynamic, Eigen::Dynamic, false>, const Eigen::BDCSVD<_MatrixType>::MatrixXr &, Eigen::SVDBase<Eigen::BDCSVD<_MatrixType>>::Index)"
c:\libraries\eigen-nvcc\eigen\src\SVD\BDCSVD.h Line(302) Column(1)
Error : no instance of overloaded function "Eigen::DenseBase<Derived>::replicate" matches the specified type
c:\libraries\eigen-nvcc\eigen\src\Core\Replicate.h Line(156) Column(1)
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
CUDA with MSVC has been really tested yet. Do you really need SVD on CUDA side? Perhaps it would be safer to first try with Eigen/Core features only.
zerka
Registered Member
Posts
2
Karma
0
Hi, I am having this issue as well and for me being able to use Eigen + CUDA would be a major advantage. Only importing Eigen/Core solves the SVD issue, but we are left with the replicate problem. Specifically

eigen\eigen\src/Core/Replicate.h(128): error : no instance of overloaded function "Eigen::DenseBase<Derived>::replicate" matches the specified type


Does anyone have any idea what is causing this? If i had a pointer in the right direction I may pursue trying to get MSVC support for Eigen+CUDA running, but currently I'm quite lost at what could cause this. The bug persists even with CUDA 7.5.
zerka
Registered Member
Posts
2
Karma
0
Ok, I have fixed the issues, and they seem related to NVCC failing to parse template code declared in one place and defined in another. I have forked Eigen and have this on the following repo:

https://github.com/Berzerka/eigen

If anyone more experianced than me with the flow wants to integrate this into the main branch, it would be great. With some pointers I may even be able to do it myself.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]