mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Fixes the build of projects that depend on torch, such as torchaudio. Otherwise torchaudio will complain that gloo_hip is missing. Pull Request resolved: https://github.com/pytorch/pytorch/pull/54727 Reviewed By: H-Huang Differential Revision: D27361513 Pulled By: ezyang fbshipit-source-id: 714cc2db23e7adf3e89303e941b78c27625b9460
38 lines
1.4 KiB
CMake
38 lines
1.4 KiB
CMake
add_subdirectory(aten)
|
|
add_subdirectory(nccl)
|
|
add_subdirectory(opencl)
|
|
add_subdirectory(prof)
|
|
add_subdirectory(shm_mutex)
|
|
add_subdirectory(fakelowp)
|
|
if(USE_TENSORRT)
|
|
add_subdirectory(tensorrt)
|
|
endif()
|
|
|
|
# Only build Gloo Caffe2 ops on Linux, as it hardcodes
|
|
# the Linux-specific `gloo::transport::tcp` namespace.
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
add_subdirectory(gloo)
|
|
endif()
|
|
|
|
# Pass the src lists back to the parent
|
|
|
|
# CPU source, include, deps, test sources, binary sources
|
|
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_CPU_INCLUDE ${Caffe2_CPU_INCLUDE} PARENT_SCOPE)
|
|
set(Caffe2_DEPENDENCY_LIBS ${Caffe2_DEPENDENCY_LIBS} PARENT_SCOPE)
|
|
set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_CPU_BINARY_SRCS ${Caffe2_CPU_BINARY_SRCS} PARENT_SCOPE)
|
|
|
|
# GPU source, include, deps, test sources, binary sources
|
|
set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_GPU_INCLUDE ${Caffe2_GPU_INCLUDE} PARENT_SCOPE)
|
|
set(Caffe2_CUDA_DEPENDENCY_LIBS ${Caffe2_CUDA_DEPENDENCY_LIBS} PARENT_SCOPE)
|
|
set(Caffe2_GPU_TEST_SRCS ${Caffe2_GPU_TEST_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_GPU_BINARY_SRCS ${Caffe2_GPU_BINARY_SRCS} PARENT_SCOPE)
|
|
|
|
# HIP sources, include, test sources
|
|
set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} PARENT_SCOPE)
|
|
set(Caffe2_HIP_INCLUDE ${Caffe2_HIP_INCLUDE} PARENT_SCOPE)
|
|
set(Caffe2_HIP_DEPENDENCY_LIBS ${Caffe2_HIP_DEPENDENCY_LIBS} PARENT_SCOPE)
|
|
set(Caffe2_HIP_TEST_SRCS ${Caffe2_HIP_TEST_SRCS} PARENT_SCOPE)
|