mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "Remove THC from OSS build (#134969)"
This reverts commit 9c7660be0ee155baf0cb7e1e67708dd784ac5796. Reverted https://github.com/pytorch/pytorch/pull/134969 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it is breaking the installation of https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu#L76 ([comment](https://github.com/pytorch/pytorch/pull/134969#issuecomment-2499275378))
This commit is contained in:
@ -301,6 +301,7 @@ cc_library(
|
||||
"aten/src/**/*.hpp",
|
||||
"aten/src/ATen/cuda/**/*.cuh",
|
||||
"aten/src/ATen/native/**/*.cuh",
|
||||
"aten/src/THC/*.cuh",
|
||||
],
|
||||
) + [
|
||||
":aten_src_ATen_config",
|
||||
|
@ -79,9 +79,11 @@ if(USE_ROCM)
|
||||
# TODO: AT_HIP_ENABLED (change this once we represent HIP as HIP in
|
||||
# ATen proper)
|
||||
set(AT_CUDA_ENABLED 1)
|
||||
add_subdirectory(src/THH)
|
||||
message("ROCm is enabled.")
|
||||
elseif(USE_CUDA)
|
||||
set(AT_CUDA_ENABLED 1)
|
||||
add_subdirectory(src/THC)
|
||||
else()
|
||||
message("disabling CUDA because USE_CUDA is set false")
|
||||
set(AT_CUDA_ENABLED 0)
|
||||
|
8
aten/src/THC/CMakeLists.txt
Normal file
8
aten/src/THC/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
set(ATen_CUDA_INCLUDE ${ATen_CUDA_INCLUDE}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
PARENT_SCOPE)
|
||||
|
||||
install(FILES
|
||||
THCAtomics.cuh
|
||||
THCDeviceUtils.cuh
|
||||
DESTINATION "${ATEN_INSTALL_INCLUDE_SUBDIR}/THC")
|
Reference in New Issue
Block a user