forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove caffe2 from more build files (pytorch#125898)
Co-authored-by: Aaron Gokaslan <[email protected]> Pull Request resolved: pytorch#125898 Approved by: https://github.com/Skylion007
- Loading branch information
1 parent
b620231
commit b9e7b35
Showing
70 changed files
with
36 additions
and
5,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,4 @@ | ||
if(NOT BUILD_CAFFE2 OR INTERN_BUILD_MOBILE) | ||
list(APPEND Caffe2_CPU_SRCS | ||
"${CMAKE_CURRENT_SOURCE_DIR}/common.cc" | ||
) | ||
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} PARENT_SCOPE) | ||
return() | ||
endif() | ||
|
||
# ---[ GPU files | ||
# ------[ cuDNN | ||
if(USE_CUDNN) | ||
file(GLOB tmp *_cudnn.cc) | ||
set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} ${tmp}) | ||
endif() | ||
# ------[ general GPU | ||
file(GLOB tmp *_gpu.cc) | ||
set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} ${tmp}) | ||
# ------[ CUDA sources | ||
file(GLOB tmp *.cu) | ||
set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} ${tmp}) | ||
# exclude test files | ||
file(GLOB tmp *_test.cc) | ||
exclude(Caffe2_GPU_SRCS "${Caffe2_GPU_SRCS}" ${tmp}) | ||
|
||
# ---[ general HIP files | ||
file(GLOB tmp hip/*.cc) | ||
set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} ${tmp}) | ||
# ------[ HIP sources | ||
file(GLOB tmp hip/*.hip) | ||
set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} ${tmp}) | ||
# exclude test files | ||
file(GLOB tmp hip/*_test.cc) | ||
exclude(Caffe2_HIP_SRCS "${Caffe2_HIP_SRCS}" ${tmp}) | ||
|
||
# ---[ CPU files. | ||
file(GLOB tmp *.cc) | ||
# Manually remove the cudnn files since we might be using USE_CUDNN=OFF | ||
# TODO: when we move to explicit file list, this would not be needed. | ||
file(GLOB tmp_cudnn *_cudnn.cc) | ||
exclude(tmp "${tmp}" ${tmp_cudnn}) | ||
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} ${tmp}) | ||
# exclude test files and gpu files | ||
file(GLOB tmp *_test.cc) | ||
exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp}) | ||
exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${Caffe2_GPU_SRCS}) | ||
exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${Caffe2_HIP_SRCS}) | ||
|
||
# ---[ GPU test files | ||
file(GLOB tmp *_gpu_test.cc) | ||
set(Caffe2_GPU_TEST_SRCS ${Caffe2_GPU_TEST_SRCS} ${tmp}) | ||
|
||
# ---[ HIP test files | ||
file(GLOB tmp hip/*_test.cc) | ||
set(Caffe2_HIP_TEST_SRCS ${Caffe2_HIP_TEST_SRCS} ${tmp}) | ||
|
||
# ---[ CPU test files | ||
file(GLOB tmp *_test.cc) | ||
set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} ${tmp}) | ||
exclude(Caffe2_CPU_TEST_SRCS "${Caffe2_CPU_TEST_SRCS}" ${Caffe2_GPU_TEST_SRCS}) | ||
exclude(Caffe2_CPU_TEST_SRCS "${Caffe2_CPU_TEST_SRCS}" ${Caffe2_HIP_TEST_SRCS}) | ||
|
||
# ---[ Send the lists to the parent scope. | ||
list(APPEND Caffe2_CPU_SRCS | ||
"${CMAKE_CURRENT_SOURCE_DIR}/common.cc" | ||
) | ||
set(Caffe2_CPU_SRCS ${Caffe2_CPU_SRCS} PARENT_SCOPE) | ||
set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} PARENT_SCOPE) | ||
set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} PARENT_SCOPE) | ||
set(Caffe2_CPU_TEST_SRCS ${Caffe2_CPU_TEST_SRCS} PARENT_SCOPE) | ||
set(Caffe2_GPU_TEST_SRCS ${Caffe2_GPU_TEST_SRCS} PARENT_SCOPE) | ||
set(Caffe2_HIP_TEST_SRCS ${Caffe2_HIP_TEST_SRCS} PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.