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

New feature: Local distribution capability #129

Merged
merged 8 commits into from
Oct 30, 2024
Merged

Conversation

JackLau1222
Copy link
Contributor

@JackLau1222 JackLau1222 commented Sep 29, 2024

I'm excited to introduce a new feature that enables local distribution capability for BMF, allowing users to easily
parallelize computations on a single node.

In this commit, I've implemented the necessary code changes to support multi-threading for single node. To enable this
feature, users can simply add an option parameter "thread":<number> when setting up these nodes, and the framework will create multiple distributed nodes to process data in parallel.

Key Changes:

  • update enhance_demo.py
  • add internal module: split_module and assemble_module
  • add copy constructors in ModuleConfig, StreamConfig, NodeMetaInfo, NodeConfig
  • add methods and variables in NodeConfig
  • add create_split_node, create_assemble_node, process_multi_thread functions in Optimizer
  • add SplitOutputStreamManager
  • update node.cpp
  • add new parameter scheduler in the Decode and Encode method in builder
  • update connector.cpp
  • add new test cases distributed_node

@JackLau1222
Copy link
Contributor Author

I changed some code to make it more concise

Key changes:

  • renamed paramater "thread" to "dist_nums"
  • optimized process_distributed_node()
  • modified some comments
  • deleted the subclass of OutputStreamManager
  • optimized the distributed node test case

update Makefile for c_engine test codes

complete test/c_module

configure test/cpp_builder

Added untracked files

add test code about data splitting

add Makefile for bmf/sdk/cpp_sdk/test

update Makefile and task.cpp

refactor code for multi node test

1.add future that bmf::builder::Graph::Decode and Encode function can set schedule through initing 2.optimize the code of test/multi_node for test

Supplement the last unsubmitted code

delete useless code

add feature that support output stream push data to multi downstream node

add feature that InputStreamManager can handle multi inputs from multi upstreams

optimize code

fix bug that two node's OSM use one static variable

add develop doc

update

fix bug that drop some frame from InputStream

fix bug that encoder couldn't handle multi video inputstreams

add pictures that missing

update doc_dev/README.md

1.add assemble_module 2.complete function for interl node init

1.complete assemble_module 2.update doc_dev/README.md

optimizer graph config if there is multi-thread node

1.Improve the optimizer processing of node multi-thread parameters 2.Implement data assemble in assemble_module 3.Implement OutputStreamManager's parent and subclass methods separately

Fixed the bug that the number of distributed node threads cannot exceed 3

1. Added split module and improved optimizer

1. Add split and aggregation modules to the engine 2. Delete some useless implementations

remove useless files

remove useless files

revert some unnecessary changes

* rename test/multi_node to test/distributed_node
* update enhance_demo.py
* update enhance_module.py
* update test_video_c_module.py

resolve conflict

restore builder.cpp and builder.hpp and cmakelist

restore input_stream_manager and builder.cpp
* rename paramater "thread" to "dist_nums"
* optimize process_distributed_node()
* remove SplitOutputStreamManager
* optimize distributed node test case
* improve the code of optimizer
* change the BMFLOG_NODE type of split and assemble module
* adjust some code lines in optimizer.cpp
@HuHeng HuHeng merged commit be9d127 into BabitMF:master Oct 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants