-
Notifications
You must be signed in to change notification settings - Fork 421
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
UCP/API: Support endpoint performance evaluation #6403
Conversation
src/ucp/api/ucp.h
Outdated
* | ||
* This enumeration defines all available UCP operations. | ||
*/ | ||
typedef enum ucp_ep_op { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using ucp_feature
would be appropriate here, instead of creating a new enum? Unsure about that..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use ucp_ep_operation_t
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
My logic was to be consistent with types like ucp_op_attr_t
, ucp_atomic_fetch_op_t
, etc. - which use _op_
and not _operation_
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleon99 maybe rename to ucp_ep_op_type_t
UCP_OP_TYPE_TAG
and
ucp_ep_op_type_t op_type
in the struct?
because TAG is {tag_send,tag_send_sync}; RMA is {put,get} - each value is >1 specific op
src/ucp/api/ucp.h
Outdated
* This enumeration defines all available UCP operations. | ||
*/ | ||
typedef enum ucp_ep_op { | ||
UCP_OP_TAG, /**< Tag matching */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UCP_OPERATION_TAG
src/ucp/api/ucp.h
Outdated
UCP_OP_AMO32, /**< 32-bit atomic operations */ | ||
UCP_OP_AMO64 /**< 64-bit atomic operations */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UCP_OPERATION_ATOMIC
src/ucp/api/ucp.h
Outdated
*/ | ||
enum ucp_ep_perf_attr_field { | ||
/** Enables @ref ucp_ep_perf_attr_t::message_size */ | ||
UCP_EP_ATTR_FIELD_MESSAGE_SIZE = UCS_BIT(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UCP_EP_PERF_ATTR_FIELD_MESSAGE_SIZE
src/ucp/api/ucp.h
Outdated
|
||
/** Enables @ref ucp_ep_perf_attr_t::bandwidth */ | ||
UCP_EP_ATTR_FIELD_BANDWIDTH = UCS_BIT(4) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ucp_ep_perf_attr_field_t
src/ucp/api/ucp.h
Outdated
* | ||
* This enumeration defines all available UCP operations. | ||
*/ | ||
typedef enum ucp_ep_op { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use ucp_ep_operation_t
src/ucp/api/ucp.h
Outdated
/** | ||
* Bandwidth this endpoint is able to provide. | ||
* This field is set by the UCP layer. | ||
*/ | ||
double bandwidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of bandwidth: we can provide estimated to deliver the message
this will encompass both bw and latency
user can calc size/time to get bw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean a time estimate (i.e bw / size
) ?
@yosefe , fixed CR comments. |
src/ucp/api/ucp.h
Outdated
uct_ep_op_t operation; | ||
|
||
/** | ||
* Estimated time required to send a message of a given size on this endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add time is in seconds
src/ucp/core/ucp_ep.c
Outdated
iface_attr = ucp_worker_iface_get_attr(worker, max_bandwidth_rsc_index); | ||
attr->estimated_time = ucp_tl_iface_latency(context, | ||
&iface_attr->latency) + | ||
attr->message_size / max_bandwidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls beautify (use local var, indent, etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added local vars.
src/ucp/core/ucp_ep.c
Outdated
rsc_index = key->lanes[lane].rsc_index; | ||
wiface = worker->ifaces[rsc_index]; | ||
bandwidth = ucp_tl_iface_bandwidth(context, | ||
&wiface->attr.bandwidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weird indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? The indent is on the first char after the (
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i mean, too many spaces before =
attr.message_size = 1000; | ||
result = ucp_ep_perf_query(ep, &attr); | ||
EXPECT_EQ(result, UCS_OK); | ||
EXPECT_GT(attr.estimated_time, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EXPECT_LT(attr.estimated_time, 30);
src/ucp/api/ucp.h
Outdated
UCP_OP_RMA, /**< Remote memory access */ | ||
UCP_OP_AMO32, /**< 32-bit atomic operations */ | ||
UCP_OP_AMO64 /**< 64-bit atomic operations */ | ||
} uct_ep_op_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STREAM is missing here
src/ucp/api/ucp.h
Outdated
* | ||
* @return Error code as defined by @ref ucs_status_t | ||
*/ | ||
ucs_status_t ucp_ep_perf_query(ucp_ep_h ep, ucp_ep_perf_attr_t *attr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use ucp_ep_query
name to be able to extend this in the future? Otherwise we will have to introduce new call if want to query non-perf attrs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. we already made some plans to query an ep for the client-server case to retrieve an ep's local connected sockaddr and the remote sockaddr it's connected to.
if we dont use ucp_ep_query now, we would need to have different functions to querying different ep attrs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a difference between ucp_ep_query
and ucp_ep_perf_query
: in perf_query, the user would pass input parameters (memory types, length, operation) for which the performance should be retrieved.
IMO it would be weird to mix those input parameters along with general ep query, and better have 2 separate functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then maybe avoid using 'query' in the name here?
you dont think it can be confusing for a user to have 2 ucp ep API querying functions? ucp_ep_query and ucp_ep_perf_query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the user would pass input parameters (memory types, length, operation) for which the performance should be retrieved.
maybe use struct to combine them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use struct to combine them?
That struct will also need to have field mask
then maybe avoid using 'query' in the name here?
agree it would be better, unfortunately I can't thing of a good name, maybe something like
ucp_ep_estimate_perf
orucp_ep_eval_perf
?
ucp_ep_calc_perf
?
ucp_ep_eval_perf
sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleon99 WDYT about ucp_ep_eval_perf
?
i think we should sync the UCT API with same name as we decide here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Maybe ucp_ep_estimate_perf
? "estimation" is perhaps more accurate here, as the function estimates performance and returns an estimate, rather than evaluating it. But I'm ok with _eval_
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's use estimate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yosefe let's discuss offline. This does look like a query interface and I'm still not sure why want separate perf API. I do think it is the right functionality to have we just need to flush out the API
src/ucp/core/ucp_ep.c
Outdated
ucp_rsc_index_t rsc_index = 0, max_bandwidth_rsc_index = 0; | ||
double bandwidth = 0, max_bandwidth = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz moved initialized vars to the very beginning of the func
src/ucp/api/ucp.h
Outdated
uint64_t field_mask; | ||
|
||
/** | ||
* Message size to use for determining performance. | ||
* This field must be initialized by the caller. | ||
*/ | ||
size_t message_size; | ||
|
||
/** | ||
* Local memory type to use for determining performance. | ||
* This field must be initialized by the caller. | ||
*/ | ||
ucs_memory_type_t local_memory_type; | ||
|
||
/** | ||
* Remote memory type to use for determining performance. | ||
* Relevant only for operations that have remote memory access. | ||
* This field must be initialized by the caller. | ||
*/ | ||
ucs_memory_type_t remote_memory_type; | ||
|
||
/** | ||
* Operation to report performance for. | ||
* This field must be initialized by the caller. | ||
*/ | ||
uct_ep_op_t operation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is required to be set to get estimated_time? Can i omit some or all input params? What would UCX use then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the first phase (current implementation), only message_size
is used for time calculation. {local,remote}_message_size
and operation
are here just for future compatibility, but actually they can be safely removed here and added back in a later commit, when their values would really be used.
@yosefe - shall I explicitly mention that in code comments, or remove these vars at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think defaults are worth mentioning for the optional fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is in/out structure, it is really challenging to figure out what is input and what is output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is extendable, I would suggest to remove what is not going to be implemented in a near term (before next release) and we will add as it is gets implemented. This way it also aligns better with your gtest, which tests only the message size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this means - keep only message size (input) and time (output) for now
src/ucp/api/ucp.h
Outdated
@@ -368,7 +368,8 @@ typedef enum ucp_ep_op { | |||
UCP_OP_AM, /**< Active messge */ | |||
UCP_OP_RMA, /**< Remote memory access */ | |||
UCP_OP_AMO32, /**< 32-bit atomic operations */ | |||
UCP_OP_AMO64 /**< 64-bit atomic operations */ | |||
UCP_OP_AMO64, /**< 64-bit atomic operations */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have only ATOMIC, not AMO32/64
since there is a "size" field
src/ucp/core/ucp_ep.c
Outdated
ucp_lane_index_t lane; | ||
ucp_worker_iface_t *wiface; | ||
uct_iface_attr_t *iface_attr; | ||
ucp_rsc_index_t rsc_index = 0, max_bandwidth_rsc_index = 0; | ||
double bandwidth = 0, max_bandwidth = 0; | ||
double constant_estimated_time, variable_estimated_time; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe can use ucs_linear_func_t
src/ucp/core/ucp_ep.c
Outdated
double bandwidth = 0, max_bandwidth = 0; | ||
ucp_rsc_index_t rsc_index = 0, max_bandwidth_rsc_index = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need to initialize all of these?
bot:pipe:retest |
src/ucp/api/ucp.h
Outdated
* | ||
* @return Error code as defined by @ref ucs_status_t | ||
*/ | ||
ucs_status_t ucp_ep_estimate_perf(ucp_ep_h ep, ucp_ep_perf_attr_t *attr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit the query just for performance ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamisp pls see #6403 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perf offline discussion with @shamisp, suggest to rename this API to ucp_ep_assess_perf.
@tonycurtis WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My first thought was "eval" might be better, and that's already been suggested.
(The comment needs updating too if that's not a W.I.P. and you could put "estimate" there if you think it would be helpful)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamisp are you ok with ucp_ep_evaluate_perf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleon99 can you pls rename (and docs, if needed) to ucp_ep_evaluate_perf
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yosefe , done
@yosefe , is this one still blocked? |
@shamisp can you pls take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why added test/gtest/ucp/test_ucp_worker_query.cc ?
src/ucp/api/ucp.h
Outdated
* | ||
* This enumeration defines all available UCP operations. | ||
*/ | ||
typedef enum ucp_ep_op { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gleon99 maybe rename to ucp_ep_op_type_t
UCP_OP_TYPE_TAG
and
ucp_ep_op_type_t op_type
in the struct?
because TAG is {tag_send,tag_send_sync}; RMA is {put,get} - each value is >1 specific op
bot:pipe:retest |
@shamisp @tonycurtis can you pls take a look? |
* @ingroup UCP_ENDPOINT | ||
* @brief UCP performance endpoint attributes. | ||
* | ||
* The structure defines the attributes which characterize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which -> that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/ucp/api/ucp.h
Outdated
UCP_OP_TYPE_RMA, /**< Remote memory access */ | ||
UCP_OP_TYPE_ATOMIC, /**< Atomic operations */ | ||
UCP_OP_TYPE_STREAM /**< Stream */ | ||
} ucp_ep_op_type_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost identical to
Line 140 in b72fec8
enum ucp_feature { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not exactly the same, and unfortunately we can't change UCP_FEATURE_xx, but on other hand it would not exactly fit perf query API
* on this endpoint. | ||
* This field is set by the @ref ucp_ep_evaluate_perf function. | ||
*/ | ||
double estimated_time; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yosefe maybe we should separate in and out arg ? this looks a bit odd. There is also enable mask for this field. What happens if the enable bit is not set but the function is called ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the enable bit is not set but the function is called?
Then this field will not be written to by the function
And if we add another [in] field we will have in/out fields interleaving
each other.
…On Thu, Mar 25, 2021 at 10:40 AM Yossi Itigin ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/ucp/api/ucp.h
<#6403 (comment)>:
> + * This field must be initialized by the caller.
+ */
+ ucs_memory_type_t remote_memory_type;
+
+ /**
+ * Operation type to report performance for.
+ * This field must be initialized by the caller.
+ */
+ ucp_ep_op_type_t op_type;
+
+ /**
+ * Estimated time (in seconds) required to send a message of a given size
+ * on this endpoint.
+ * This field is set by the @ref ucp_ep_evaluate_perf function.
+ */
+ double estimated_time;
What happens if the enable bit is not set but the function is called?
Then this field will not be written to by the function
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6403 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARB5WCBTMTTLPZYEDR776TTFNKOHANCNFSM4YGMDDRA>
.
|
It's possible, but IMO this is not a significant issue, but on the other hand - adding another structure and bitfield will add more "API burden". We are documenting for each field whether it's "in" or "out". @tonycurtis which one do you think is better from user perspective: separate "in" and "out" structures with separate bitmasks, or put all in/out params in same struct? |
@tonycurtis , @shamisp - can comment please? |
For clarity's sake, a const parameter with the request, and another parameter with the result does seem less potentially confusing. |
@yosefe - fixed according to @tonycurtis comment. Notice that I separated the args of |
src/ucp/api/ucp.h
Outdated
typedef enum ucp_ep_perf_attr_field { | ||
/** Enables @ref ucp_ep_perf_attr_t::message_size */ | ||
UCP_EP_PERF_ATTR_FIELD_MESSAGE_SIZE = UCS_BIT(0), | ||
typedef enum ucp_ep_perf_request_field { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency, it should be
ucp_ep_perf_param_field - for input
ucp_ep_perf_attr_field - for output
@yosefe , fixed |
@yosefe - squashed. |
@tonycurtis @shamisp can you check again the latest version? |
src/ucp/api/ucp.h
Outdated
*/ | ||
typedef enum { | ||
UCP_OP_TYPE_TAG, /**< Tag matching */ | ||
UCP_OP_TYPE_AM, /**< Active messge */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/ucp/api/ucp.h
Outdated
* Local memory type to use for determining performance. | ||
* This field must be initialized by the caller. | ||
*/ | ||
ucs_memory_type_t local_memory_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the field is not user by the implementation and not tested by unit test. Why we introduce it now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to allow applications to pass more information to UCP, so future implementations of the UCX library will be able to make a more accurate performance estimation. IMO it is better than requiring application developers to keep updating their codes and pass additional parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we are ignoring this parameter and don't test it..I don't see why would anybody use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think it would be better to remove this from API until it's really implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't implement it and test it, it makes more sense to remove it. It can be easy added later on.
src/ucp/api/ucp.h
Outdated
* Relevant only for operations that have remote memory access. | ||
* This field must be initialized by the caller. | ||
*/ | ||
ucs_memory_type_t remote_memory_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the field is not user by the implementation and not tested by unit test. Why we introduce it now ?
* Message size to use for determining performance. | ||
* This field must be initialized by the caller. | ||
*/ | ||
size_t message_size; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have question about "must be initialized by the caller". Does caller must initialized the field or we can leave it empty (aka corresponding field_mask is not set?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must be initialized by the caller" means that the field must be initialized, and the corresponding field in field_mask should be set. Do we need to clarify it in the doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at implementation - if you don't set the field, it does not cause any failure. So it appears that you don't must to set the field, it just does not return any useful information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right.
@gleon99 we need to fail with invalid param if message_size not passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/ucp/api/ucp.h
Outdated
* Operation type to report performance for. | ||
* This field must be initialized by the caller. | ||
*/ | ||
ucp_ep_op_type_t op_type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the field is not user by the implementation and not tested by unit test. Why we introduce it now ?
@yosefe , fixed. |
src/ucp/api/ucp.h
Outdated
@@ -376,7 +367,7 @@ typedef enum ucp_ep_perf_attr_field { | |||
*/ | |||
typedef enum { | |||
UCP_OP_TYPE_TAG, /**< Tag matching */ | |||
UCP_OP_TYPE_AM, /**< Active messge */ | |||
UCP_OP_TYPE_AM, /**< Active message */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably remove this enum
@yosefe , squashed. |
@shamisp can you pls look again? |
attr->estimated_time = estimated_time.c + estimated_time.m; | ||
} | ||
|
||
return UCS_OK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yosefe If UCP_EP_PERF_ATTR_FIELD_ESTIMATED_TIME and UCP_EP_PERF_PARAM_FIELD_MESSAGE_SIZE are not set, shell we return UCS_ERR_INVALID_PARAM ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shamisp , done.
src/ucp/core/ucp_ep.c
Outdated
/* Skip CM lanes for banwidth calculation */ | ||
continue; | ||
} | ||
if (!(attr->field_mask & UCP_EP_PERF_ATTR_FIELD_ESTIMATED_TIME) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: can use ucs_test_all_flags
src/ucp/core/ucp_ep.c
Outdated
ucs_assert(max_bandwidth > 0); | ||
iface_attr = ucp_worker_iface_get_attr(worker, max_bandwidth_rsc_index); | ||
estimated_time.c = ucp_tl_iface_latency(context, &iface_attr->latency); | ||
estimated_time.m = param->message_size / max_bandwidth; | ||
attr->estimated_time = estimated_time.c + estimated_time.m; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- maybe remove assert?
- indent = on column
@yosefe , fixed. |
@yosefe , squashed. |
bot:pipe:retest |
What
Support querying performance of an endpoint, by message length and operation type.
At the first stage, a constant bandwidth is returned, regardless of the given params.
In the future, more precise bandwidth calculation will be implemented.
Why ?
Allow users to retrieve bandwidth information per-endpoint.