Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TL/UCP: disable proto that need memory type copy #1079

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/tl/ucp/tl_ucp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -246,6 +246,12 @@ static ucs_config_field_t ucc_tl_ucp_context_config_table[] = {
ucc_offsetof(ucc_tl_ucp_context_config_t, service_throttling_thresh),
UCC_CONFIG_TYPE_UINT},

{"MEMTYPE_AVOID_COPY", "n",
"Avoid memory type copies when activated.",
ucc_offsetof(ucc_tl_ucp_context_config_t, avoid_copy_mem_types),
UCC_CONFIG_TYPE_BOOL,
},

{NULL}};

UCC_CLASS_DEFINE_NEW_FUNC(ucc_tl_ucp_lib_t, ucc_base_lib_t,
Expand Down
3 changes: 2 additions & 1 deletion src/components/tl/ucp/tl_ucp.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -87,6 +87,7 @@ typedef struct ucc_tl_ucp_context_config {
uint32_t pre_reg_mem;
uint32_t service_worker;
uint32_t service_throttling_thresh;
int avoid_copy_mem_types;
} ucc_tl_ucp_context_config_t;

typedef ucc_tl_ucp_lib_config_t ucc_tl_ucp_team_config_t;
Expand Down
7 changes: 6 additions & 1 deletion src/components/tl/ucp/tl_ucp_context.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* Copyright (c) 2020-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -163,6 +163,11 @@ UCC_CLASS_INIT_FUNC(ucc_tl_ucp_context_t,
prefix[strlen(prefix) - 1] = '\0';
UCP_CHECK(ucp_config_read(prefix, NULL, &ucp_config),
"failed to read ucp configuration", err_cfg_read, self);
if (tl_ucp_config->avoid_copy_mem_types) {
UCP_CHECK(ucp_config_modify(ucp_config, "MEMTYPE_AVOID_COPY", "yes"),
"failed to set memtype avoid copy option for UCX",
err_cfg, self);
}

ucp_params.field_mask =
UCP_PARAM_FIELD_FEATURES | UCP_PARAM_FIELD_TAG_SENDER_MASK | UCP_PARAM_FIELD_NAME;
Expand Down
Loading