Skip to content

Commit

Permalink
add SliceDynamic & Stack odla_api
Browse files Browse the repository at this point in the history
  • Loading branch information
littlefatfat committed Dec 16, 2021
1 parent 05f052c commit 94e3635
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ODLA/include/ODLA/ops/odla_ops_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,22 @@ odla_Slice(odla_value input, const odla_uint32* start, const odla_uint32* end,
const odla_uint32* stride, odla_value_shape output_dims,
const odla_value_id value_id);

//! \brief Extract a dynamic slice
/*!
SliceDynamic extracts a dynamic slice from \p input.
\param input the input value
\param start the offets at each slicing dimension
\param size the number of elements at each slicing dimension
\param output_dims the optional output shape (can be undefined)
\param value_id a unique value id (can be NULL)
\return odla_value
*/
extern ODLA_API_EXPORT odla_value ODLA_API_CALL
odla_SliceDynamic(odla_value input, odla_value start, odla_value size,
odla_value_shape output_dims, const odla_value_id value_id);

//! \brief Remove dimensions of size 1
/*!
Squeeze removes dimensions of size 1 from the shape of \p input.
Expand All @@ -303,6 +319,22 @@ extern ODLA_API_EXPORT odla_value ODLA_API_CALL
odla_Squeeze(odla_value input, odla_size_t num_of_axes, const odla_uint32* axes,
odla_value_shape output_dims, const odla_value_id value_id);

//! \brief Join a sequence of Values along a new axis.
/*!
Stack joins multiple values into single one along a new axis. All inputs
must have the same dimension.
\param inputs the input values
\param axis the index of the new axis in the dimensions of the result
\param output_shape the result shape
\param value_id a unique value id (can be NULL)
\return odla_value
*/
extern ODLA_API_EXPORT odla_value ODLA_API_CALL
odla_Stack(odla_values inputs, odla_int32 axis, odla_value_shape output_shape,
const odla_value_id value_id);

//! \brief Transpose the input
/*!
Transpose returns a transposed value based on the \p permutation.
Expand Down

0 comments on commit 94e3635

Please sign in to comment.