Skip to content

Commit

Permalink
prov/rxm: Set offload_coll_mask based on actual configuration
Browse files Browse the repository at this point in the history
offload_coll_mask value is calculated based on the actual offload capabilities
confirmed by fi_query_collective().

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Dec 5, 2022
1 parent 067de74 commit 8087de6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion prov/rxm/src/rxm_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info,
struct rxm_fabric *rxm_fabric;
struct fi_info *msg_info, *base_info;
struct fi_peer_domain_context peer_context;
struct fi_collective_attr attr;

int ret;

rxm_domain = calloc(1, sizeof(*rxm_domain));
Expand Down Expand Up @@ -893,7 +895,18 @@ int rxm_domain_open(struct fid_fabric *fabric, struct fi_info *info,
FI_PEER, &peer_context);
if (ret)
goto err5;
rxm_domain->offload_coll_mask = 1;

attr.op = FI_MIN;
attr.datatype = FI_INT8;
attr.datatype_attr.count =1;
attr.datatype_attr.size =1;
attr.mode = 0;
for (int i = FI_BARRIER; i < FI_GATHER; i++) {
ret = fi_query_collective(rxm_domain->offload_coll_domain,
i, &attr, 0);
if (FI_SUCCESS == ret)
rxm_domain->offload_coll_mask |= BIT(i);
}
}
}

Expand Down

0 comments on commit 8087de6

Please sign in to comment.