Skip to content

Commit

Permalink
API: Add hints for coll args (openucx#752)
Browse files Browse the repository at this point in the history
* API: Add hints for coll args

* API: Modify hints and flag enum
  • Loading branch information
manjugv authored and janjust committed Jan 31, 2024
1 parent 6168e8a commit 784a327
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/ucc/api/ucc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,45 @@ typedef enum {
collectives. */
} ucc_coll_args_flags_t;

/**
* @ingroup UCC_COLLECTIVES_DT
*/
typedef enum {
UCC_COLL_ARGS_HINT_OPTMIZE_OVERLAP_CPU = UCC_BIT(24), /*!< When the flag is
set, the user
prefers the library
to choose an
algorithm
implementation
optimized for the
best overlap of CPU
resources. */
UCC_COLL_ARGS_HINT_OPTMIZE_OVERLAP_GPU = UCC_BIT(25), /*!< When the flag is
set, the user
prefers the library
to choose an
algorithm
implementation
optimized for the
best overlap of GPU
resources. */
UCC_COLL_ARGS_HINT_OPTIMIZE_LATENCY = UCC_BIT(26), /*!< When the flag is
set, the user prefers
the library to choose
an algorithm
implementation
optimized for the
latency. */

UCC_COLL_ARGS_HINT_CONTIG_SRC_BUFFER = UCC_COLL_ARGS_FLAG_CONTIG_SRC_BUFFER,
/*!< When the flag is set, the source
* buffer is contiguous. */
UCC_COLL_ARGS_HINT_CONTIG_DST_BUFFER = UCC_COLL_ARGS_FLAG_CONTIG_DST_BUFFER
/*!< When the flag is set, the
* destination buffer is
* contiguous. */
} ucc_coll_args_hints_t;

/**
* @ingroup UCC_COLLECTIVES_DT
*/
Expand Down Expand Up @@ -1820,7 +1859,8 @@ typedef struct ucc_coll_args {
operation is selected.
The field is only specified for collectives
that use pre-defined datatypes */
uint64_t flags;
uint64_t flags; /*!< Provide flags and hints for the
collective operations */
uint64_t root; /*!< Root endpoint for rooted
collectives */
ucc_error_type_t error_type; /*!< Error type */
Expand Down

0 comments on commit 784a327

Please sign in to comment.