From 3bb61dff58a1f773b0b68e03f3ebb147d1f7550c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=99=86?= Date: Mon, 15 Sep 2025 05:51:58 +0000 Subject: [PATCH 1/2] modify the annotation of UniqueCust REG_OP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘陆 --- .../4_op_dev/1_custom_op/op_proto/unique_cust.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 6d18e6739..5eee4e1d2 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,7 +19,20 @@ #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, \ DT_UINT16, DT_UINT8, DT_INT32, DT_INT64, DT_DOUBLE})) -- Gitee From 894c6653c4f89ccc795917beb31e9d09c9486340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E9=99=86?= Date: Mon, 15 Sep 2025 06:03:12 +0000 Subject: [PATCH 2/2] modify the annotation of UniqueCust REG_OP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘陆 --- .../4_op_dev/1_custom_op/op_proto/unique_cust.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 5eee4e1d2..bf02267b9 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 @@ -34,9 +34,9 @@ namespace ge { *@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) -- Gitee