-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How to do initialization for multiprocessing? #5944
Comments
Hi sconlyshootery, The other question is how annoying it is if we have to re-initialize in B? Any possible numerical results in terms of the initialization latency? |
Hi, thank you for your kind reply:
I am new to taichi, I am not sure whether this is the best way to use it. Some tips are also welcomed. |
Hi sconlyshootery, For this use case, looks like each process is using the same kernel However, Taichi does have a way to parallelize the above mentioned
Basically, the idea is to put the preparation parts (prepare for Let me know whether this approach fits your need. In addition, since Async Executor isn't something officially released yet, the above codes are seriously "psudo" codes. However, we can try to arrange sth working if you are interested in trying it out. |
Hi, Jim. Thank you for your kind reply. |
Thanks! Let me also cc @ailzhang and @lin-hitonami since this has something to do with Async Engine, I guess we'll need some internal discussions first. |
|
Hi oliver, Can you describe a little bit more about your task, and why multi-threading is important? Thanks in advance! |
Hi Zhanlue,
I can implement my own queue in a single thread which runs all Taichi
operations asynchronously - but I saw this and imagined maybe this was a
more efficient way to do it. For example data uploading (GPU) and kernel
execution can be overlapped.
I have a couple of use cases:
1) A camera ISP pipeline where I'm grabbing frames off multiple cameras and
processing them, at the moment I have a pool of threads processing camera
images as there is some CPU work too
2) A GUI application where I have a mix of synchronous and fast operations
(such as picking) as well as some slower long-running operations which
might take a second or two, but the UI needs to remain responsive
I have found I can implement these both in Taichi very nicely (previously I
used pytorch) - but I've yet to integrate them.
Cheers,
Oliver
…On Tue, Feb 7, 2023 at 2:44 PM Zhanlue Yang ***@***.***> wrote:
Hi oliver,
We did deprecated the AsyncExecutor for now since it's not actively
maintained. In some previous offline discussions, we did plan to add it
back but there's few valid use cases for now.
Can you describe a little bit more about your task, and why
multi-threading is important? Thanks in advance!
—
Reply to this email directly, view it on GitHub
<#5944 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAITRZLVJCZINTKUXWLHJF3WWGSINANCNFSM6AAAAAAQCEJEUQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi Oliver, |
For a program A where multiprocessing is conducted to run program B, it seems that I could only put ti.init() in B rather A, causing wasting a lot of time for initialization. Any suggestion?
The text was updated successfully, but these errors were encountered: