Skip to content

Commit

Permalink
Merge pull request openucx#4212 from dmitrygx/topic/ucp/worker
Browse files Browse the repository at this point in the history
UCP/WORKER: Select device atomics if there is a scalable device
  • Loading branch information
yosefe authored Sep 23, 2019
2 parents 29b0d33 + 601d26e commit c076f59
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ucp/core/ucp_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1328,8 +1328,10 @@ static void ucp_worker_init_device_atomics(ucp_worker_h worker)

score = ucp_wireup_amo_score_func(context, md_attr, iface_attr,
&dummy_iface_attr);
if ((score > best_score) ||
((score == best_score) && (priority > best_priority)))
if (ucp_is_scalable_transport(worker->context,
iface_attr->max_num_eps) &&
((score > best_score) ||
((score == best_score) && (priority > best_priority))))
{
best_rsc = rsc;
best_score = score;
Expand Down Expand Up @@ -1363,7 +1365,10 @@ static void ucp_worker_init_guess_atomics(ucp_worker_h worker)
ucp_rsc_index_t iface_id;

for (iface_id = 0; iface_id < worker->num_ifaces; ++iface_id) {
accumulated_flags |= worker->ifaces[iface_id].attr.cap.flags;
if (ucp_is_scalable_transport(worker->context,
worker->ifaces[iface_id].attr.max_num_eps)) {
accumulated_flags |= worker->ifaces[iface_id].attr.cap.flags;
}
}

if (accumulated_flags & UCT_IFACE_FLAG_ATOMIC_DEVICE) {
Expand Down

0 comments on commit c076f59

Please sign in to comment.