Skip to content

Commit

Permalink
UCT/GTEST: Fixed multiple tests for gdr_copy transport
Browse files Browse the repository at this point in the history
  • Loading branch information
iyastreb committed Apr 29, 2024
1 parent 7bb2722 commit a49390c
Show file tree
Hide file tree
Showing 21 changed files with 147 additions and 179 deletions.
2 changes: 1 addition & 1 deletion src/tools/info/tl_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ static void print_md_info(uct_component_h component,
printf("# memory invalidation is supported\n");
}

if (md_attr.reg_alignment != 0) {
if (md_attr.reg_alignment != 1) {
printf("# alignment: %zx\n", md_attr.reg_alignment);
}

Expand Down
18 changes: 16 additions & 2 deletions src/tools/perf/cuda/cuda_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#include <cuda_runtime.h>
#include <ucs/sys/compiler.h>
#include <ucs/sys/ptr_arith.h>
#include <uct/api/v2/uct_v2.h>


static ucs_status_t ucx_perf_cuda_init(ucx_perf_context_t *perf)
Expand Down Expand Up @@ -69,15 +71,27 @@ uct_perf_cuda_alloc_reg_mem(const ucx_perf_context_t *perf,
unsigned flags,
uct_allocated_memory_t *alloc_mem)
{
uct_md_attr_v2_t md_attr = {.field_mask = UCT_MD_ATTR_FIELD_REG_ALIGNMENT};
void *reg_address;
ucs_status_t status;

status = uct_md_query_v2(perf->uct.md, &md_attr);
if (status != UCS_OK) {
ucs_error("uct_md_query_v2() returned %d", status);
return status;
}

status = ucx_perf_cuda_alloc(length, mem_type, &alloc_mem->address);
if (status != UCS_OK) {
return status;
}

status = uct_md_mem_reg(perf->uct.md, alloc_mem->address,
length, flags, &alloc_mem->memh);
/* Register memory respecting MD reg_alignment */
reg_address = alloc_mem->address;
ucs_align_ptr_range(&reg_address, &length, md_attr.reg_alignment);

status = uct_md_mem_reg(perf->uct.md, reg_address, length, flags,
&alloc_mem->memh);
if (status != UCS_OK) {
cudaFree(alloc_mem->address);
ucs_error("failed to register memory");
Expand Down
2 changes: 1 addition & 1 deletion src/ucp/core/ucp_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ ucp_memh_register_internal(ucp_context_h context, ucp_mem_h memh,
reg_length = length;

if (context->rcache == NULL) {
reg_align = ucs_max(context->tl_mds[md_index].attr.reg_alignment, 1);
reg_align = context->tl_mds[md_index].attr.reg_alignment;
ucs_align_ptr_range(&reg_address, &reg_length, reg_align);
}

Expand Down
18 changes: 18 additions & 0 deletions src/uct/base/uct_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,24 @@ ucs_status_t uct_md_query_v2(uct_md_h md, uct_md_attr_v2_t *md_attr)
return UCS_OK;
}

void uct_md_base_md_query(uct_md_attr_v2_t *md_attr)
{
md_attr->reg_mem_types = 0;
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = 0;
md_attr->detect_mem_types = 0;
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
md_attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
md_attr->rkey_packed_size = 0;
md_attr->exported_mkey_packed_size = 0;
md_attr->reg_alignment = 1;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
}

ucs_status_t uct_mem_alloc_check_params(size_t length,
const uct_alloc_method_t *methods,
unsigned num_methods,
Expand Down
2 changes: 2 additions & 0 deletions src/uct/base/uct_md.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,6 @@ static UCS_F_ALWAYS_INLINE ucs_log_level_t uct_md_attach_log_lvl(uint64_t flags)
void uct_md_vfs_init(uct_component_h component, uct_md_h md,
const char *md_name);

void uct_md_base_md_query(uct_md_attr_v2_t *md_attr);

#endif
32 changes: 14 additions & 18 deletions src/uct/cuda/cuda_copy/cuda_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,21 @@ uct_cuda_copy_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr)
{
uct_cuda_copy_md_t *md = ucs_derived_of(uct_md, uct_cuda_copy_md_t);

md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_ALLOC;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->alloc_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->detect_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->dmabuf_mem_types = md->config.dmabuf_supported ?
UCS_BIT(UCS_MEMORY_TYPE_CUDA) : 0;
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_ALLOC;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->alloc_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->detect_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA) |
UCS_BIT(UCS_MEMORY_TYPE_CUDA_MANAGED);
md_attr->dmabuf_mem_types = md->config.dmabuf_supported ?
UCS_BIT(UCS_MEMORY_TYPE_CUDA) : 0;
md_attr->max_alloc = SIZE_MAX;
md_attr->max_reg = ULONG_MAX;
md_attr->rkey_packed_size = 0;
md_attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
return UCS_OK;
}

Expand Down
27 changes: 10 additions & 17 deletions src/uct/cuda/cuda_ipc/cuda_ipc_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,16 @@ static ucs_config_field_t uct_cuda_ipc_md_config_table[] = {
static ucs_status_t
uct_cuda_ipc_md_query(uct_md_h md, uct_md_attr_v2_t *md_attr)
{
md_attr->flags = UCT_MD_FLAG_REG |
UCT_MD_FLAG_NEED_RKEY |
UCT_MD_FLAG_INVALIDATE |
UCT_MD_FLAG_INVALIDATE_RMA |
UCT_MD_FLAG_INVALIDATE_AMO;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
md_attr->rkey_packed_size = sizeof(uct_cuda_ipc_rkey_t);
md_attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_REG |
UCT_MD_FLAG_NEED_RKEY |
UCT_MD_FLAG_INVALIDATE |
UCT_MD_FLAG_INVALIDATE_RMA |
UCT_MD_FLAG_INVALIDATE_AMO;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->rkey_packed_size = sizeof(uct_cuda_ipc_rkey_t);
return UCS_OK;
}

Expand Down
21 changes: 7 additions & 14 deletions src/uct/cuda/gdr_copy/gdr_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,13 @@ static ucs_config_field_t uct_gdr_copy_md_config_table[] = {
static ucs_status_t
uct_gdr_copy_md_query(uct_md_h md, uct_md_attr_v2_t *md_attr)
{
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
md_attr->rkey_packed_size = sizeof(uct_gdr_copy_key_t);
md_attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
md_attr->reg_alignment = GPU_PAGE_SIZE;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_CUDA);
md_attr->rkey_packed_size = sizeof(uct_gdr_copy_key_t);
md_attr->reg_alignment = GPU_PAGE_SIZE;
return UCS_OK;
}

Expand Down
4 changes: 1 addition & 3 deletions src/uct/ib/base/ib_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,11 @@ ucs_status_t uct_ib_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr)
size_t component_name_length = strlen(md->super.component->name);
uint64_t guid = IBV_DEV_ATTR(&md->dev, sys_image_guid);

uct_md_base_md_query(md_attr);
md_attr->max_alloc = ULONG_MAX; /* TODO query device */
md_attr->max_reg = ULONG_MAX; /* TODO query device */
md_attr->flags = md->cap_flags;
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->reg_mem_types = md->reg_mem_types;
md_attr->reg_nonblock_mem_types = md->reg_nonblock_mem_types;
md_attr->cache_mem_types = UCS_MASK(UCS_MEMORY_TYPE_LAST);
Expand Down
28 changes: 12 additions & 16 deletions src/uct/rocm/copy/rocm_copy_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,21 @@ uct_rocm_copy_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr)
{
uct_rocm_copy_md_t *md = ucs_derived_of(uct_md, uct_rocm_copy_md_t);

md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY |
UCT_MD_FLAG_ALLOC;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->alloc_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->detect_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->dmabuf_mem_types = 0;
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY |
UCT_MD_FLAG_ALLOC;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST) |
UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->alloc_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->detect_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
if (md->have_dmabuf) {
md_attr->dmabuf_mem_types |= UCS_BIT(UCS_MEMORY_TYPE_ROCM);
}
md_attr->max_alloc = SIZE_MAX;
md_attr->max_reg = ULONG_MAX;
md_attr->rkey_packed_size = sizeof(uct_rocm_copy_key_t);
md_attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
md_attr->max_alloc = SIZE_MAX;
md_attr->rkey_packed_size = sizeof(uct_rocm_copy_key_t);

return UCS_OK;
}
Expand Down
21 changes: 7 additions & 14 deletions src/uct/rocm/ipc/rocm_ipc_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,15 @@ static ucs_config_field_t uct_rocm_ipc_md_config_table[] = {

static ucs_status_t uct_rocm_ipc_md_query(uct_md_h md, uct_md_attr_v2_t *md_attr)
{
md_attr->rkey_packed_size = sizeof(uct_rocm_ipc_key_t);
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->reg_nonblock_mem_types = 0;
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
uct_md_base_md_query(md_attr);
md_attr->rkey_packed_size = sizeof(uct_rocm_ipc_key_t);
md_attr->flags = UCT_MD_FLAG_REG | UCT_MD_FLAG_NEED_RKEY;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_ROCM);

/* TODO: get accurate number */
md_attr->reg_cost = ucs_linear_func_make(9e-9, 0);

memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
md_attr->reg_cost = ucs_linear_func_make(9e-9, 0);
return UCS_OK;
}

Expand Down
6 changes: 1 addition & 5 deletions src/uct/sm/mm/base/mm_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,17 @@ ucs_status_t uct_mm_seg_new(void *address, size_t length, uct_mm_seg_t **seg_p)

void uct_mm_md_query(uct_md_h md, uct_md_attr_v2_t *md_attr, uint64_t max_alloc)
{
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_RKEY_PTR | UCT_MD_FLAG_NEED_RKEY;
md_attr->max_reg = 0;
md_attr->max_alloc = 0;
md_attr->alloc_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;

if (max_alloc > 0) {
md_attr->flags |= UCT_MD_FLAG_ALLOC | UCT_MD_FLAG_FIXED;
md_attr->max_alloc = max_alloc;
}

memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
}

ucs_status_t uct_mm_md_open(uct_component_t *component, const char *md_name,
Expand Down
9 changes: 1 addition & 8 deletions src/uct/sm/scopy/cma/cma_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,13 @@ ucs_status_t uct_cma_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr)
{
uct_cma_md_t *md = ucs_derived_of(uct_md, uct_cma_md_t);

md_attr->rkey_packed_size = 0;
uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_REG | md->extra_caps;
md_attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->reg_nonblock_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
md_attr->reg_cost = ucs_linear_func_make(9e-9, 0);

memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
return UCS_OK;
}

Expand Down
9 changes: 1 addition & 8 deletions src/uct/sm/scopy/knem/knem_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,17 @@ ucs_status_t uct_knem_md_query(uct_md_h uct_md, uct_md_attr_v2_t *md_attr)
{
uct_knem_md_t *md = ucs_derived_of(uct_md, uct_knem_md_t);

uct_md_base_md_query(md_attr);
md_attr->flags = UCT_MD_FLAG_NEED_RKEY;
md_attr->reg_mem_types = 0;
md_attr->reg_nonblock_mem_types = 0;
if (uct_knem_md_check_mem_reg(uct_md)) {
md_attr->flags |= UCT_MD_FLAG_REG;
md_attr->reg_mem_types |= UCS_BIT(UCS_MEMORY_TYPE_HOST);
}

md_attr->rkey_packed_size = sizeof(uct_knem_key_t);
md_attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->alloc_mem_types = 0;
md_attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
md_attr->detect_mem_types = 0;
md_attr->dmabuf_mem_types = 0;
md_attr->max_alloc = 0;
md_attr->max_reg = ULONG_MAX;
md_attr->reg_cost = md->reg_cost;
memset(&md_attr->local_cpus, 0xff, sizeof(md_attr->local_cpus));
return UCS_OK;
}

Expand Down
9 changes: 1 addition & 8 deletions src/uct/sm/self/self.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,21 +409,14 @@ static uct_iface_ops_t uct_self_iface_ops = {

static ucs_status_t uct_self_md_query(uct_md_h md, uct_md_attr_v2_t *attr)
{
uct_md_base_md_query(attr);
/* Dummy memory registration provided. No real memory handling exists */
attr->flags = UCT_MD_FLAG_REG |
UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */
attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->reg_nonblock_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->alloc_mem_types = 0;
attr->detect_mem_types = 0;
attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->dmabuf_mem_types = 0;
attr->max_alloc = 0;
attr->max_reg = ULONG_MAX;
attr->rkey_packed_size = 0;
attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus));
return UCS_OK;
}

Expand Down
9 changes: 1 addition & 8 deletions src/uct/tcp/tcp_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@ static ucs_config_field_t uct_tcp_md_config_table[] = {

static ucs_status_t uct_tcp_md_query(uct_md_h md, uct_md_attr_v2_t *attr)
{
uct_md_base_md_query(attr);
/* Dummy memory registration provided. No real memory handling exists */
attr->flags = UCT_MD_FLAG_REG |
UCT_MD_FLAG_NEED_RKEY; /* TODO ignore rkey in rma/amo ops */
attr->max_alloc = 0;
attr->reg_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->reg_nonblock_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->cache_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->alloc_mem_types = 0;
attr->access_mem_types = UCS_BIT(UCS_MEMORY_TYPE_HOST);
attr->detect_mem_types = 0;
attr->dmabuf_mem_types = 0;
attr->max_reg = ULONG_MAX;
attr->rkey_packed_size = 0;
attr->reg_cost = UCS_LINEAR_FUNC_ZERO;
memset(&attr->local_cpus, 0xff, sizeof(attr->local_cpus));
return UCS_OK;
}

Expand Down
Loading

0 comments on commit a49390c

Please sign in to comment.