mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Append multiple arguments to list of flags as multiple items (#34899)
Summary: This makes PyTorch compileable(but not linkable) with `CUDA_SEPARABLE_COMPILATION` option enabled. Pull Request resolved: https://github.com/pytorch/pytorch/pull/34899 Test Plan: CI Differential Revision: D20501050 Pulled By: malfet fbshipit-source-id: 02903890a827fcc430a26f397d4d05999cf3a441
This commit is contained in:
parent
841f7600bb
commit
f87cd83d11
2 changed files with 3 additions and 3 deletions
|
|
@ -306,8 +306,8 @@ if (MSVC)
|
|||
endif(MSVC)
|
||||
|
||||
IF(NOT MSVC)
|
||||
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")
|
||||
list(APPEND CUDA_NVCC_FLAGS_DEBUG "-g" "-lineinfo" "--source-in-ptx")
|
||||
list(APPEND CUDA_NVCC_FLAGS_RELWITHDEBINFO "-g" "-lineinfo" "--source-in-ptx")
|
||||
ENDIF(NOT MSVC)
|
||||
|
||||
# Set INTERN_BUILD_MOBILE for all mobile builds. Components that are not
|
||||
|
|
|
|||
|
|
@ -1291,7 +1291,7 @@ if (NOT INTERN_BUILD_MOBILE)
|
|||
LIST(APPEND CUDA_NVCC_FLAGS ${TORCH_NVCC_FLAGS})
|
||||
LIST(APPEND CUDA_NVCC_FLAGS ${NVCC_FLAGS_EXTRA})
|
||||
IF (CMAKE_POSITION_INDEPENDENT_CODE AND NOT MSVC)
|
||||
LIST(APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC")
|
||||
LIST(APPEND CUDA_NVCC_FLAGS "-Xcompiler" "-fPIC")
|
||||
ENDIF()
|
||||
|
||||
IF (CUDA_HAS_FP16 OR NOT ${CUDA_VERSION} LESS 7.5)
|
||||
|
|
|
|||
Loading…
Reference in a new issue