Skip to content

Commit 79d3e9e

Browse files
committed
add SliceDynamic & Stack odla_api
1 parent 05f052c commit 79d3e9e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

ODLA/include/ODLA/ops/odla_ops_process.h

+32
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,22 @@ odla_Slice(odla_value input, const odla_uint32* start, const odla_uint32* end,
286286
const odla_uint32* stride, odla_value_shape output_dims,
287287
const odla_value_id value_id);
288288

289+
//! \brief Extract a dynamic slice
290+
/*!
291+
SliceDynamic extracts a dynamic slice from \p input.
292+
293+
\param input the input value
294+
\param start the offets at each slicing dimension
295+
\param size the number of elements at each slicing dimension
296+
\param output_dims the optional output shape (can be undefined)
297+
\param value_id a unique value id (can be NULL)
298+
299+
\return odla_value
300+
*/
301+
extern ODLA_API_EXPORT odla_value ODLA_API_CALL odla_SliceDynamic(
302+
odla_value input, const odla_uint32* start, const odla_uint32* size,
303+
odla_value_shape output_dims, const odla_value_id value_id);
304+
289305
//! \brief Remove dimensions of size 1
290306
/*!
291307
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
303319
odla_Squeeze(odla_value input, odla_size_t num_of_axes, const odla_uint32* axes,
304320
odla_value_shape output_dims, const odla_value_id value_id);
305321

322+
//! \brief Join a sequence of Values along a new axis.
323+
/*!
324+
Stack joins multiple values into single one along a new axis. All inputs
325+
must have the same dimension.
326+
327+
\param inputs the input values
328+
\param axis the index of the new axis in the dimensions of the result
329+
\param output_shape the result shape
330+
\param value_id a unique value id (can be NULL)
331+
332+
\return odla_value
333+
*/
334+
extern ODLA_API_EXPORT odla_value ODLA_API_CALL
335+
odla_Stack(odla_values inputs, odla_int32 axis, odla_value_shape output_shape,
336+
const odla_value_id value_id);
337+
306338
//! \brief Transpose the input
307339
/*!
308340
Transpose returns a transposed value based on the \p permutation.

0 commit comments

Comments
 (0)