File tree 4 files changed +14
-7
lines changed
4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -544,7 +544,12 @@ ${CMAKE_CURRENT_BINARY_DIR}/src/ATen)
544
544
if (NOT NO_CUDA)
545
545
include_directories (${CUDA_INCLUDE_DIRS} )
546
546
endif ()
547
- add_subdirectory (src/ATen/test )
547
+
548
+ if (ATEN_NO_TEST)
549
+ message ("disable test because ATEN_NO_TEST is set" )
550
+ else ()
551
+ add_subdirectory (src/ATen/test )
552
+ endif ()
548
553
549
554
if (ATEN_NO_CONTRIB)
550
555
message ("disable contrib because ATEN_NO_CONTRIB is set" )
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ if(BUILD_ATEN)
14
14
if (NOT BUILD_CAFFE2)
15
15
set (__caffe2_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE} )
16
16
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
17
+ set (ATEN_NO_TEST ON )
17
18
set (AT_LINK_STYLE STATIC )
18
19
add_subdirectory (../aten aten)
19
20
set (CMAKE_POSITION_INDEPENDENT_CODE ${__caffe2_CMAKE_POSITION_INDEPENDENT_CODE} )
Original file line number Diff line number Diff line change @@ -3,17 +3,18 @@ if(BUILD_ATEN)
3
3
# Unfortunately the custom command below requires this to be here
4
4
set (__caffe2_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE} )
5
5
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
6
+ set (ATEN_NO_TEST ON )
6
7
set (AT_LINK_STYLE STATIC )
7
- add_subdirectory (${PROJECT_SOURCE_DIR} /aten aten)
8
+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../../.. /aten aten)
8
9
set (CMAKE_POSITION_INDEPENDENT_CODE ${__caffe2_CMAKE_POSITION_INDEPENDENT_CODE} )
9
10
10
11
add_custom_command (OUTPUT aten_op.h
11
12
COMMAND
12
13
python ${CMAKE_CURRENT_SOURCE_DIR} /gen_op.py
13
- --aten_root=${PROJECT_SOURCE_DIR} /aten
14
- --template_dir=${PROJECT_SOURCE_DIR} /caffe2/contrib/aten
14
+ --aten_root=${CMAKE_CURRENT_SOURCE_DIR} /../../.. /aten
15
+ --template_dir=${CMAKE_CURRENT_SOURCE_DIR}
15
16
DEPENDS
16
- ATen
17
+ ATen_cpu
17
18
${CMAKE_CURRENT_SOURCE_DIR} /gen_op.py
18
19
${CMAKE_CURRENT_SOURCE_DIR} /aten_op_template.h)
19
20
Original file line number Diff line number Diff line change @@ -579,9 +579,9 @@ if (BUILD_ATEN)
579
579
include_directories (${PROJECT_BINARY_DIR} /caffe2/contrib/aten)
580
580
endif ()
581
581
582
- list (APPEND Caffe2_DEPENDENCY_LIBS ATen )
582
+ list (APPEND Caffe2_DEPENDENCY_LIBS ATen_cpu )
583
583
if (USE_CUDA)
584
- list (APPEND Caffe2_CUDA_DEPENDENCY_LIBS ATen )
584
+ list (APPEND Caffe2_CUDA_DEPENDENCY_LIBS ATen_cuda )
585
585
endif ()
586
586
include_directories (${PROJECT_SOURCE_DIR} /aten/src)
587
587
endif ()
You can’t perform that action at this time.
0 commit comments