Skip to content

Commit

Permalink
Merge pull request #6990 from ROCmSoftwarePlatform/v1.11.x
Browse files Browse the repository at this point in the history
UCT/ROCM/COPY: Fix test_uct_query gtest
  • Loading branch information
yosefe authored Jun 23, 2021
2 parents 687a478 + ea878d5 commit 5a42a81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/uct/rocm/copy/rocm_copy_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,20 @@ static uct_iface_ops_t uct_rocm_copy_iface_ops = {
.iface_is_reachable = uct_rocm_copy_iface_is_reachable,
};

static uct_iface_internal_ops_t uct_rocm_copy_iface_internal_ops = {
.iface_estimate_perf = (uct_iface_estimate_perf_func_t)ucs_empty_function_return_success,
.iface_vfs_refresh = (uct_iface_vfs_refresh_func_t)ucs_empty_function,
};

static UCS_CLASS_INIT_FUNC(uct_rocm_copy_iface_t, uct_md_h md, uct_worker_h worker,
const uct_iface_params_t *params,
const uct_iface_config_t *tl_config)
{
uct_rocm_copy_iface_config_t *config = ucs_derived_of(tl_config,
uct_rocm_copy_iface_config_t);

UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_rocm_copy_iface_ops, NULL,
UCS_CLASS_CALL_SUPER_INIT(uct_base_iface_t, &uct_rocm_copy_iface_ops,
&uct_rocm_copy_iface_internal_ops,
md, worker, params,
tl_config UCS_STATS_ARG(params->stats_root)
UCS_STATS_ARG(UCT_ROCM_COPY_TL_NAME));
Expand Down
3 changes: 2 additions & 1 deletion test/gtest/uct/test_p2p_rma.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ void uct_p2p_rma_test::test_xfer(send_func_t send, size_t length,
{
ucs_memory_type_t src_mem_type = UCS_MEMORY_TYPE_HOST;

if (has_transport("cuda_ipc")) {
if (has_transport("cuda_ipc") ||
has_transport("rocm_copy")) {
src_mem_type = mem_type;
}

Expand Down
4 changes: 3 additions & 1 deletion test/gtest/uct/v2/test_uct_query.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ UCS_TEST_P(test_uct_query, query_perf)
/* At least one type of bandwidth must be non-zero */
EXPECT_NE(0, perf_attr.bandwidth.shared + perf_attr.bandwidth.dedicated);

if (has_transport("cuda_copy") || has_transport("gdr_copy")) {
if (has_transport("cuda_copy") ||
has_transport("gdr_copy") ||
has_transport("rocm_copy")) {
uct_perf_attr_t perf_attr_get;
perf_attr_get.field_mask = UCT_PERF_ATTR_FIELD_OPERATION |
UCT_PERF_ATTR_FIELD_BANDWIDTH;
Expand Down

0 comments on commit 5a42a81

Please sign in to comment.