Make DEBUG == REL_WITH_DEB_INFO on CUDA build (#34153)

Summary:
Related issue: https://github.com/pytorch/pytorch/issues/34079

I don't know how much we care about the difference between `-G` and `-lineinfo` in `DEBUG` vs `REL_WITH_DEB_INFO`, but since `-G` never worked, let's just use `-lineinfo` on both `DEBUG` and `REL_WITH_DEB_INFO`. This would resolve the failure in `DEBUG=1` build. Locally tested to work.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34153

Reviewed By: ljk53

Differential Revision: D20232049

Pulled By: ngimel

fbshipit-source-id: 4e48ff818850ba911298b0cc159522f33a305aaa
This commit is contained in:
Xiang Gao 2020-03-03 15:01:08 -08:00 committed by Facebook Github Bot
parent cb3905e8cf
commit 1beb309e03

View File

@ -304,7 +304,7 @@ if (MSVC)
endif(MSVC)
IF(NOT MSVC)
SET(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -g -G --source-in-ptx")
SET(CUDA_NVCC_FLAGS_DEBUG "${CUDA_NVCC_FLAGS_DEBUG} -g -lineinfo --source-in-ptx")
SET(CUDA_NVCC_FLAGS_RELWITHDEBINFO "${CUDA_NVCC_FLAGS_RELWITHDEBINFO} -g -lineinfo --source-in-ptx")
ENDIF(NOT MSVC)