StyleGAN2: NVCC error after installing CUDA with Lambda Stack


I’m a proud user of Lambda Stack and I thank you for this amazing work. After 6 months of intense use, I ran today in the first issue.

I’m trying to run StyleGAN2 on my ubuntu computer on which I installed cuda & stuff with Lambda Stack.

It does not work because of the NVCC installation. In the repository, they warn you about this:

StyleGAN2 relies on custom TensorFlow ops that are compiled on the fly using NVCC. To test that your NVCC installation is working correctly, run: nvcc -o test_nvcc -run

The code they mention tests the installation of NVCC:

And running this code after installing cuda with lambda labs yields the following error: error: no instance of overloaded function "cudaLaunchKernel" matches the argument list
        argument types are: (void (), int, int, long, int, long)

1 error detected in the compilation of "/tmp/tmpxft_00004cd3_00000000-8_test_nvcc.cpp1.ii".

Here is the output of nvcc --version on my computer:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

Can you please advise on this issue?
Have a great day!

After numerous hours of debugging, I have found that the bug has nothing to do with Lambda Stack. I had put more trust in their code than in yours: it’s a mistake I won’t to again !

Solution for the curious : ignore the nvcc testing part, it’s broken. Add -std=c++11 -DNDEBUG after nvcc commands in