Commit 536821e5 authored by Dmitry I. Lyakh's avatar Dmitry I. Lyakh

Moved TensorExecState inside runtime/graph since it belongs there.

Struggling with getService inside TensorRuntime ctor ...
parent 6ef993ef
Pipeline #68792 passed with stage
in 5 minutes and 19 seconds
add_subdirectory(graph)
#add_subdirectory(optimizer)
add_subdirectory(optimizer)
add_subdirectory(executor)
set(LIBRARY_NAME exatn-runtime)
file(GLOB SRC tensor_runtime.cpp tensor_exec_state.cpp)
file(GLOB SRC
tensor_runtime.cpp
)
add_library(${LIBRARY_NAME}
SHARED
${SRC}
)
)
add_dependencies(${LIBRARY_NAME} exatensor-build)
target_include_directories(
${LIBRARY_NAME}
PUBLIC . graph optimizer executor ${CMAKE_SOURCE_DIR}/src/exatn )
target_include_directories(${LIBRARY_NAME}
PUBLIC . graph optimizer executor ${CMAKE_SOURCE_DIR}/src/exatn)
target_link_libraries(${LIBRARY_NAME} PUBLIC CppMicroServices exatn-numerics
PRIVATE Boost::graph)
target_link_libraries(${LIBRARY_NAME}
PUBLIC CppMicroServices exatn-numerics exatn-runtime-graph exatn-runtime-optimizer
PRIVATE Boost::graph)
exatn_configure_library_rpath(${LIBRARY_NAME})
......
set(LIBRARY_NAME exatn-runtime-graph)
file(GLOB SRC
tensor_exec_state.cpp
boost/directed_boost_graph.cpp
graph_activator.cpp)
graph_activator.cpp
)
usfunctiongetresourcesource(TARGET ${LIBRARY_NAME} OUT SRC)
usfunctiongeneratebundleinit(TARGET ${LIBRARY_NAME} OUT SRC)
......@@ -10,13 +12,10 @@ usfunctiongeneratebundleinit(TARGET ${LIBRARY_NAME} OUT SRC)
add_library(${LIBRARY_NAME}
SHARED
${SRC}
)
target_include_directories(
${LIBRARY_NAME}
PUBLIC . .. ${CMAKE_SOURCE_DIR}/src/exatn
boost)
)
target_include_directories(${LIBRARY_NAME}
PUBLIC . .. ${CMAKE_SOURCE_DIR}/src/exatn boost)
set(_bundle_name exatn_runtime_graph)
set_target_properties(${LIBRARY_NAME}
......@@ -32,7 +31,9 @@ usfunctionembedresources(TARGET
FILES
manifest.json)
target_link_libraries(${LIBRARY_NAME} PUBLIC CppMicroServices exatn-numerics exatn-runtime PRIVATE Boost::graph)
target_link_libraries(${LIBRARY_NAME}
PUBLIC CppMicroServices exatn-numerics
PRIVATE Boost::graph)
exatn_configure_plugin_rpath(${LIBRARY_NAME})
......
set(LIBRARY_NAME exatn-runtime-optimizer)
file(GLOB SRC optimizer_activator.cpp)
file(GLOB SRC
optimizer_activator.cpp
)
usfunctiongetresourcesource(TARGET ${LIBRARY_NAME} OUT SRC)
usfunctiongeneratebundleinit(TARGET ${LIBRARY_NAME} OUT SRC)
......@@ -9,16 +10,10 @@ usfunctiongeneratebundleinit(TARGET ${LIBRARY_NAME} OUT SRC)
add_library(${LIBRARY_NAME}
SHARED
${SRC}
)
target_include_directories(
${LIBRARY_NAME}
PUBLIC .
#${CMAKE_SOURCE_DIR}/src/exatn
${CMAKE_SOURCE_DIR}/tpls/mpark-variant
${CMAKE_SOURCE_DIR}/tpls/cppmicroservices/framework/include
)
)
target_include_directories(${LIBRARY_NAME}
PUBLIC . ../graph ${CMAKE_SOURCE_DIR}/src/exatn)
set(_bundle_name exatn_runtime_optimizer)
set_target_properties(${LIBRARY_NAME}
......@@ -34,19 +29,15 @@ usfunctionembedresources(TARGET
FILES
manifest.json)
target_link_libraries(${LIBRARY_NAME} PUBLIC CppMicroServices PRIVATE Boost::graph)
target_link_libraries(${LIBRARY_NAME}
PUBLIC CppMicroServices exatn-numerics exatn-runtime-graph
PRIVATE Boost::graph)
if(APPLE)
set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "@loader_path/../lib")
set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
set_target_properties(${LIBRARY_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN/../lib;$ORIGIN")
set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-shared")
endif()
exatn_configure_plugin_rpath(${LIBRARY_NAME})
if(EXATN_BUILD_TESTS)
#add_subdirectory(boost/tests)
endif()
#if(EXATN_BUILD_TESTS)
# add_subdirectory(tests)
#endif()
file (GLOB HEADERS *.hpp)
......
......@@ -7,8 +7,8 @@ namespace runtime {
TensorRuntime::TensorRuntime(const std::string & graph_executor_name, const std::string & node_executor_name):
current_dag_(nullptr), executing_(false), alive_(false)
{
// graph_executor_ = exatn::getService<TensorGraphExecutor>(graph_executor_name);
// graph_executor_->resetNodeExecutor(exatn::getService<TensorNodeExecutor>(node_executor_name));
//graph_executor_ = exatn::getService<TensorGraphExecutor>(graph_executor_name);
//graph_executor_->resetNodeExecutor(exatn::getService<TensorNodeExecutor>(node_executor_name));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment