Skip to content

create flag to indicate a program is inside a deploy interpreter #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: gh/PaliC/100/base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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