Skip to content

Commit

Permalink
Update backend_common.h
Browse files Browse the repository at this point in the history
  • Loading branch information
yinggeh authored Jul 26, 2024
1 parent 64be246 commit ea004a8
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions include/triton/backend/backend_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -672,14 +672,18 @@ TRITONSERVER_Error* BufferAsTypedString(
/// \return a formatted string for logging the request ID.
std::string GetRequestId(TRITONBACKEND_Request* request);

/// Validate the contiguous string buffer with correct format and parse string elements into list of pairs of memory address and length. Note the returned list of pairs points to valid memory as long as memory pointed by buffer remains allocated.
/// <int32_len><bytes>...<int32_len><bytes>.
/// @param buffer The pointer to the contiguous string buffer.
/// @param buffer_byte_size The size of the buffer in bytes.
/// @param expected_element_cnt The number of expected string elements.
/// @param input_name The name of the input buffer.
/// @param str_list Returns pairs of address and length of parsed strings.
/// @return a TRITONSERVER_Error indicating success or failure.
/// Validate the contiguous string buffer with correct format
/// <int32_len><bytes>...<int32_len><bytes> and parse string
/// elements into list of pairs of memory address and length.
/// Note the returned list of pairs points to valid memory as long
/// as memory pointed by buffer remains allocated.
///
/// \param buffer The pointer to the contiguous string buffer.
/// \param buffer_byte_size The size of the buffer in bytes.
/// \param expected_element_cnt The number of expected string elements.
/// \param input_name The name of the input buffer.
/// \param str_list Returns pairs of address and length of parsed strings.
/// \return a TRITONSERVER_Error indicating success or failure.
TRITONSERVER_Error* ValidateStringBuffer(
const char* buffer, size_t buffer_byte_size,
const size_t expected_element_cnt, const char* input_name,
Expand Down

0 comments on commit ea004a8

Please sign in to comment.