Skip to content

Commit 9691c1f

Browse files
author
ferrol aderholdt
committed
REVIEW: address feedback
1 parent 213ef2b commit 9691c1f

24 files changed

+121
-117
lines changed

src/components/base/ucc_base_iface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ typedef struct ucc_base_context_iface {
126126
ucc_status_t (*mem_map)(const ucc_base_context_t *context, int type,
127127
void *address, size_t len, void *memh, void *tl_h);
128128
ucc_status_t (*mem_unmap)(const ucc_base_context_t *context, int type, void *tl_h);
129-
ucc_status_t (*memh_pack)(const ucc_base_context_t *context, void *memh,
129+
ucc_status_t (*memh_pack)(const ucc_base_context_t *context, int type, void *memh,
130130
void **pack_buffer);
131131
} ucc_base_context_iface_t;
132132

src/components/cl/basic/cl_basic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ucc_status_t ucc_cl_basic_mem_map(const ucc_base_context_t *context, int type,
1515
void *tl_h);
1616
ucc_status_t ucc_cl_basic_mem_unmap(const ucc_base_context_t *context, int type,
1717
void *tl_h);
18-
ucc_status_t ucc_cl_basic_memh_pack(const ucc_base_context_t *context,
18+
ucc_status_t ucc_cl_basic_memh_pack(const ucc_base_context_t *context, int type,
1919
void *memh, void **packed_buffer);
2020

2121
ucc_status_t ucc_cl_basic_get_lib_properties(ucc_base_lib_properties_t *prop);

src/components/cl/basic/cl_basic_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ucc_status_t ucc_cl_basic_mem_unmap(const ucc_base_context_t *context, int type,
7575
}
7676

7777
ucc_status_t ucc_cl_basic_memh_pack(const ucc_base_context_t *context, /* NOLINT */
78-
void *memh, void **packed_buffer) /* NOLINT */
78+
int type, void *memh, void **packed_buffer) /* NOLINT */
7979
{
8080
return UCC_ERR_NOT_SUPPORTED;
8181
}

src/components/cl/doca_urom/cl_doca_urom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ucc_status_t ucc_cl_doca_urom_mem_unmap(const ucc_base_context_t *context,
2121
int type, void *tl_h);
2222

2323
ucc_status_t ucc_cl_doca_urom_memh_pack(const ucc_base_context_t *context,
24-
void *memh, void **packed_buffer);
24+
int type, void *memh, void **packed_buffer);
2525

2626
ucc_status_t ucc_cl_doca_urom_get_lib_properties(ucc_base_lib_properties_t *prop);
2727

src/components/cl/doca_urom/cl_doca_urom_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ ucc_status_t ucc_cl_doca_urom_mem_unmap(const ucc_base_context_t *context,
571571
}
572572

573573
ucc_status_t ucc_cl_doca_urom_memh_pack(const ucc_base_context_t *context,
574-
void *memh, void **packed_buffer)
574+
int type, void *memh, void **packed_buffer)
575575
{
576576
return UCC_ERR_NOT_SUPPORTED;
577577
}

src/components/cl/hier/cl_hier.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ucc_status_t ucc_cl_hier_mem_unmap(const ucc_base_context_t *context, int type,
2626
void *tl_h);
2727

2828
ucc_status_t ucc_cl_hier_memh_pack(const ucc_base_context_t *context,
29-
void *memh, void **packed_buffer);
29+
int type, void *memh, void **packed_buffer);
3030

3131
static ucc_config_field_t ucc_cl_hier_lib_config_table[] = {
3232
{"", "", NULL, ucc_offsetof(ucc_cl_hier_lib_config_t, super),

src/components/cl/hier/cl_hier_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ucc_status_t ucc_cl_hier_mem_unmap(const ucc_base_context_t *context, int type,
106106
}
107107

108108
ucc_status_t ucc_cl_hier_memh_pack(const ucc_base_context_t *context, /* NOLINT */
109-
void *memh, void **packed_buffer) /* NOLINT */
109+
int type, void *memh, void **packed_buffer) /* NOLINT */
110110
{
111111
return UCC_ERR_NOT_SUPPORTED;
112112
}

src/components/tl/cuda/tl_cuda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ucc_status_t ucc_tl_cuda_mem_unmap(const ucc_base_context_t *context, int type,
7272
void *memh);
7373

7474
ucc_status_t ucc_tl_cuda_memh_pack(const ucc_base_context_t *context,
75-
void *memh, void **pack_buffer);
75+
int type, void *memh, void **pack_buffer);
7676

7777
UCC_CLASS_DEFINE_NEW_FUNC(ucc_tl_cuda_context_t, ucc_base_context_t,
7878
const ucc_base_context_params_t *,

src/components/tl/cuda/tl_cuda_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ ucc_status_t ucc_tl_cuda_mem_unmap(const ucc_base_context_t *context, /* NOLINT
8989
}
9090

9191
ucc_status_t ucc_tl_cuda_memh_pack(const ucc_base_context_t *context, /* NOLINT */
92-
void *memh, void **pack_buffer) /* NOLINT */
92+
int type, void *memh, void **pack_buffer) /* NOLINT */
9393
{
9494
return UCC_ERR_NOT_IMPLEMENTED;
9595
}

src/components/tl/mlx5/tl_mlx5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ucc_status_t ucc_tl_mlx5_mem_unmap(const ucc_base_context_t *context, int type,
1919
void *memh);
2020

2121
ucc_status_t ucc_tl_mlx5_memh_pack(const ucc_base_context_t *context,
22-
void *memh, void **pack_buffer);
22+
int type, void *memh, void **pack_buffer);
2323

2424
ucc_status_t ucc_tl_mlx5_get_lib_properties(ucc_base_lib_properties_t *prop);
2525

src/components/tl/mlx5/tl_mlx5_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ ucc_status_t ucc_tl_mlx5_mem_unmap(const ucc_base_context_t *context, int type,
317317
}
318318

319319
ucc_status_t ucc_tl_mlx5_memh_pack(const ucc_base_context_t *context, /* NOLINT */
320-
void *memh, void **pack_buffer) /* NOLINT */
320+
int type, void *memh, void **pack_buffer) /* NOLINT */
321321
{
322322
return UCC_ERR_NOT_IMPLEMENTED;
323323
}

src/components/tl/nccl/tl_nccl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ucc_status_t ucc_tl_nccl_mem_unmap(const ucc_base_context_t *context, int type,
2424
void *memh);
2525

2626
ucc_status_t ucc_tl_nccl_memh_pack(const ucc_base_context_t *context,
27-
void *memh, void **pack_buffer);
27+
int type, void *memh, void **pack_buffer);
2828

2929
static ucc_config_field_t ucc_tl_nccl_lib_config_table[] = {
3030
{"", "", NULL, ucc_offsetof(ucc_tl_nccl_lib_config_t, super),

src/components/tl/nccl/tl_nccl_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ ucc_status_t ucc_tl_nccl_mem_unmap(const ucc_base_context_t *context, int type,
238238
}
239239

240240
ucc_status_t ucc_tl_nccl_memh_pack(const ucc_base_context_t *context, /* NOLINT */
241-
void *memh, void **pack_buffer) /* NOLINT */
241+
int type, void *memh, void **pack_buffer) /* NOLINT */
242242
{
243243
return UCC_ERR_NOT_SUPPORTED;
244244
}

src/components/tl/rccl/tl_rccl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ucc_status_t ucc_tl_rccl_mem_unmap(const ucc_base_context_t *context, int type,
2525
void *memh);
2626

2727
ucc_status_t ucc_tl_rccl_memh_pack(const ucc_base_context_t *context,
28-
void *memh, void **pack_buffer);
28+
int type, void *memh, void **pack_buffer);
2929

3030
static ucc_config_field_t ucc_tl_rccl_lib_config_table[] = {
3131
{"", "", NULL, ucc_offsetof(ucc_tl_rccl_lib_config_t, super),

src/components/tl/rccl/tl_rccl_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ucc_status_t ucc_tl_rccl_mem_unmap(const ucc_base_context_t *context, int type,
135135
}
136136

137137
ucc_status_t ucc_tl_rccl_memh_pack(const ucc_base_context_t *context, /* NOLINT */
138-
void *memh, void **pack_buffer) /* NOLINT */
138+
int type, void *memh, void **pack_buffer) /* NOLINT */
139139
{
140140
return UCC_ERR_NOT_SUPPORTED;
141141
}

src/components/tl/self/tl_self.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ucc_status_t ucc_tl_self_mem_unmap(const ucc_base_context_t *context, int type,
2424
void *memh);
2525

2626
ucc_status_t ucc_tl_self_memh_pack(const ucc_base_context_t *context,
27-
void *memh, void **pack_buffer);
27+
int type, void *memh, void **pack_buffer);
2828

2929
ucc_status_t ucc_tl_self_get_lib_properties(ucc_base_lib_properties_t *prop);
3030

src/components/tl/self/tl_self_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ ucc_status_t ucc_tl_self_mem_unmap(const ucc_base_context_t *context, int type,
6464
}
6565

6666
ucc_status_t ucc_tl_self_memh_pack(const ucc_base_context_t *context, /* NOLINT */
67-
void *memh, void **pack_buffer) /* NOLINT */
67+
int type, void *memh, void **pack_buffer) /* NOLINT */
6868
{
6969
return UCC_ERR_NOT_SUPPORTED;
7070
}

src/components/tl/sharp/tl_sharp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ucc_status_t ucc_tl_sharp_mem_unmap(const ucc_base_context_t *context, int type,
2323
void *memh);
2424

2525
ucc_status_t ucc_tl_sharp_memh_pack(const ucc_base_context_t *context,
26-
void *memh, void **pack_buffer);
26+
int type, void *memh, void **pack_buffer);
2727

2828
static ucc_config_field_t ucc_tl_sharp_lib_config_table[] = {
2929
{"", "", NULL, ucc_offsetof(ucc_tl_sharp_lib_config_t, super),

src/components/tl/sharp/tl_sharp_context.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ ucc_status_t ucc_tl_sharp_mem_unmap(const ucc_base_context_t *context, int type,
526526
}
527527

528528
ucc_status_t ucc_tl_sharp_memh_pack(const ucc_base_context_t *context, /* NOLINT */
529-
void *memh, void **pack_buffer) /* NOLINT */
529+
int type, void *memh, void **pack_buffer) /* NOLINT */
530530
{
531531
return UCC_ERR_NOT_SUPPORTED;
532532
}

src/components/tl/ucp/tl_ucp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ucc_status_t ucc_tl_ucp_mem_map(const ucc_base_context_t *context, int type,
3636
void *address, size_t len, void *memh,
3737
void *tl_h);
3838

39-
ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, void *memh,
39+
ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, int type, void *memh,
4040
void **pack_buffer);
4141

4242
ucc_status_t ucc_tl_ucp_mem_unmap(const ucc_base_context_t *context, int type,

src/components/tl/ucp/tl_ucp_context.c

Lines changed: 50 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,12 @@ ucc_status_t ucc_tl_ucp_mem_map_memhbuf(ucc_tl_ucp_context_t *ctx,
584584

585585
ucc_status_t ucc_tl_ucp_mem_map_export(ucc_tl_ucp_context_t *ctx, void *address,
586586
size_t len,
587-
int type,
587+
ucc_mem_map_type_t type,
588588
ucc_tl_ucp_memh_data_t *m_data)
589589
{
590590
ucc_status_t ucc_status = UCC_OK;
591591
ucp_mem_h mh;
592592
ucp_mem_map_params_t mmap_params;
593-
ucp_memh_pack_params_t pack_params;
594593
ucs_status_t status;
595594

596595
if (type == UCC_MEM_MAP_TYPE_LOCAL) {
@@ -609,50 +608,17 @@ ucc_status_t ucc_tl_ucp_mem_map_export(ucc_tl_ucp_context_t *ctx, void *address,
609608
m_data->rinfo.mem_h = mh;
610609
m_data->rinfo.va_base = address;
611610
m_data->rinfo.len = len;
612-
613-
pack_params.field_mask = UCP_MEMH_PACK_PARAM_FIELD_FLAGS;
614-
pack_params.flags = UCP_MEMH_PACK_FLAG_EXPORT;
615-
616-
status = ucp_memh_pack(mh, &pack_params, &m_data->packed_memh,
617-
&m_data->packed_memh_len);
618-
if (status != UCS_OK) {
619-
// we don't support memory pack, or it failed
620-
tl_debug(ctx->super.super.lib, "ucp_memh_pack() returned error %s",
621-
ucs_status_string(status));
622-
m_data->packed_memh = 0;
623-
m_data->packed_memh_len = 0;
624-
}
625611
}
626-
627-
if (!m_data->rinfo.mem_h) {
628-
tl_error(ctx->super.super.lib,
629-
"attempting to pack keys with invalid memory handle");
630-
return UCC_ERR_INVALID_PARAM;
631-
}
632-
633-
// pack rkey (mem_h should be valid by this point)
634-
status =
635-
ucp_rkey_pack(ctx->worker.ucp_context, m_data->rinfo.mem_h,
636-
&m_data->rinfo.packed_key, &m_data->rinfo.packed_key_len);
637-
if (status != UCS_OK) {
638-
tl_error(ctx->super.super.lib, "unable to pack rkey with error %s",
639-
ucs_status_string(status));
640-
ucp_mem_unmap(ctx->worker.ucp_context, m_data->rinfo.mem_h);
641-
ucc_status = ucs_status_to_ucc_status(status);
642-
return ucc_status;
643-
}
644-
645612
return ucc_status;
646613
}
647614

648615
ucc_status_t ucc_tl_ucp_mem_map_offload_import(ucc_tl_ucp_context_t *ctx,
649-
void *address, size_t len,
650-
ucc_tl_ucp_memh_data_t *m_data,
651-
ucc_mem_map_memh_t *l_memh,
652-
void *tl_h)
616+
void *address, size_t len,
617+
ucc_tl_ucp_memh_data_t *m_data,
618+
ucc_mem_map_memh_t *l_memh,
619+
ucc_mem_map_tl_t *tl_h)
653620
{
654621
int i = 0;
655-
ucc_mem_map_tl_t *tl = (ucc_mem_map_tl_t *)tl_h;
656622
size_t offset = 0;
657623
ucp_mem_h mh;
658624
ucc_status_t ucc_status;
@@ -664,7 +630,7 @@ ucc_status_t ucc_tl_ucp_mem_map_offload_import(ucc_tl_ucp_context_t *ctx,
664630
packed_size = (size_t *)PTR_OFFSET(l_memh->pack_buffer,
665631
offset + UCC_MEM_MAP_TL_NAME_LEN);
666632

667-
if (strncmp(tl->tl_name, name, UCC_MEM_MAP_TL_NAME_LEN - 1) == 0) {
633+
if (strncmp(tl_h->tl_name, name, UCC_MEM_MAP_TL_NAME_LEN - 1) == 0) {
668634
break;
669635
}
670636
/* this is not the index, skip this section of buffer if exists */
@@ -688,14 +654,12 @@ ucc_status_t ucc_tl_ucp_mem_map_offload_import(ucc_tl_ucp_context_t *ctx,
688654
return UCC_OK;
689655
}
690656

691-
ucc_status_t ucc_tl_ucp_mem_map(const ucc_base_context_t *context, int type,
692-
void *address, size_t len, void *memh,
693-
void *tl_h)
657+
ucc_status_t ucc_tl_ucp_mem_map(const ucc_base_context_t *context, ucc_mem_map_type_t type,
658+
void *address, size_t len, ucc_mem_map_memh_t *memh,
659+
ucc_mem_map_tl_t *tl_h)
694660
{
695-
ucc_tl_ucp_context_t *ctx = ucc_derived_of(context, ucc_tl_ucp_context_t);
696-
ucc_mem_map_tl_t *p_memh = (ucc_mem_map_tl_t *)tl_h;
697-
ucc_tl_ucp_memh_data_t *m_data = (ucc_tl_ucp_memh_data_t *)p_memh->tl_data;
698-
ucc_mem_map_memh_t *l_memh = (ucc_mem_map_memh_t *)memh;
661+
ucc_tl_ucp_context_t *ctx = ucc_derived_of(context, ucc_tl_ucp_context_t);
662+
ucc_tl_ucp_memh_data_t *m_data = tl_h->tl_data;
699663
ucc_status_t ucc_status = UCC_OK;
700664

701665
/* technically, only need to do this on import */
@@ -707,7 +671,7 @@ ucc_status_t ucc_tl_ucp_mem_map(const ucc_base_context_t *context, int type,
707671
tl_error(ctx->super.super.lib, "failed to allocate tl data");
708672
return UCC_ERR_NO_MEMORY;
709673
}
710-
p_memh->tl_data = m_data;
674+
tl_h->tl_data = m_data;
711675
}
712676

713677
if (type == UCC_MEM_MAP_TYPE_LOCAL || type == UCC_MEM_MAP_TYPE_OFFLOAD_EXPORT) {
@@ -717,31 +681,30 @@ ucc_status_t ucc_tl_ucp_mem_map(const ucc_base_context_t *context, int type,
717681
}
718682
} else if (type == UCC_MEM_MAP_TYPE_OFFLOAD_IMPORT) {
719683
ucc_status = ucc_tl_ucp_mem_map_offload_import(ctx, address, len,
720-
m_data, l_memh, tl_h);
684+
m_data, memh, tl_h);
721685
if (UCC_OK != ucc_status) {
722686
tl_error(ctx->super.super.lib, "failed to import memory handle");
723687
}
724688
}
725689

726-
p_memh->packed_size =
690+
tl_h->packed_size =
727691
m_data->packed_memh_len + m_data->rinfo.packed_key_len;
728692

729693
return ucc_status;
730694
}
731695

732-
ucc_status_t ucc_tl_ucp_mem_unmap(const ucc_base_context_t *context, int type,
733-
void *memh)
696+
ucc_status_t ucc_tl_ucp_mem_unmap(const ucc_base_context_t *context, ucc_mem_map_type_t type,
697+
ucc_mem_map_tl_t *memh)
734698
{
735699
ucc_tl_ucp_context_t *ctx = ucc_derived_of(context, ucc_tl_ucp_context_t);
736-
ucc_mem_map_tl_t *p_memh = (ucc_mem_map_tl_t *)memh;
737700
ucc_tl_ucp_memh_data_t *data;
738701
ucs_status_t status;
739702

740-
if (!p_memh) {
703+
if (!memh) {
741704
return UCC_OK;
742705
}
743706

744-
data = (ucc_tl_ucp_memh_data_t *)p_memh->tl_data;
707+
data = (ucc_tl_ucp_memh_data_t *)memh->tl_data;
745708

746709
if (type == UCC_MEM_MAP_TYPE_LOCAL || type == UCC_MEM_MAP_TYPE_OFFLOAD_EXPORT) {
747710
status = ucp_mem_unmap(ctx->worker.ucp_context, data->rinfo.mem_h);
@@ -768,18 +731,42 @@ ucc_status_t ucc_tl_ucp_mem_unmap(const ucc_base_context_t *context, int type,
768731
return UCC_OK;
769732
}
770733

771-
ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, void *memh,
734+
ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, ucc_mem_map_type_t type, ucc_mem_map_tl_t *tl_h,
772735
void **pack_buffer)
773736
{
774-
ucc_tl_ucp_context_t *ctx = ucc_derived_of(context, ucc_tl_ucp_context_t);
775-
ucc_mem_map_tl_t *p_memh = (ucc_mem_map_tl_t *)memh;
776-
ucc_tl_ucp_memh_data_t *data = p_memh->tl_data;
737+
ucc_tl_ucp_context_t *ctx = ucc_derived_of(context, ucc_tl_ucp_context_t);
738+
ucc_tl_ucp_memh_data_t *data = tl_h->tl_data;
777739
void *packed_buffer;
778740
size_t *key_size;
779741
size_t *memh_size;
742+
ucp_memh_pack_params_t pack_params;
743+
ucs_status_t status;
780744

781-
if (!data) {
782-
return UCC_OK;
745+
if (!data || !data->rinfo.mem_h) {
746+
tl_error(ctx->super.super.lib, "unable to pack memory handle without TL handles");
747+
return UCC_ERR_INVALID_PARAM;
748+
}
749+
if (type == UCC_MEM_MAP_TYPE_LOCAL) {
750+
pack_params.field_mask = UCP_MEMH_PACK_PARAM_FIELD_FLAGS;
751+
pack_params.flags = UCP_MEMH_PACK_FLAG_EXPORT;
752+
753+
status = ucp_memh_pack(data->rinfo.mem_h, &pack_params, &data->packed_memh,
754+
&data->packed_memh_len);
755+
if (status != UCS_OK) {
756+
// we don't support memory pack, or it failed
757+
tl_debug(ctx->super.super.lib, "ucp_memh_pack() returned error %s",
758+
ucs_status_string(status));
759+
data->packed_memh = 0;
760+
data->packed_memh_len = 0;
761+
}
762+
}
763+
status =
764+
ucp_rkey_pack(ctx->worker.ucp_context, data->rinfo.mem_h,
765+
&data->rinfo.packed_key, &data->rinfo.packed_key_len);
766+
if (status != UCS_OK) {
767+
tl_error(ctx->super.super.lib, "unable to pack rkey with error %s",
768+
ucs_status_string(status));
769+
return ucs_status_to_ucc_status(status);
783770
}
784771
/*
785772
* data order
@@ -792,7 +779,7 @@ ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, void *memh,
792779
if (!packed_buffer) {
793780
tl_error(ctx->super.super.lib,
794781
"failed to allocate a packed buffer of size %lu",
795-
data->packed_memh_len + data->rinfo.packed_key_len);
782+
data->packed_memh_len + data->rinfo.packed_key_len + 2 * sizeof(size_t));
796783
return UCC_ERR_NO_MEMORY;
797784
}
798785
key_size = packed_buffer;
@@ -805,7 +792,7 @@ ucc_status_t ucc_tl_ucp_memh_pack(const ucc_base_context_t *context, void *memh,
805792
sizeof(size_t) * 2 + data->rinfo.packed_key_len),
806793
data->packed_memh, *memh_size);
807794

808-
p_memh->packed_size =
795+
tl_h->packed_size =
809796
sizeof(size_t) * 2 + data->packed_memh_len + data->rinfo.packed_key_len;
810797
*pack_buffer = packed_buffer;
811798
return UCC_OK;

0 commit comments

Comments
 (0)