-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[ARM CPU] New version of scheduler enabling #20488
Conversation
src/plugins/intel_cpu/src/plugin.cpp
Outdated
Engine::Engine() : | ||
deviceFullName(getDeviceFullName()), | ||
specialSetup(new CPUSpecialSetup) { | ||
_pluginName = "CPU"; | ||
extensionManager->AddExtension(std::make_shared<Extension>()); | ||
#if defined(OV_CPU_WITH_ACL) | ||
scheduler_guard = SchedulerGuard::instance(); | ||
std::lock_guard<std::mutex> _lock {get_mtx_acl()}; |
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.
I propose to wrap it into a function like setAclScheduler.
Also a question, why we are doing it in scope of an engine creation in case of ACL but doing it somewhere else in case of other arch?
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.
Personally I don't like the fact we initialize it i scope of the engine, while for the x86 we are doing it in scope of creation of exec network before graph initialization.
@dmitry-gorokhov Up to you to approve (considering all the circumstances)
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.
@EgorDuplensky @dmitry-gorokhov corrected it
src/plugins/intel_cpu/src/plugin.cpp
Outdated
Engine::Engine() : | ||
deviceFullName(getDeviceFullName()), | ||
specialSetup(new CPUSpecialSetup) { | ||
_pluginName = "CPU"; | ||
extensionManager->AddExtension(std::make_shared<Extension>()); | ||
#if defined(OV_CPU_WITH_ACL) | ||
scheduler_guard = SchedulerGuard::instance(); | ||
std::lock_guard<std::mutex> _lock {get_mtx_acl()}; |
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.
Personally I don't like the fact we initialize it i scope of the engine, while for the x86 we are doing it in scope of creation of exec network before graph initialization.
@dmitry-gorokhov Up to you to approve (considering all the circumstances)
* @param config ComputeLibrary configuration function | ||
*/ | ||
inline void lockACLConfiguration(std::function<void(void)> config) { | ||
// We get a problem (seg. faults, data race etc) for eltwise operations when we use several configure(...) functions in parallel. |
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.
Please put it into the doxygen part above instead.
"ACL 28.08 does not officially support thread-safe configure() calls.
For example, calling configure for Eltwise operations from multiple streams leads to a data race and seg fault."
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.
@EgorDuplensky corrected it
// We created issue about this problem here: https://github.com/ARM-software/ComputeLibrary/issues/1073 | ||
// TODO: change it when we will get an answer to our question in issue |
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.
This better to be mentioned in the ticket, not in the source code
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.
@EgorDuplensky corrected it
* @brief Return static mutex for lock ComputeLibrary configuration | ||
* @return static std::mutex | ||
*/ | ||
static arm_compute::Mutex & getMutexConfig() { |
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.
Abbreviation Config in this case is misleading.
Let's have just getConfigurationMutex
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.
@EgorDuplensky corrected it
* @brief run thread-safe configure for ComputeLibrary configuration function | ||
* @param config ComputeLibrary configuration function | ||
*/ | ||
inline void lockACLConfiguration(std::function<void(void)> config) { |
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.
maybe configureThreadSafe()
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.
@EgorDuplensky corrected it
@allnes Could you please rebase on latest master fetch api 2.0 changes |
This PR will be closed in a week because of 2 weeks of no activity. |
This PR will be closed in a week because of 2 weeks of no activity. |
This PR will be closed in a week because of 2 weeks of no activity. |
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.
@allnes Could you please include the validation runs into some ticket
This PR will be closed in a week because of 2 weeks of no activity. |
This PR was closed because it has been stalled for 2 week with no activity. |
5aedae7
to
9a8e9c3
Compare
c976610
to
93bc5cb
Compare
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
PR needs internal performance validation |
02406f4
to
b03eb48
Compare
b03eb48
to
dbad1b9
Compare
Internal performance validation passed successfully |
### Tickets: - CVS-132497 - CVS-129036 - CVS-134932
### Tickets: - CVS-132497 - CVS-129036 - CVS-134932
Tickets: