From 94e363554dc6d3dec4edb9f65a3b6612d9801189 Mon Sep 17 00:00:00 2001 From: "maruiyan.mry" Date: Thu, 16 Dec 2021 01:42:12 -0800 Subject: [PATCH] add SliceDynamic & Stack odla_api --- ODLA/include/ODLA/ops/odla_ops_process.h | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ODLA/include/ODLA/ops/odla_ops_process.h b/ODLA/include/ODLA/ops/odla_ops_process.h index 1f5b9c618..3a3b11105 100644 --- a/ODLA/include/ODLA/ops/odla_ops_process.h +++ b/ODLA/include/ODLA/ops/odla_ops_process.h @@ -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. @@ -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.