File tree Expand file tree Collapse file tree 7 files changed +43
-5
lines changed Expand file tree Collapse file tree 7 files changed +43
-5
lines changed Original file line number Diff line number Diff line change
1
+ filter=+whitespace/extra,-whitespace/indent
Original file line number Diff line number Diff line change @@ -91,3 +91,34 @@ init_command = [
91
91
' --requirement=requirements-lintrunner.txt' ,
92
92
]
93
93
is_formatter = true
94
+
95
+ [[linter ]]
96
+ code = ' CMAKE'
97
+ include_patterns = [
98
+ " **/*.cmake" ,
99
+ " **/*.cmake.in" ,
100
+ " **/CMakeLists.txt" ,
101
+ ]
102
+ exclude_patterns = [
103
+ ' third-party/**' ,
104
+ ' **/third-party/**' ,
105
+ ]
106
+ command = [
107
+ ' python' ,
108
+ ' -m' ,
109
+ ' lintrunner_adapters' ,
110
+ ' run' ,
111
+ ' cmake_linter' ,
112
+ ' --config=.cmakelintrc' ,
113
+ ' --' ,
114
+ ' @{{PATHSFILE}}' ,
115
+ ]
116
+ init_command = [
117
+ ' python' ,
118
+ ' -m' ,
119
+ ' lintrunner_adapters' ,
120
+ ' run' ,
121
+ ' pip_init' ,
122
+ ' --dry-run={{DRYRUN}}' ,
123
+ ' --requirement=requirements-lintrunner.txt' ,
124
+ ]
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
59
59
# `examples/custom_ops/custom_ops_2.cpp`.
60
60
option (
61
61
REGISTER_EXAMPLE_CUSTOM_OP
62
- "Register whether custom op 1 (my_ops::mul3) or custom op 2 (my_ops::mul4) or no custom op at all."
62
+ "Register whether custom op 1 (my_ops::mul3) or custom op 2 (my_ops::mul4) \
63
+ or no custom op at all."
63
64
OFF )
64
65
65
66
# Option to register quantized ops with quantized kernels. See
Original file line number Diff line number Diff line change 4
4
# This source code is licensed under the BSD-style license found in the
5
5
# LICENSE file in the root directory of this source tree.
6
6
7
- # The logic is copied from https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake
7
+ # The logic is copied from
8
+ # https://github.com/pytorch/pytorch/blob/main/cmake/Dependencies.cmake
8
9
set (THIRD_PARTY_ROOT "${CMAKE_CURRENT_SOURCE_DIR} /third-party" )
9
10
10
11
# --- cpuinfo
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ function(kernel_link_options target_name)
37
37
target_link_options (
38
38
${target_name}
39
39
INTERFACE
40
- "SHELL:LINKER:--whole-archive $<TARGET_FILE:${target_name} > LINKER:--no-whole-archive"
40
+ "SHELL:LINKER:--whole-archive \
41
+ $<TARGET_FILE:${target_name} > \
42
+ LINKER:--no-whole-archive"
41
43
)
42
44
endfunction ()
43
45
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ message("Generated files ${gen_command_sources}")
45
45
# Build a AOT library to register quantized ops into PyTorch.
46
46
set (_quantized_sources
47
47
${_quantized_kernels__srcs}
48
- ${EXECUTORCH_ROOT} /runtime/core/exec_aten/util/tensor_util_aten.cpp # This is a
49
- # hack
48
+ ${EXECUTORCH_ROOT} /runtime/core/exec_aten/util/tensor_util_aten.cpp # This
49
+ # is a hack
50
50
)
51
51
gen_custom_ops_aot_lib ("quantized_ops_aot_lib" "${_quantized_sources} " )
52
52
Original file line number Diff line number Diff line change @@ -13,3 +13,5 @@ ufmt==2.0.1
13
13
usort==1.0.5
14
14
15
15
clang-format==12.0.1
16
+
17
+ cmakelint==1.4.1
You can’t perform that action at this time.
0 commit comments