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

UCT/UCP: Fix compilation errors with armcc-22.1 #8970

Merged
merged 1 commit into from
Apr 12, 2023
Merged
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
2 changes: 1 addition & 1 deletion src/ucp/wireup/ep_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ucp_ep_h ucp_ep_match_retrieve(ucp_worker_h worker, uint64_t dest_uuid,
ucp_ep_match_conn_sn_t conn_sn,
ucs_conn_match_queue_type_t conn_queue_type)
{
ucp_ep_flags_t exp_ep_flags = UCP_EP_FLAG_ON_MATCH_CTX;
ucp_ep_flags_t UCS_V_UNUSED exp_ep_flags = UCP_EP_FLAG_ON_MATCH_CTX;
yosefe marked this conversation as resolved.
Show resolved Hide resolved
ucs_conn_match_elem_t *conn_match;
ucp_ep_h ep;

Expand Down
3 changes: 3 additions & 0 deletions src/uct/ib/base/ib_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ static inline ucs_status_t uct_ib_query_device(struct ibv_context *ctx,
# define IBV_ACCESS_RELAXED_ORDERING 0
#endif

#if !HAVE_DECL_IBV_ACCESS_ON_DEMAND
# define IBV_ACCESS_ON_DEMAND 0
#endif
Comment on lines +74 to +76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why needed? can't we remove it from the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pls elaborate?
Avoiding compilation failure with arm clang on specific config

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right..
so, maybe we need to expose from UCT that ODP is disabled if IBV_ACCESS_ON_DEMAND==0?
even if it's supported by FW


/*
* DC support
Expand Down
1 change: 1 addition & 0 deletions src/uct/ib/configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ AS_IF([test "x$with_ib" = "xyes"],
[], [], [[#include <infiniband/verbs.h>]])

AC_CHECK_DECLS([IBV_ACCESS_RELAXED_ORDERING,
IBV_ACCESS_ON_DEMAND,
IBV_QPF_GRH_REQUIRED],
[], [], [[#include <infiniband/verbs.h>]])

Expand Down
6 changes: 6 additions & 0 deletions src/uct/ib/mlx5/dv/ib_mlx5dv_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,12 @@ uct_ib_mlx5_devx_check_odp(uct_ib_mlx5_md_t *md,
goto no_odp;
}

if (IBV_ACCESS_ON_DEMAND == 0) {
ucs_debug("%s: disable ODP because IBV_ACCESS_ON_DEMAND is not supported",
uct_ib_device_name(&md->super.dev));
goto no_odp;
}

if (!UCT_IB_MLX5DV_GET(cmd_hca_cap, cap, pg)) {
goto no_odp;
}
Expand Down