Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

WaitForVar in dependency engine not thread safe #16434

Open
anirudh2290 opened this issue Oct 11, 2019 · 4 comments
Open

WaitForVar in dependency engine not thread safe #16434

anirudh2290 opened this issue Oct 11, 2019 · 4 comments
Assignees
Labels

Comments

@anirudh2290
Copy link
Member

Related to #16431 . Please see the reproducible script here : https://github.com/anirudh2290/mxnet/blob/multithreaded_inference_poc/cpp-package/example/multithreading_engine_wait_to_read.cpp

@anirudh2290 anirudh2290 self-assigned this Oct 11, 2019
@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended label(s): Bug

@anirudh2290
Copy link
Member Author

I noticed that this happens only when we call NDArray constructor in cpp pacakge and WaitToRead in main thread. If there is only waitall and not wait to read it works fine. Need to check if this is an issue with frontend CPP package.

@ddavydenko
Copy link
Contributor

@mxnet-label-bot , add [Bug]

@roywei roywei added the Bug label Oct 14, 2019
anirudh2290 added a commit to anirudh2290/mxnet that referenced this issue Oct 18, 2019
@anirudh2290
Copy link
Member Author

I noticed that this happens only when we call NDArray constructor in cpp pacakge and WaitToRead in main thread. If there is only waitall and not wait to read it works fine. Need to check if this is an issue with frontend CPP package.

To verify this theory, I added another example which uses the backend NDArray data structure instead of CPP NDarray data structure and calls WaitToRead on it. This works fine (https://github.com/anirudh2290/mxnet/blob/multithreaded_inference_poc/cpp-package/example/multithreading_engine_wait_to_read2.cpp). This shows that the issue is with the NDArray data structure in CPP frontend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants