File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
torchao/experimental/ops/linear_8bit_act_xbit_weight Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -8,16 +8,17 @@ cmake_minimum_required(VERSION 3.19)
8
8
9
9
include (${CMAKE_CURRENT_SOURCE_DIR} /../../Utils.cmake )
10
10
11
- # For some reason cpuinfo package has unused functions/variables
12
- # TODO (T215533422): fix upstream
13
- add_compile_options (-Wno-unused-function -Wno-unused-variable )
14
- include (FetchContent )
15
- FetchContent_Declare (cpuinfo
16
- GIT_REPOSITORY https://github.com/pytorch/cpuinfo.git
17
- GIT_TAG aaac07ee499895770c89163ce0920ef8bb41ed23 )
18
- FetchContent_MakeAvailable (
19
- cpuinfo )
20
-
11
+ if (NOT TARGET cpuinfo )
12
+ # For some reason cpuinfo package has unused functions/variables
13
+ # TODO (T215533422): fix upstream
14
+ add_compile_options (-Wno-unused-function -Wno-unused-variable )
15
+ include (FetchContent )
16
+ FetchContent_Declare (cpuinfo
17
+ GIT_REPOSITORY https://github.com/pytorch/cpuinfo.git
18
+ GIT_TAG aaac07ee499895770c89163ce0920ef8bb41ed23 )
19
+ FetchContent_MakeAvailable (
20
+ cpuinfo )
21
+ endif ()
21
22
22
23
find_package (Torch REQUIRED )
23
24
add_library (torchao_ops_linear_8bit_act_xbit_weight_aten OBJECT
You can’t perform that action at this time.
0 commit comments