Closed Kwinpeng closed 9 months ago
Yes, this design is unreasonable and I told @Vincent-syr last week. The problem has been fixed at #35, you can check the latest code.
We cancelled the SECOND barrier so it won't be stuck on multi-GPUs inferencing.
Yes, this design is unreasonable and I told @Vincent-syr last week. The problem has been fixed at #35, you can check the latest code.
We cancelled the SECOND barrier so it won't be stuck on multi-GPUs inferencing.
I pulled the latest master branch, it's going good now!
When I run the provided example by:
The program got stuck and not proceed.
After a 2-hour debugging, I found that this maybe caused by miss-use of
StaticThreadPool
. The worker thread is implemented as:There are two barriers: one before
func_
run and the other is after. However, for asynchronism, the asynchronous method such asStaticThreadPool::RunAsync
only call barrier(Wait()
) once. So, it leaves to caller to take another barrier(Wait()
) before the next run. And this is also noted by author in comment.It seems strange to find that there may be still missing the SECOND barrier. When I add a
pool->Wait()
at two places, the program starts to proceed. It seems that client and server interact with each other normally.The two modifications are:
and
So I'd like to know if this modification is correct and is reasonable according to the design?
Current output of the provided example: