Skip to content

Commit

Permalink
Fix missing mkl-dnn include paths (pytorch#117492)
Browse files Browse the repository at this point in the history
Fixes pytorch#91968 and pytorch#100960
This commit fixes missing  include paths by linking `caffe2_pybind11_state_gpu` against `caffe2::mkldnn`
Pull Request resolved: pytorch#117492
Approved by: https://github.com/ezyang
  • Loading branch information
nidefawl authored and pytorchmergebot committed Jan 16, 2024
1 parent 46a8408 commit b1c3f9f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions caffe2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1971,6 +1971,9 @@ if(BUILD_PYTHON)
target_include_directories(caffe2_pybind11_state_gpu PRIVATE ${Caffe2_CPU_INCLUDE})
target_link_libraries(caffe2_pybind11_state_gpu PRIVATE
torch_library python::python pybind::pybind11)
if(USE_MKLDNN)
target_link_libraries(caffe2_pybind11_state_gpu PRIVATE caffe2::mkldnn)
endif()
if(WIN32)
target_link_libraries(caffe2_pybind11_state_gpu PRIVATE onnx_proto)
endif(WIN32)
Expand Down

0 comments on commit b1c3f9f

Please sign in to comment.