Skip to content

Commit

Permalink
Wrap torch_python with torch_compile_options (#136743)
Browse files Browse the repository at this point in the history
Fixes #ISSUE_NUMBER

Pull Request resolved: #136743
Approved by: https://github.com/ezyang
  • Loading branch information
cyyever authored and pytorchmergebot committed Nov 7, 2024
1 parent d0da40a commit 9d09af9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions torch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ endif()


add_library(torch_python SHARED ${TORCH_PYTHON_SRCS})
torch_compile_options(torch_python) # see cmake/public/utils.cmake
if(NOT WIN32)
target_compile_options(torch_python PRIVATE
$<$<COMPILE_LANGUAGE:CXX>: -fvisibility=default>)
endif()

if(CAFFE2_USE_MKL AND BUILD_LIBTORCHLESS)

Expand Down

0 comments on commit 9d09af9

Please sign in to comment.