File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1484,6 +1484,7 @@ if(BUILD_PYTHON)
1484
1484
# ---[ Python.
1485
1485
if (BUILD_CAFFE2)
1486
1486
add_library (caffe2_pybind11_state MODULE ${Caffe2_CPU_PYTHON_SRCS} )
1487
+ target_compile_options (caffe2_pybind11_state PRIVATE "-DUSE_NUMPY" )
1487
1488
if (NOT MSVC )
1488
1489
set_target_properties (caffe2_pybind11_state PROPERTIES COMPILE_FLAGS "-fvisibility=hidden" )
1489
1490
endif ()
@@ -1514,6 +1515,7 @@ if(BUILD_PYTHON)
1514
1515
1515
1516
if (USE_CUDA)
1516
1517
add_library (caffe2_pybind11_state_gpu MODULE ${Caffe2_GPU_PYTHON_SRCS} )
1518
+ target_compile_options (caffe2_pybind11_state_gpu PRIVATE "-DUSE_NUMPY" )
1517
1519
if (NOT MSVC )
1518
1520
set_target_properties (caffe2_pybind11_state_gpu PROPERTIES COMPILE_FLAGS "-fvisibility=hidden" )
1519
1521
endif ()
@@ -1542,6 +1544,7 @@ if(BUILD_PYTHON)
1542
1544
1543
1545
if (USE_ROCM)
1544
1546
add_library (caffe2_pybind11_state_hip MODULE ${Caffe2_HIP_PYTHON_SRCS} )
1547
+ target_compile_options (caffe2_pybind11_state_hip PRIVATE "-DUSE_NUMPY" )
1545
1548
if (NOT MSVC )
1546
1549
target_compile_options (caffe2_pybind11_state_hip PRIVATE ${HIP_CXX_FLAGS} -fvisibility=hidden)
1547
1550
endif ()
Original file line number Diff line number Diff line change @@ -44,10 +44,6 @@ static_assert(
44
44
#cmakedefine CAFFE2_USE_NVTX
45
45
#cmakedefine CAFFE2_USE_TRT
46
46
47
- #ifndef USE_NUMPY
48
- #cmakedefine USE_NUMPY
49
- #endif
50
-
51
47
#ifndef EIGEN_MPL2_ONLY
52
48
#cmakedefine EIGEN_MPL2_ONLY
53
49
#endif
You can’t perform that action at this time.
0 commit comments