SWDEV-260448 - Honor NUMACTL for Direct Dispatch

Setting AMD_CPU_AFFINITY=1 will keep Async Handler thread within the
bounds set by numactl.

Change-Id: Id01b30df5127d65c29ac072bf74a04986b7128de
This commit is contained in:
Saleel Kudchadker
2021-07-02 09:05:33 -07:00
committed by Maneesh Gupta
parent f4032401cf
commit cd21af757e
4 changed files with 19 additions and 3 deletions
+2 -1
View File
@@ -157,7 +157,8 @@ bool HsaAmdSignalHandler(hsa_signal_value_t value, void* arg) {
amd::Thread* thread = amd::Thread::current();
if (!(thread != nullptr ||
((thread = new amd::HostThread()) != nullptr && thread == amd::Thread::current()))) {
((thread = new amd::HostThread()) != nullptr && thread == amd::Thread::current() &&
amd::Os::setThreadAffinityToMainThread()))) {
return false;
}