supersat commented on code in PR #11018:
URL: https://github.com/apache/tvm/pull/11018#discussion_r855678214


##########
src/runtime/threading_backend.cc:
##########
@@ -34,13 +34,63 @@
 #endif
 #if defined(__hexagon__)
 #include <dlfcn.h>
+#include <qurt.h>
+#include <stdlib.h>
+#define HEXAGON_STACK_SIZE 65536
+#define HEXAGON_STACK_ALIGNMENT 32
 #endif
 #include <algorithm>
 #include <thread>
 #define CURRENT_THREAD_HANDLE (static_cast<std::thread::native_handle_type>(0))
 namespace tvm {
 namespace runtime {
 namespace threading {
+#ifdef __hexagon__

Review Comment:
   To a certain extent, although it's not clear it's worth the effort. As far 
as I can tell are a couple options:
   
   - Have multiple classes that implement the ThreadGroup::Impl interface -- 
one for pthreads, and one for QuRT threads. @csullivan was concerned that this 
might lead to duplicated code, making it more fragile to maintain.
   - Parameterizing ThreadPool::Impl on the underlying thread type. However, 
we'd still need #ifdefs to avoid calling SetAffinity, which isn't available on 
Hexagon.
   
   Yield() also doesn't work as-is on Hexagon, so we'd need a fix for that as 
well.



-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to