-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
ngraph : fix for multithreading test_analyzer_image_classification #18265
ngraph : fix for multithreading test_analyzer_image_classification #18265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Could you refine the title and description? I could not see the full command from your title. |
@pawelpiotrowicz can you describe your idea or design in comment? It is better to let us understand your general thoughts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@LeoZhao-Intel The idea behind this solution allows threads to have an internal cache. Only pointer to cache is stored on thread local cache, real cache is located on heap. |
…ds=X test=develop
fdc1350
afc2408
to
fdc1350
Compare
Got your idea, you want to use thread_local variable to identify thread lifetime. But be careful on that, we met some issues on mkldnn for some kind of cache reusing for Baidu's online service deployment. In their usages, there is a thread pool which is used for inference execution, but these threads are never exit and they are always reused for different iteration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@pawelpiotrowicz Can you add a description as requested to move forward with this PR? |
@luotao1 , I changed description as you requested could you carry on with this PR ? |
@pawelpiotrowicz Hi pawel , could you refine your description in this way:
|
Thanks for @bingyanghuang 's suggestions, @pawelpiotrowicz Could you tell us how to reproduce the bug and verify whether this PR fix the bug? like #18382 (comment) |
It's reffering to test_analyzer_image_classification app with ngraph support.
|
@zhupengyang Could you help reproduce the bug and verify whether this PR fixes the bug with #18265 (comment)? |
|
Thanks for @zhupengyang's verify work! @tensor-tang Please take a review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @pawelpiotrowicz 's great work and @zhupengyang 's validation
Please add a unit-test to ensure the multi-threading test_analyzer_image_classification on ngraph in next PR. |
@pawelpiotrowicz When do you plan to add this unit test ? |
@bingyanghuang , The task is a bit complex - I need more time, firstly I have to see test-coverage output and depends on result take decision. |
You can simply add followings like Paddle/paddle/fluid/inference/tests/api/analyzer_bert_tester.cc Lines 191 to 220 in 10eeed9
test-coverage is an independent thing with this multi-threading unit-tests. Adding unit-test will not decrease the test-coverage, you can add the unit-test at first. |
ngraph : fix for multithreading test_analyzer_image_classification test=develop
@baojun-nervana
@kbinias
@LeoZhao-Intel