Skip to content

Commit

Permalink
UCP: Non-contiguous registration send/recv support for RC and DC (#5/6)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ma committed Jul 6, 2017
1 parent ff1e615 commit b1c1d79
Show file tree
Hide file tree
Showing 13 changed files with 447 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/ucp/api/ucp.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ enum ucp_worker_attr_field {
enum ucp_dt_type {
UCP_DATATYPE_CONTIG = 0, /**< Contiguous datatype */
UCP_DATATYPE_IOV = 2, /**< Scatter-gather list with multiple pointers */
UCP_DATATYPE_IOV_R = 3, /**< Same as IOV, but reusable */
UCP_DATATYPE_STRIDE = 4, /**< Interleaving a pointers to strided data */
UCP_DATATYPE_STRIDE_R = 5, /**< Strided datatype */
//UCP_DATATYPE_IOV_R = 3, /**< Same as IOV, but reusable */
//UCP_DATATYPE_STRIDE = 4, /**< Interleaving a pointers to strided data */
//UCP_DATATYPE_STRIDE_R = 5, /**< Strided datatype */
UCP_DATATYPE_GENERIC = 7, /**< Generic datatype with
user-defined pack/unpack routines */
UCP_DATATYPE_SHIFT = 3, /**< Number of bits defining
Expand Down
8 changes: 8 additions & 0 deletions src/ucp/core/ucp_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,14 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg,
}
}
state->dt.iov.memh = memh;

/* If non-contiguous bind is not supported - use the existing mapping */
uct_md_attr = &context->tl_mds[mdi].attr;
if (!(uct_md_attr->cap.flags & UCT_MD_FLAG_REG_NC)) {
break;
}

status = ucp_dt_reusable_create(ep, buffer, length, datatype, state);
break;

default:
Expand Down
11 changes: 11 additions & 0 deletions src/uct/ib/base/ib_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ static ucs_status_t uct_ib_md_query(uct_md_h uct_md, uct_md_attr_t *md_attr)
md_attr->cap.flags |= UCT_MD_FLAG_ALLOC;
}

if (IBV_EXP_HAVE_UMR(&md->dev.dev_attr)) {
md_attr->cap.flags |= UCT_MD_FLAG_REG_NC;
}

if (IBV_EXP_HAVE_UMR(&md->dev.dev_attr)) {
md_attr->cap.flags |= UCT_MD_FLAG_REG_NC;
}

md_attr->reg_cost = md->reg_cost;
md_attr->local_cpus = md->dev.local_cpus;
return UCS_OK;
Expand Down Expand Up @@ -207,6 +215,9 @@ static ucs_status_t uct_ib_md_umr_qp_create(uct_ib_md_t *md)
ucs_status_t status = UCS_ERR_IO_ERROR;

ibdev = &md->dev;
if (!IBV_EXP_HAVE_UMR(&ibdev->dev_attr)) {
return UCS_ERR_UNSUPPORTED;
}

/* TODO: fix port selection. It looks like active port should be used */
port_num = ibdev->first_port;
Expand Down
Loading

0 comments on commit b1c1d79

Please sign in to comment.