I have observed that tons of "calling a __host__ function from a __host__ __device__ function is not allowed" warnings are thrown when using NVCC 8.0.61 with Eigen 3.3.
In the master/default branch, a fix by Abhijit Kundu (#311) was merged by Benoit Steiner. But unfortunately it was not applied to the 3.3 branch.
This patch simply disable this warning:
#pragma diag_suppress 2739
I'm not sure that's really the right fix.
You are right that only the warnings are suppressed rather than truely fixed. I think there are two options:
1. Backport the "suppression fix" from master/default and argue that this kind of support is sufficient for the 3.3 branch.
2. Try to fix these kinds of warnings by allowing more parts of Eigen to run on the GPU (-> applying EIGEN_DEVICE_FUNC) and backporting them to the 3.3 branch.
In future versions of Eigen (master/default), one should definitly go with the second option. For 3.3 which is in maintainance mode (correct me if I am wrong) the decision is a bit more complicated. It depends on what kind of CUDA support the 3.3 branch should provide (until it reaches EOL).
The suppression fix does not seem to work anymore with Eigen master and CUDA/nvcc 9.1. The Eigen headers spew a lot of the "calling a __host__ function from a __host__ __device__ function is not allowed" warnings. Option 2 above sounds ideal, but in the meantime, making the suppression work again would be awesome. Seems like it could just be another one-line patch to DisableStupidWarnings.h if you know the right diag_suppress code, which I guess keeps changing with different CUDA versions? How on earth did you find the right suppression codes for previous versions? :) (Seems this is not documented anywhere!) I'd be happy to help if possible but nvcc is a bit of a black box to me. Thanks for any ideas or pointers, hopefully this issue can be solved!