When I tried to set -g3 for CMakeLists.txt, I failed to compile in cuda file.
This is occured on v0.4.1 and master branch (for same file with same error message)
Is there any good way to solve this?
It seems Distributions.h file problem.
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
if(NOT MSVC)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g3 -fPIC")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing")

[1486/2084] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_channel_shuffle_op.cu.o
[1487/2084] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/caffe2_gpu_generated_Distributions.cu.o
FAILED: caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/caffe2_gpu_generated_Distributions.cu.o
cd /work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda && /usr/bin/cmake -E make_directory /work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/. && /usr/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=/work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/./caffe2_gpu_generated_Distributions.cu.o -D generated_cubin_file:STRING=/work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/./caffe2_gpu_generated_Distributions.cu.o.cubin.txt -P /work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/caffe2_gpu_generated_Distributions.cu.o.Release.cmake
/work/pytorch-develop/aten/src/ATen/native/Distributions.h(191): error: name followed by "::" must be a class or namespace name

1 error detected in the compilation of "/tmp/tmpxft_00019400_00000000-4_Distributions.cpp4.ii".
CMake Error at caffe2_gpu_generated_Distributions.cu.o.Release.cmake:279 (message):
  Error generating file
  /work/pytorch-develop/build/caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/./caffe2_gpu_generated_Distributions.cu.o


[1488/2084] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/operators/caffe2_gpu_generated_space_batch_op_gpu.cu.o
[1489/2084] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/caffe2_gpu_generated_TensorFactories.cu.o
[1490/2084] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/__/aten/src/ATen/native/cuda/caffe2_gpu_generated_Unique.cu.o
ninja: build stopped: subcommand failed.
setup.py::build_deps::run()
Failed to run 'bash ../tools/build_pytorch_libs.sh --use-cuda --use-nnpack --use-qnnpack caffe2'