Repository navigation
Precommit: Format CMake files (Part II) #8187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Growl1234
wants to merge
1
commit into
deepmodeling:develop
Choose a base branch
from
Growl1234:precommit-cmake
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,854
−4,972
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,4 +1,12 @@ | ||
| # Do not prettify comments | ||
| # Workaround due to cmake-format bug; should use "--enable-markup=false" in args instead | ||
| markup: | ||
| enable_markup: false | ||
|
|
||
| # Make self-defined testing helper happy | ||
| parse: | ||
| additional_commands: | ||
| addtest: | ||
| kwargs: | ||
| TARGET: 1 | ||
| SOURCES: '+' | ||
| LIBS: '*' |
This file contains hidden or 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 hidden or 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,7 +1,6 @@ | ||
| abacus_disable_feature_definitions(__MPI) | ||
|
|
||
| AddTest( | ||
| TARGET MODULE_BASE_KERNELS_Unittests | ||
| LIBS parameter base device | ||
| SOURCES math_ylm_op_test.cpp math_kernel_test.cpp | ||
| ) | ||
| addtest( | ||
| TARGET MODULE_BASE_KERNELS_Unittests | ||
| LIBS parameter base device | ||
| SOURCES math_ylm_op_test.cpp math_kernel_test.cpp) |
This file contains hidden or 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,11 +1,5 @@ | ||
| abacus_disable_feature_definitions(__MPI) | ||
|
|
||
| AddTest( | ||
| TARGET MODULE_BASE_LIBM_UTs | ||
| SOURCES libm_test.cpp | ||
| ../branred.cpp | ||
| ../cexp.cpp | ||
| ../exp.cpp | ||
| ../sincos.cpp | ||
| ) | ||
|
|
||
| addtest(TARGET MODULE_BASE_LIBM_UTs | ||
| SOURCES libm_test.cpp ../branred.cpp ../cexp.cpp ../exp.cpp | ||
| ../sincos.cpp) |
This file contains hidden or 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,2 +1,4 @@ | ||
| file(GLOB ATen_CORE_SRCS "*.cpp") | ||
| set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${ATen_CORE_SRCS} PARENT_SCOPE) | ||
| set(ATen_CPU_SRCS | ||
| ${ATen_CPU_SRCS} ${ATen_CORE_SRCS} | ||
| PARENT_SCOPE) |
16 changes: 11 additions & 5 deletions
16
source/source_base/module_container/ATen/kernels/CMakeLists.txt
This file contains hidden or 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
9 changes: 4 additions & 5 deletions
9
source/source_base/module_container/ATen/kernels/test/CMakeLists.txt
This file contains hidden or 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,8 +1,7 @@ | ||
| AddTest( | ||
| addtest( | ||
| TARGET MODULE_BASE_container_kernels_uts | ||
| LIBS parameter | ||
| SOURCES blas_test.cpp lapack_test.cpp | ||
| memory_test.cpp linalg_test.cpp | ||
| ) | ||
| SOURCES blas_test.cpp lapack_test.cpp memory_test.cpp linalg_test.cpp) | ||
|
|
||
| target_link_libraries(MODULE_BASE_container_kernels_uts PRIVATE container base device) | ||
| target_link_libraries(MODULE_BASE_container_kernels_uts PRIVATE container base | ||
|
Growl1234 marked this conversation as resolved.
|
||
| device) | ||
12 changes: 7 additions & 5 deletions
12
source/source_base/module_container/ATen/ops/CMakeLists.txt
This file contains hidden or 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,9 +1,11 @@ | ||
| file(GLOB ATen_OPS_SRCS "*.cpp") | ||
|
|
||
| set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${ATen_OPS_SRCS} PARENT_SCOPE) | ||
| set(ATen_CPU_SRCS | ||
| ${ATen_CPU_SRCS} ${ATen_OPS_SRCS} | ||
| PARENT_SCOPE) | ||
|
|
||
| if(BUILD_TESTING) | ||
| if(ENABLE_MPI) | ||
| add_subdirectory(test) | ||
| endif() | ||
| endif() | ||
| if(ENABLE_MPI) | ||
| add_subdirectory(test) | ||
| endif() | ||
| endif() |
8 changes: 4 additions & 4 deletions
8
source/source_base/module_container/ATen/ops/test/CMakeLists.txt
This file contains hidden or 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,7 +1,7 @@ | ||
| AddTest( | ||
| addtest( | ||
| TARGET MODULE_BASE_container_ops_uts | ||
| LIBS parameter | ||
| SOURCES einsum_op_test.cpp linalg_op_test.cpp ../../kernels/lapack.cpp | ||
| ) | ||
| SOURCES einsum_op_test.cpp linalg_op_test.cpp ../../kernels/lapack.cpp) | ||
|
|
||
| target_link_libraries(MODULE_BASE_container_ops_uts PRIVATE container base device) | ||
| target_link_libraries(MODULE_BASE_container_ops_uts PRIVATE container base | ||
| device) | ||
|
Growl1234 marked this conversation as resolved.
|
||
This file contains hidden or 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
15 changes: 6 additions & 9 deletions
15
source/source_base/module_container/base/core/CMakeLists.txt
This file contains hidden or 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,12 +1,9 @@ | ||
| set(BASE_CORE_CPU_SRCS | ||
| base/core/refcount.cpp | ||
| base/core/cpu_allocator.cpp | ||
| ) | ||
| set(BASE_CORE_CPU_SRCS base/core/refcount.cpp base/core/cpu_allocator.cpp) | ||
|
|
||
| if (USE_CUDA OR USE_ROCM) | ||
| list(APPEND BASE_CORE_CPU_SRCS | ||
| base/core/gpu_allocator.cpp | ||
| ) | ||
| if(USE_CUDA OR USE_ROCM) | ||
| list(APPEND BASE_CORE_CPU_SRCS base/core/gpu_allocator.cpp) | ||
| endif() | ||
|
|
||
| set(ATen_CPU_SRCS ${ATen_CPU_SRCS} ${BASE_CORE_CPU_SRCS} PARENT_SCOPE) | ||
| set(ATen_CPU_SRCS | ||
| ${ATen_CPU_SRCS} ${BASE_CORE_CPU_SRCS} | ||
| PARENT_SCOPE) |
This file contains hidden or 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,9 +1,12 @@ | ||
| abacus_disable_feature_definitions(__MPI) | ||
|
|
||
| AddTest( | ||
| addtest( | ||
| TARGET MODULE_BASE_CONTAINER_Unittests | ||
| LIBS parameter container base device | ||
| SOURCES tensor_test.cpp tensor_shape_test.cpp allocator_test.cpp | ||
| tensor_buffer_test.cpp tensor_map_test.cpp | ||
| tensor_utils_test.cpp tensor_accessor_test.cpp | ||
| ) | ||
| SOURCES tensor_test.cpp | ||
| tensor_shape_test.cpp | ||
| allocator_test.cpp | ||
| tensor_buffer_test.cpp | ||
| tensor_map_test.cpp | ||
| tensor_utils_test.cpp | ||
| tensor_accessor_test.cpp) |
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.