diff --git a/cplusplus/level1_single_api/4_op_dev/1_custom_op/op_proto/unique_cust.h b/cplusplus/level1_single_api/4_op_dev/1_custom_op/op_proto/unique_cust.h index 6d18e673941b218f646694470b441c9cdf8e0afa..bf02267b9bfe0d95495d49e20339eb7d49348765 100644 --- a/cplusplus/level1_single_api/4_op_dev/1_custom_op/op_proto/unique_cust.h +++ b/cplusplus/level1_single_api/4_op_dev/1_custom_op/op_proto/unique_cust.h @@ -19,11 +19,24 @@ #include "graph/operator_reg.h" namespace ge { +/** +*@brief Finds unique elements in a 1D tensor. \n +*@par Inputs: +*x: 1D tensor. Support all types mentioned in TensorType. +*Input "x" is a k-dimensional tensor. \n + +*@par Attributes: +*out_idx: An optional DType from: "int32, int64". Defaults to "int32". \n + +*@par Outputs: +*@li y: "x" in the unique output "y". +*@li idx: A tensor the same size as "x". The index of each value of "x". \n +*/ REG_OP(UniqueCust) - .INPUT(x, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, DT_INT16, \ + .INPUT(x, TensorType({DT_FLOAT, DT_INT8, DT_INT16, \ DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_DOUBLE})) - .OUTPUT(y, TensorType({DT_FLOAT, DT_FLOAT16, DT_INT8, DT_INT16, \ + .OUTPUT(y, TensorType({DT_FLOAT, DT_INT8, DT_INT16, \ DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_DOUBLE})) .OUTPUT(idx, TensorType({DT_INT32, DT_INT64})) .ATTR(out_idx, Type, DT_INT32)