Skip to content

Commit

Permalink
prov/rxm set proper offload collective mask
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Dec 1, 2022
1 parent 8747034 commit 12c595f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/rdma/fi_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ enum fi_collective_op {
FI_REDUCE,
FI_SCATTER,
FI_GATHER,
FI_COLLECTIVE_OP_MAX, //must be always the last value of this enum
};

#endif
Expand Down
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_COLLECTIVE_OP_MAX; 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 12c595f

Please sign in to comment.