SWDEV-299893 - Set preferred node affinity
Set affinity to the closest node of the current GPU. This reduces the latency to fetch kernel args since device would query the CPU cache of core which did the dispatch. This behavior is controlled with AMD_CPU_AFFINITY env var(disabled by default) Change-Id: I65afba62cb818ea25a311b88d1c0dd5c51330292
This commit is contained in:
@@ -170,7 +170,8 @@ Device::Device(hsa_agent_t bkendDevice)
|
||||
, queuePool_(QueuePriority::Total)
|
||||
, coopHostcallBuffer_(nullptr)
|
||||
, queueWithCUMaskPool_(QueuePriority::Total)
|
||||
, numOfVgpus_(0) {
|
||||
, numOfVgpus_(0)
|
||||
, preferred_numa_node_(0) {
|
||||
group_segment_.handle = 0;
|
||||
system_segment_.handle = 0;
|
||||
system_coarse_segment_.handle = 0;
|
||||
@@ -194,7 +195,7 @@ void Device::setupCpuAgent() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preferred_numa_node_ = index;
|
||||
cpu_agent_ = cpu_agents_[index].agent;
|
||||
system_segment_ = cpu_agents_[index].fine_grain_pool;
|
||||
system_coarse_segment_ = cpu_agents_[index].coarse_grain_pool;
|
||||
|
||||
مرجع در شماره جدید
Block a user