huajsj commented on code in PR #11018:
URL: https://github.com/apache/tvm/pull/11018#discussion_r861362247
##########
src/runtime/threading_backend.cc:
##########
@@ -276,7 +334,17 @@ int ThreadGroup::Configure(AffinityMode mode, int
nthreads, bool exclude_worker0
return impl_->Configure(mode, nthreads, exclude_worker0, cpus);
}
-void Yield() { std::this_thread::yield(); }
+void Yield() {
+#ifdef __hexagon__
+ // QuRT doesn't have a yield API, so instead we sleep for the minimum amount
+ // of time to let the OS schedule another thread. std::this_thread::yield()
+ // compiles down to an empty function.
+ qurt_sleep(1);
Review Comment:
get it, seems like this is a trade off due to platform limitation, I think
we can keep qurt_sleep(1) in this patch then use a following patch to address
qurt_sleep(0) issue after qualcomm reaching back.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]