Skip to content
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

add lsflow #355

Merged
merged 1 commit into from
Aug 12, 2022
Merged
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
13 changes: 0 additions & 13 deletions lightseq/csrc/core/CMakeLists.txt

This file was deleted.

51 changes: 0 additions & 51 deletions lightseq/csrc/core/includes/tensor.h

This file was deleted.

174 changes: 0 additions & 174 deletions lightseq/csrc/core/node.cpp

This file was deleted.

74 changes: 0 additions & 74 deletions lightseq/csrc/core/tensor.cpp

This file was deleted.

9 changes: 0 additions & 9 deletions lightseq/csrc/example/CMakeLists.txt

This file was deleted.

26 changes: 26 additions & 0 deletions lightseq/csrc/lsflow/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.10)
project(LightseqProtoType LANGUAGES CXX)
find_package(Threads REQUIRED)
set(CMAKE_CXX_STANDARD 14)

include_directories(includes)

add_definitions(-DDEBUG)

add_executable(lsflow_bin example/main.cpp)

add_library(node SHARED node.cpp)

add_library(context SHARED context.cpp)

add_library(manager SHARED manager.cpp)

add_library(layer SHARED layer.cpp)

add_library(tensor SHARED tensor.cpp)

target_link_libraries(lsflow_bin PUBLIC node)
target_link_libraries(lsflow_bin PUBLIC context)
target_link_libraries(lsflow_bin PUBLIC manager)
target_link_libraries(lsflow_bin PUBLIC layer)
target_link_libraries(lsflow_bin PUBLIC tensor)
1 change: 1 addition & 0 deletions lightseq/csrc/lsflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LsFlow is a extremely clean implement of computation graph.
5 changes: 5 additions & 0 deletions lightseq/csrc/lsflow/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [ ! -d 'build' ]; then
mkdir build
fi

cd build && cmake .. && make -j${nproc}
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ void Context::build() {
}

free(temporary_buffer_);
memory_manager_->calculate_buffer_();
_mm_ptr->calculate_buffer_();
_built = true;

// thread_context_ptr.reset(nullptr);

#ifdef DEBUG
draw_all_context();
#endif
}

void Context::draw_all_context() {}

// thread_local ContextPtr thread_context_ptr = nullptr;

} // namespace lightseq
9 changes: 9 additions & 0 deletions lightseq/csrc/lsflow/example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_executable(lsflow_bin test_example.cpp)

include_directories(../includes)

target_link_libraries(lsflow_bin PUBLIC node)
target_link_libraries(lsflow_bin PUBLIC context)
target_link_libraries(lsflow_bin PUBLIC manager)
target_link_libraries(lsflow_bin PUBLIC layer)
target_link_libraries(lsflow_bin PUBLIC tensor)
Loading