Skip to content

Commit 5fe5daf

Browse files
DEVICE: Document return status for device APIs (#10940)
1 parent 63be744 commit 5fe5daf

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

src/ucp/api/device/ucp_device_impl.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ UCS_F_DEVICE ucs_status_t ucp_device_prepare_send(
133133
* @param [in] flags Flags usable to modify the function behavior.
134134
* @param [out] req Request populated by the call.
135135
*
136+
* @return UCS_INPROGRESS - Operation successfully posted. If @a req is not
137+
* NULL, use @ref ucp_device_progress_req to check
138+
* for completion.
139+
* @return UCS_OK - Operation completed successfully.
136140
* @return Error code as defined by @ref ucs_status_t
137141
*/
138142
template<ucs_device_level_t level = UCS_DEVICE_LEVEL_THREAD>
@@ -188,6 +192,10 @@ UCS_F_DEVICE ucs_status_t ucp_device_put_single(
188192
* @param [in] flags Flags usable to modify the function behavior.
189193
* @param [out] req Request populated by the call.
190194
*
195+
* @return UCS_INPROGRESS - Operation successfully posted. If @a req is not
196+
* NULL, use @ref ucp_device_progress_req to check
197+
* for completion.
198+
* @return UCS_OK - Operation completed successfully.
191199
* @return Error code as defined by @ref ucs_status_t
192200
*/
193201
template<ucs_device_level_t level = UCS_DEVICE_LEVEL_THREAD>
@@ -243,6 +251,11 @@ UCS_F_DEVICE ucs_status_t ucp_device_counter_inc(
243251
* @param [in] flags Flags to modify the function behavior.
244252
* @param [out] req Request populated by the call.
245253
*
254+
* @return UCS_INPROGRESS - Operation successfully posted. If @a req
255+
* is not NULL, use @ref
256+
* ucp_device_progress_req to check for
257+
* completion.
258+
* @return UCS_OK - Operation completed successfully.
246259
* @return Error code as defined by @ref ucs_status_t
247260
*/
248261
template<ucs_device_level_t level = UCS_DEVICE_LEVEL_THREAD>
@@ -321,6 +334,11 @@ UCS_F_DEVICE ucs_status_t ucp_device_put_multi(
321334
* @param [in] flags Flags to modify the function behavior.
322335
* @param [out] req Request populated by the call.
323336
*
337+
* @return UCS_INPROGRESS - Operation successfully posted. If @a req
338+
* is not NULL, use @ref
339+
* ucp_device_progress_req to check for
340+
* completion.
341+
* @return UCS_OK - Operation completed successfully.
324342
* @return Error code as defined by @ref ucs_status_t
325343
*/
326344
template<ucs_device_level_t level = UCS_DEVICE_LEVEL_THREAD>
@@ -410,7 +428,7 @@ UCS_F_DEVICE void ucp_device_counter_write(void *counter_ptr, uint64_t value)
410428
*
411429
* @tparam level Level of cooperation of the transfer.
412430
* @param [in] req Request containing operations in progress and channel to progress.
413-
*
431+
*
414432
* @return UCS_OK - The request has completed, no more operations are
415433
* in progress.
416434
* @return UCS_INPROGRESS - One or more operations in the request batch

src/uct/api/device/uct_device_impl.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ union uct_device_completion {
4242
* @param [in] flags Flags to modify the function behavior.
4343
* @param [in] comp Completion object to track the progress of operation.
4444
*
45+
* @return UCS_INPROGRESS - Operation successfully posted, use @ref
46+
* uct_device_ep_progress and @ref
47+
* uct_device_ep_check_completion to
48+
* check for completion.
49+
* @return UCS_OK - Operation completed successfully.
4550
* @return Error code as defined by @ref ucs_status_t
4651
*/
4752
template<ucs_device_level_t level>
@@ -83,6 +88,11 @@ UCS_F_DEVICE ucs_status_t uct_device_ep_put_single(
8388
* @param [in] flags Flags to modify the function behavior.
8489
* @param [in] comp Completion object to track the progress of operation.
8590
*
91+
* @return UCS_INPROGRESS - Operation successfully posted, use @ref
92+
* uct_device_ep_progress and @ref
93+
* uct_device_ep_check_completion to check
94+
* for completion.
95+
* @return UCS_OK - Operation completed successfully.
8696
* @return Error code as defined by @ref ucs_status_t
8797
*/
8898
template<ucs_device_level_t level>
@@ -139,6 +149,11 @@ UCS_F_DEVICE ucs_status_t uct_device_ep_atomic_add(
139149
* @param [in] flags Flags to modify the function behavior.
140150
* @param [out] req Request populated by the call.
141151
*
152+
* @return UCS_INPROGRESS - Operation successfully posted, use @ref
153+
* uct_device_ep_progress and @ref
154+
* uct_device_ep_check_completion to check
155+
* for completion.
156+
* @return UCS_OK - Operation completed successfully.
142157
* @return Error code as defined by @ref ucs_status_t
143158
*/
144159
template<ucs_device_level_t level>
@@ -215,6 +230,11 @@ UCS_F_DEVICE ucs_status_t uct_device_ep_put_multi(
215230
* @param [in] flags Flags to modify the function behavior.
216231
* @param [in] comp Completion object to track progress.
217232
*
233+
* @return UCS_INPROGRESS - Operation successfully posted, use @ref
234+
* uct_device_ep_progress and @ref
235+
* uct_device_ep_check_completion to check
236+
* for completion.
237+
* @return UCS_OK - Operation completed successfully.
218238
* @return Error code as defined by @ref ucs_status_t
219239
*/
220240
template<ucs_device_level_t level>

0 commit comments

Comments
 (0)