Skip to content

Commit

Permalink
create flag to indicate a program is inside a deploy interpreter
Browse files Browse the repository at this point in the history
ghstack-source-id: 5a82019680fad60cb6942c2b7e0bd78f37cdc795
Pull Request resolved: #310
  • Loading branch information
PaliC committed Feb 2, 2023
1 parent 782a55b commit e7923bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions multipy/runtime/interpreter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
endif()

target_include_directories(torch_deployinterpreter PRIVATE ${INTERPRETER_DIR})
target_include_directories(torch_deployinterpreter BEFORE PUBLIC ${Python3_INCLUDE_DIRS})
target_include_directories(torch_deployinterpreter BEFORE PUBLIC "-Wl,--no-as-needed -rdynamic" ${Python3_INCLUDE_DIRS})

target_link_libraries(torch_deployinterpreter PRIVATE fmt::fmt-header-only)
target_link_libraries(torch_deployinterpreter PRIVATE gtest)
target_link_libraries(torch_deployinterpreter PRIVATE torch_python)
target_link_libraries(torch_deployinterpreter PRIVATE "-Wl,--no-as-needed -rdynamic -Wno-undef" torch_python)
target_link_libraries(torch_deployinterpreter PRIVATE multipy_torch)
1 change: 1 addition & 0 deletions multipy/runtime/interpreter/interpreter_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ except ModuleNotFoundError:
_v.git_version = 'fake'
_v.hip = None
sys.using_multipy_interpreter = True
if torch.cuda.is_available():
torch.zeros(1).cuda() # force cuda init...
Expand Down

0 comments on commit e7923bc

Please sign in to comment.