From 28bd6eecdeee36b7e5afef70a5a8b45138a34f33 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:48:11 +0000
Subject: [PATCH 01/14] update README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/README_en.md.txt | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 operator_contrib/SpenceSample/README_en.md.txt
diff --git a/operator_contrib/SpenceSample/README_en.md.txt b/operator_contrib/SpenceSample/README_en.md.txt
new file mode 100644
index 000000000..23e1cc160
--- /dev/null
+++ b/operator_contrib/SpenceSample/README_en.md.txt
@@ -0,0 +1,72 @@
+## Spence Custom Operator Example Explanation
+This example implements the Spence operator using the Ascend C programming language and provides end-to-end implementations for different operator invocation methods.
+- [FrameworkLaunch](./FrameworkLaunch):Invokes the Spence custom operator using the framework. The operator development is completed following the process of project creation -> operator implementation -> compilation and deployment -> operator invocation. The entire process relies on the operator project: the operator kernel function and Tiling implementation are completed based on the project code framework, the operator is compiled and deployed through the project compilation script, and then the operator is invoked either as a single operator or within a third-party framework.
+
+This example includes the following invocation methods:
+
+
+## Operator Description
+Spence integral is defined as the integral of log(t) / (1 - t) from 1 to x. The domain of definition is all nonnegative real numbers.
+## Operator Specification Description
+
+Operator Type(OpType) | Spence |
+Operator Input | name | shape | data type | format |
+x | - | float32,float16 | ND |
+Operator Output | y | - | float32,float16 | ND |
+Kernel Function Name | spence |
+
+
+
+## Supported Product Models
+This example supports the following product models:
+- Atlas 200/500 A2 Inference Products
+- Atlas A2 Training Series Products/Atlas 800I A2 Inference Products
+
+## Directory Structure Introduction
+```
+└── FrameworkLaunch //Project for invoking the Spence custom operator using the framework.
+```
+## Environment Requirements
+Before compiling and running this example, please refer to[《CANN Software Installation Guide》](https://hiascend.com/document/redirect/CannCommunityInstSoftware)to deploy the development and runtime environment.
+
+## Compiling and Running the Example Operator
+
+### 1. Preparation: Obtain the Example Code
+
+ You can download the source code using one of the following two methods. Please choose one.
+
+ - Command line method (long download time, simple steps).
+
+ ```bash
+ # In the development environment, execute the following command as a non-root user to download the source repository. git_clone_path is a directory created by the user.
+ cd ${git_clone_path}
+ git clone https://gitee.com/ascend/samples.git
+ ```
+ **Note: If you need to switch to another tag version, for example, v0.5.0, you can execute the following command.**
+ ```bash
+ git checkout v0.5.0
+ ```
+ - Zip package method (short download time, slightly more complex steps).
+
+ **Note: If you need to download the code for another version, please first switch the samples repository branch according to the preconditions.**
+ ```bash
+ # 1. In the samples repository, select the 【Clone/Download】 dropdown and choose 【Download ZIP】.
+ # 2. Upload the ZIP package to a directory of a normal user in the development environment, for example, ${git_clone_path}/ascend-samples-master.zip.
+ # 3. In the development environment, execute the following command to unzip the zip package.
+ cd ${git_clone_path}
+ unzip ascend-samples-master.zip
+ ```
+### 2. Compile and Run the Example Project
+- If using the framework invocation method, please refer to [FrameworkLaunch](./FrameworkLaunch) for compilation and running operations.
+## Update Log
+ | Date | Update Items |
+|----|------|
+| 2024/05/27 | New version of readme updated |
+| 2024/07/22 | Modified to clone to any directory |
+| 2024/07/24 | Modified readme format |
--
Gitee
From 62a64111fe5084a74ace5729a456e4425826c518 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:48:58 +0000
Subject: [PATCH 02/14] rename operator_contrib/SpenceSample/README_en.md.txt
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/{README_en.md.txt => README.en.md.txt} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename operator_contrib/SpenceSample/{README_en.md.txt => README.en.md.txt} (100%)
diff --git a/operator_contrib/SpenceSample/README_en.md.txt b/operator_contrib/SpenceSample/README.en.md.txt
similarity index 100%
rename from operator_contrib/SpenceSample/README_en.md.txt
rename to operator_contrib/SpenceSample/README.en.md.txt
--
Gitee
From c9136fc96dc8d945f272fb7246d5a2b72def4543 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:49:07 +0000
Subject: [PATCH 03/14] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20op?=
=?UTF-8?q?erator=5Fcontrib/SpenceSample/README.en.md.txt?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SpenceSample/README.en.md.txt | 72 -------------------
1 file changed, 72 deletions(-)
delete mode 100644 operator_contrib/SpenceSample/README.en.md.txt
diff --git a/operator_contrib/SpenceSample/README.en.md.txt b/operator_contrib/SpenceSample/README.en.md.txt
deleted file mode 100644
index 23e1cc160..000000000
--- a/operator_contrib/SpenceSample/README.en.md.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-## Spence Custom Operator Example Explanation
-This example implements the Spence operator using the Ascend C programming language and provides end-to-end implementations for different operator invocation methods.
-- [FrameworkLaunch](./FrameworkLaunch):Invokes the Spence custom operator using the framework. The operator development is completed following the process of project creation -> operator implementation -> compilation and deployment -> operator invocation. The entire process relies on the operator project: the operator kernel function and Tiling implementation are completed based on the project code framework, the operator is compiled and deployed through the project compilation script, and then the operator is invoked either as a single operator or within a third-party framework.
-
-This example includes the following invocation methods:
-
-
-## Operator Description
-Spence integral is defined as the integral of log(t) / (1 - t) from 1 to x. The domain of definition is all nonnegative real numbers.
-## Operator Specification Description
-
-Operator Type(OpType) | Spence |
-Operator Input | name | shape | data type | format |
-x | - | float32,float16 | ND |
-Operator Output | y | - | float32,float16 | ND |
-Kernel Function Name | spence |
-
-
-
-## Supported Product Models
-This example supports the following product models:
-- Atlas 200/500 A2 Inference Products
-- Atlas A2 Training Series Products/Atlas 800I A2 Inference Products
-
-## Directory Structure Introduction
-```
-└── FrameworkLaunch //Project for invoking the Spence custom operator using the framework.
-```
-## Environment Requirements
-Before compiling and running this example, please refer to[《CANN Software Installation Guide》](https://hiascend.com/document/redirect/CannCommunityInstSoftware)to deploy the development and runtime environment.
-
-## Compiling and Running the Example Operator
-
-### 1. Preparation: Obtain the Example Code
-
- You can download the source code using one of the following two methods. Please choose one.
-
- - Command line method (long download time, simple steps).
-
- ```bash
- # In the development environment, execute the following command as a non-root user to download the source repository. git_clone_path is a directory created by the user.
- cd ${git_clone_path}
- git clone https://gitee.com/ascend/samples.git
- ```
- **Note: If you need to switch to another tag version, for example, v0.5.0, you can execute the following command.**
- ```bash
- git checkout v0.5.0
- ```
- - Zip package method (short download time, slightly more complex steps).
-
- **Note: If you need to download the code for another version, please first switch the samples repository branch according to the preconditions.**
- ```bash
- # 1. In the samples repository, select the 【Clone/Download】 dropdown and choose 【Download ZIP】.
- # 2. Upload the ZIP package to a directory of a normal user in the development environment, for example, ${git_clone_path}/ascend-samples-master.zip.
- # 3. In the development environment, execute the following command to unzip the zip package.
- cd ${git_clone_path}
- unzip ascend-samples-master.zip
- ```
-### 2. Compile and Run the Example Project
-- If using the framework invocation method, please refer to [FrameworkLaunch](./FrameworkLaunch) for compilation and running operations.
-## Update Log
- | Date | Update Items |
-|----|------|
-| 2024/05/27 | New version of readme updated |
-| 2024/07/22 | Modified to clone to any directory |
-| 2024/07/24 | Modified readme format |
--
Gitee
From cfe60d453a762e1f3bb99dd03a7f78ae4b3760b4 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:49:47 +0000
Subject: [PATCH 04/14] add operator_contrib/SpenceSample.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/README.en.md.txt | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 operator_contrib/SpenceSample/README.en.md.txt
diff --git a/operator_contrib/SpenceSample/README.en.md.txt b/operator_contrib/SpenceSample/README.en.md.txt
new file mode 100644
index 000000000..23e1cc160
--- /dev/null
+++ b/operator_contrib/SpenceSample/README.en.md.txt
@@ -0,0 +1,72 @@
+## Spence Custom Operator Example Explanation
+This example implements the Spence operator using the Ascend C programming language and provides end-to-end implementations for different operator invocation methods.
+- [FrameworkLaunch](./FrameworkLaunch):Invokes the Spence custom operator using the framework. The operator development is completed following the process of project creation -> operator implementation -> compilation and deployment -> operator invocation. The entire process relies on the operator project: the operator kernel function and Tiling implementation are completed based on the project code framework, the operator is compiled and deployed through the project compilation script, and then the operator is invoked either as a single operator or within a third-party framework.
+
+This example includes the following invocation methods:
+
+
+## Operator Description
+Spence integral is defined as the integral of log(t) / (1 - t) from 1 to x. The domain of definition is all nonnegative real numbers.
+## Operator Specification Description
+
+Operator Type(OpType) | Spence |
+Operator Input | name | shape | data type | format |
+x | - | float32,float16 | ND |
+Operator Output | y | - | float32,float16 | ND |
+Kernel Function Name | spence |
+
+
+
+## Supported Product Models
+This example supports the following product models:
+- Atlas 200/500 A2 Inference Products
+- Atlas A2 Training Series Products/Atlas 800I A2 Inference Products
+
+## Directory Structure Introduction
+```
+└── FrameworkLaunch //Project for invoking the Spence custom operator using the framework.
+```
+## Environment Requirements
+Before compiling and running this example, please refer to[《CANN Software Installation Guide》](https://hiascend.com/document/redirect/CannCommunityInstSoftware)to deploy the development and runtime environment.
+
+## Compiling and Running the Example Operator
+
+### 1. Preparation: Obtain the Example Code
+
+ You can download the source code using one of the following two methods. Please choose one.
+
+ - Command line method (long download time, simple steps).
+
+ ```bash
+ # In the development environment, execute the following command as a non-root user to download the source repository. git_clone_path is a directory created by the user.
+ cd ${git_clone_path}
+ git clone https://gitee.com/ascend/samples.git
+ ```
+ **Note: If you need to switch to another tag version, for example, v0.5.0, you can execute the following command.**
+ ```bash
+ git checkout v0.5.0
+ ```
+ - Zip package method (short download time, slightly more complex steps).
+
+ **Note: If you need to download the code for another version, please first switch the samples repository branch according to the preconditions.**
+ ```bash
+ # 1. In the samples repository, select the 【Clone/Download】 dropdown and choose 【Download ZIP】.
+ # 2. Upload the ZIP package to a directory of a normal user in the development environment, for example, ${git_clone_path}/ascend-samples-master.zip.
+ # 3. In the development environment, execute the following command to unzip the zip package.
+ cd ${git_clone_path}
+ unzip ascend-samples-master.zip
+ ```
+### 2. Compile and Run the Example Project
+- If using the framework invocation method, please refer to [FrameworkLaunch](./FrameworkLaunch) for compilation and running operations.
+## Update Log
+ | Date | Update Items |
+|----|------|
+| 2024/05/27 | New version of readme updated |
+| 2024/07/22 | Modified to clone to any directory |
+| 2024/07/24 | Modified readme format |
--
Gitee
From 5f8cae92791a69be6032ae01b4b4b16c71e7520a Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:50:06 +0000
Subject: [PATCH 05/14] rename operator_contrib/SpenceSample/README.en.md.txt
Signed-off-by: wxqnl <1548959221@qq.com>
---
operator_contrib/SpenceSample/{README.en.md.txt => README.en.md} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename operator_contrib/SpenceSample/{README.en.md.txt => README.en.md} (100%)
diff --git a/operator_contrib/SpenceSample/README.en.md.txt b/operator_contrib/SpenceSample/README.en.md
similarity index 100%
rename from operator_contrib/SpenceSample/README.en.md.txt
rename to operator_contrib/SpenceSample/README.en.md
--
Gitee
From 234398b8222b48d6edc9c473bfe2fab42680f913 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:52:06 +0000
Subject: [PATCH 06/14] add
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/FrameworkLaunch/README.en.md | 102 ++++++++++++++++++
1 file changed, 102 insertions(+)
create mode 100644 operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
new file mode 100644
index 000000000..5c30aafba
--- /dev/null
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
@@ -0,0 +1,102 @@
+## Overview
+This example, based on the Spence operator project, introduces the invocation method for single operator calls.
+##Directory Structure Introduction
+```
+├── FrameworkLaunch //Invokes the Spence operator using the framework
+│ ├── AclNNInvocation // Invokes the Spence operator using the aclnn method
+│ ├── Spence // Spence operator project
+│ └── Spence.json // Prototype definition json file for the Spence operator
+```
+## Operator Project Introduction
+The operator project directory Spence contains template files for operator implementation, compilation scripts, etc., as shown below:
+```
+├── Spence //Spence custom operator project
+│ ├── cmake
+│ ├── framework // Directory for operator plugin implementation files, not dependent on operator adaptation plugins for generating single operator model files, no need to pay attention to
+│ ├── op_host // Host-side implementation files
+│ ├── op_kernel // Kernel-side implementation files
+│ ├── scripts // Directory for custom operator project packaging-related scripts
+│ ├── build.sh // Compilation entry script
+│ ├── CMakeLists.txt // CMakeLists.txt for the operator project
+│ └── CMakePresets.json // Compilation configuration items
+```
+The CANN software package provides the project creation tool msopgen,and the Spenceoperator project can be automatically created through Spence.json,For details, please refer to the [ Ascend C Operator Development ](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
+## Compiling and Running the Example Operator
+For custom operator projects, the compilation and running process includes the following steps:
+- Compile the custom operator project to generate the operator installation package;
+- Install the custom operator into the operator library;
+- Invoke and execute the custom operator;
+
+Detailed operations are as follows.
+### 1. Obtain the Source Code Package
+Before compiling and running this example, please refer to [ Preparation: Obtain the Example Code ](../README.md#codeready) to obtain the source code package.
+### 2. Compile the Operator Project
+ Compile the custom operator project to build and generate the custom operator package.
+
+ - Execute the following command to switch to the Spence operator project directory.。
+
+ ```bash
+ cd ${git_clone_path}/samples/operator_contrib/SpenceSample/FrameworkLaunch/Spence
+ ```
+
+ - Modify the ASCEND_CANN_PACKAGE_PATH in CMakePresets.json to the actual path after the CANN software package is installed.
+
+
+ ```json
+ {
+ ……
+ "configurePresets": [
+ {
+ ……
+ "ASCEND_CANN_PACKAGE_PATH": {
+ "type": "PATH",
+ "value": "/usr/local/Ascend/ascend-toolkit/latest" // Please replace with the actual path after the CANN software package is installed. eg: /home/HwHiAiUser/Ascend/ascend-toolkit/latest
+ },
+ ……
+ }
+ ]
+ }
+ ```
+ - Execute the following command in the Spence operator project directory to compile the operator project.
+
+ ```bash
+ ./build.sh
+ ```
+ After successful compilation, a build_out directory will be created in the current directory, and the custom operator installation package custom_opp_\_\.run will be generated in the build_out directory,for example, "custom_opp_ubuntu_x86_64.run".
+ Note: If you want to use the dump debugging function, you need to remove the configurations for Atlas training series products and Atlas 200/500 A2 inference products from op_host and CMakeLists.txt.
+
+### 3. Deploy the Operator Package
+
+Execute the following command to install the custom operator package in the path where the custom operator installation package is located.
+ ```bash
+ cd build_out
+ ./custom_opp__.run
+ ```
+
+After the command is successfully executed, the relevant files in the custom operator package will be deployed to the vendors/customize directory of the OPP operator library in the current environment.
+
+### 4. Configure Environment Variables
+
+ Please select the corresponding command to configure environment variables according to the [ installation method ](https://hiascend.com/document/redirect/CannCommunityInstSoftware)of the CANN development toolkit package on the current environment.
+
+ - Default path, root user installs CANN software package
+ ```bash
+ export ASCEND_INSTALL_PATH=/usr/local/Ascend/ascend-toolkit/latest
+ ```
+ - Default path, non-root user installs CANN software package
+ ```bash
+ export ASCEND_INSTALL_PATH=$HOME/Ascend/ascend-toolkit/latest
+ ```
+ - Specified path install_path, installs CANN software package
+ ```bash
+ export ASCEND_INSTALL_PATH=${install_path}/ascend-toolkit/latest
+ ```
+### 5. Invoke and Execute the Operator Project
+- [Invoke the GreaterEqual Operator Project using aclnn](./AclNNInvocation/README.md)
+
+## Update Log
+ | Date | Update Items |
+|----|------|
+| 2024/05/27 | New version of readme updated |
+| 2024/07/22 | Modified environment configuration for different user environments |
+| 2024/07/24 | Modified readme format |
\ No newline at end of file
--
Gitee
From ce7375ec32fef7de5fe6e13b99d3f80b9a24aaa4 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 13:53:48 +0000
Subject: [PATCH 07/14] add
operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../AclNNInvocation/README.en.md | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
new file mode 100644
index 000000000..e38147722
--- /dev/null
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
@@ -0,0 +1,53 @@
+## Directory Structure Introduction
+```
+├── AclNNInvocation //Invokes the Spence operator using the aclnn method
+│ ├── inc // Header file directory
+│ │ ├── common.h // Declares common method classes for reading binary files
+│ │ ├── op_runner.h // Operator description declaration file, including operator inputs/outputs, operator type, and input/output descriptions
+│ │ └── operator_desc.h // Operator runtime information declaration file, including the number of operator inputs/outputs, input/output sizes, etc.
+│ ├── input // Directory for storing script-generated input data
+│ ├── output // Directory for storing operator runtime output data and ground truth data
+│ ├── scripts
+│ │ ├── acl.json // acl configuration file
+│ │ ├── gen_data.py // Script for generating input data and ground truth data
+│ │ └── verify_result.py // Ground truth comparison file
+│ ├── src
+│ │ ├── CMakeLists.txt // Compilation rules file
+│ │ ├── common.cpp // Common functions, implementation file for reading binary files
+│ │ ├── main.cpp // Entry point for the single operator invocation application
+│ │ ├── op_runner.cpp // Main flow implementation file for single operator invocation
+│ │ └── operator_desc.cpp // Constructs input and output descriptions for the operator
+│ └── run.sh // Execution command script
+```
+## Code Implementation Introduction
+After developing and deploying the custom operator, you can verify the functionality of the single operator by invoking it. The code in src/main.cpp is the execution method for the single operator API. Single operator API execution is based on the C language API to execute the operator, without the need to provide a single operator description file for offline model conversion, directly calling the single operator API interface.
+
+After the custom operator is compiled and deployed, the single operator API is automatically generated and can be directly called in the application. The operator API is generally defined as a "two-stage interface", such as:
+ ```cpp
+ aclnnStatus aclnnSpenceGetWorkspaceSize(const aclTensor *x, const aclTensor *out, uint64_t *workspaceSize, aclOpExecutor **executor);
+ aclnnStatus aclnnSpence(void *workspace, int64_t workspaceSize, aclOpExecutor **executor, aclrtStream stream);
+ ```
+The aclnnSpenceGetWorkspaceSize interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call. After obtaining the required workspace size for this API calculation, allocate device-side memory based on the workspaceSize, and then call the second stage interface aclnnGreaterEqual to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
+
+##Running the Example Operator
+### 1. Compiling the Operator Project
+Before running this example, please refer to [Compiling the Operator Project](../README.md#operatorcompile) to complete the preliminary preparation.
+### 2. Running the aclnn Example
+
+ - Enter the example directory
+
+ ```bash
+ cd ${git_clone_path}/samples/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation
+ ```
+ - Example execution
+
+ During the example execution, test data will be automatically generated, then the aclnn example will be compiled and run, and finally, the results will be verified. The specific process can be found in the run.sh script.
+
+ ```bash
+ bash run.sh
+ ```
+## Update Log
+ | Date | Update Items |
+|----|------|
+| 2024/5/31 | Added this readme |
+| 2024/07/24 | Modified readme format |
\ No newline at end of file
--
Gitee
From 8df255c3e2814536731e21db8d5721ec481e4930 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 15:17:00 +0000
Subject: [PATCH 08/14] update
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
index 5c30aafba..3b608016c 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
@@ -20,7 +20,8 @@ The operator project directory Spence contains template files for operator imple
│ ├── CMakeLists.txt // CMakeLists.txt for the operator project
│ └── CMakePresets.json // Compilation configuration items
```
-The CANN software package provides the project creation tool msopgen,and the Spenceoperator project can be automatically created through Spence.json,For details, please refer to the [ Ascend C Operator Development ](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
+The CANN software package provides the project creation tool `msopgen`, and the `GreaterEqual` operator project can be automatically created through
+`Spence.json`,For details, please refer to the [ Ascend C Operator Development ](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
## Compiling and Running the Example Operator
For custom operator projects, the compilation and running process includes the following steps:
- Compile the custom operator project to generate the operator installation package;
--
Gitee
From 85aa12e2241b8b40f98ae26c8ffe6bcc4e874461 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 15:59:56 +0000
Subject: [PATCH 09/14] update
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
index 3b608016c..f3d9db637 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
@@ -20,7 +20,7 @@ The operator project directory Spence contains template files for operator imple
│ ├── CMakeLists.txt // CMakeLists.txt for the operator project
│ └── CMakePresets.json // Compilation configuration items
```
-The CANN software package provides the project creation tool `msopgen`, and the `GreaterEqual` operator project can be automatically created through
+The CANN software package provides the project creation tool `msopgen`, and the `Spence` operator project can be automatically created through
`Spence.json`,For details, please refer to the [ Ascend C Operator Development ](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
## Compiling and Running the Example Operator
For custom operator projects, the compilation and running process includes the following steps:
--
Gitee
From 579a1ccd15c7e5306ba16edadb238e845240559c Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Mon, 14 Oct 2024 16:04:43 +0000
Subject: [PATCH 10/14] update
operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
index e38147722..cd2de1e34 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
@@ -27,7 +27,7 @@ After the custom operator is compiled and deployed, the single operator API is a
aclnnStatus aclnnSpenceGetWorkspaceSize(const aclTensor *x, const aclTensor *out, uint64_t *workspaceSize, aclOpExecutor **executor);
aclnnStatus aclnnSpence(void *workspace, int64_t workspaceSize, aclOpExecutor **executor, aclrtStream stream);
```
-The aclnnSpenceGetWorkspaceSize interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call. After obtaining the required workspace size for this API calculation, allocate device-side memory based on the workspaceSize, and then call the second stage interface aclnnGreaterEqual to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
+The `aclnnSpenceGetWorkspaceSize` interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call. After obtaining the required workspace size for this API calculation, allocate device-side memory based on the `workspaceSize`, and then call the second stage interface `aclnnSpence` to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
##Running the Example Operator
### 1. Compiling the Operator Project
--
Gitee
From de01561b92582482303c57e0bdd9ee3db73eac21 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Tue, 15 Oct 2024 04:18:22 +0000
Subject: [PATCH 11/14] update
operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../FrameworkLaunch/AclNNInvocation/README.en.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
index cd2de1e34..b76aca579 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
@@ -27,9 +27,10 @@ After the custom operator is compiled and deployed, the single operator API is a
aclnnStatus aclnnSpenceGetWorkspaceSize(const aclTensor *x, const aclTensor *out, uint64_t *workspaceSize, aclOpExecutor **executor);
aclnnStatus aclnnSpence(void *workspace, int64_t workspaceSize, aclOpExecutor **executor, aclrtStream stream);
```
-The `aclnnSpenceGetWorkspaceSize` interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call. After obtaining the required workspace size for this API calculation, allocate device-side memory based on the `workspaceSize`, and then call the second stage interface `aclnnSpence` to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
+The `aclnnSpenceGetWorkspaceSize` interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call.
+After obtaining the required workspace size for this API calculation, allocate device-side memory based on the `workspaceSize`, and then call the second stage interface `aclnnSpence` to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
-##Running the Example Operator
+## Running the Example Operator
### 1. Compiling the Operator Project
Before running this example, please refer to [Compiling the Operator Project](../README.md#operatorcompile) to complete the preliminary preparation.
### 2. Running the aclnn Example
--
Gitee
From 3b6402b362c7d3f67f4c11b3ad8164f3b27c4ac7 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Tue, 15 Oct 2024 04:25:20 +0000
Subject: [PATCH 12/14] update
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
index f3d9db637..578cc1e09 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
@@ -20,8 +20,7 @@ The operator project directory Spence contains template files for operator imple
│ ├── CMakeLists.txt // CMakeLists.txt for the operator project
│ └── CMakePresets.json // Compilation configuration items
```
-The CANN software package provides the project creation tool `msopgen`, and the `Spence` operator project can be automatically created through
-`Spence.json`,For details, please refer to the [ Ascend C Operator Development ](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
+The CANN software package provides the project creation tool `msopgen`, and the `Spence` operator project can be automatically created through `Spence.json`. For details, please refer to the [Ascend C Operator Development](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
## Compiling and Running the Example Operator
For custom operator projects, the compilation and running process includes the following steps:
- Compile the custom operator project to generate the operator installation package;
--
Gitee
From 44148f7ffbb650dcae598256d1dd9bc9a30bd6e8 Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Tue, 15 Oct 2024 05:09:47 +0000
Subject: [PATCH 13/14] update
operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
.../SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
index b76aca579..fd226f700 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/AclNNInvocation/README.en.md
@@ -27,8 +27,7 @@ After the custom operator is compiled and deployed, the single operator API is a
aclnnStatus aclnnSpenceGetWorkspaceSize(const aclTensor *x, const aclTensor *out, uint64_t *workspaceSize, aclOpExecutor **executor);
aclnnStatus aclnnSpence(void *workspace, int64_t workspaceSize, aclOpExecutor **executor, aclrtStream stream);
```
-The `aclnnSpenceGetWorkspaceSize` interface is the first stage, primarily used to calculate the amount of workspace memory required for this API call.
-After obtaining the required workspace size for this API calculation, allocate device-side memory based on the `workspaceSize`, and then call the second stage interface `aclnnSpence` to perform the calculation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
+aclnnSpenceGetWorkspaceSize is the first-phase API, which is used to compute the workspace size required for calling the Spence operator API. After obtaining the workspace size, allocate memory on the device based on workspaceSize, and call the second-phase API aclnnSpence to perform computation. For specific reference, see the [AscendCL Single Operator Invocation](https://hiascend.com/document/redirect/CannCommunityAscendCInVorkSingleOp) > Single Operator API Execution section.
## Running the Example Operator
### 1. Compiling the Operator Project
--
Gitee
From 6eedee0d5390eaec7760e9a08378c1894c4923ad Mon Sep 17 00:00:00 2001
From: wxqnl <1548959221@qq.com>
Date: Tue, 15 Oct 2024 05:11:45 +0000
Subject: [PATCH 14/14] update
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md.
Signed-off-by: wxqnl <1548959221@qq.com>
---
operator_contrib/SpenceSample/FrameworkLaunch/README.en.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
index 578cc1e09..5c1ee633c 100644
--- a/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
+++ b/operator_contrib/SpenceSample/FrameworkLaunch/README.en.md
@@ -20,7 +20,8 @@ The operator project directory Spence contains template files for operator imple
│ ├── CMakeLists.txt // CMakeLists.txt for the operator project
│ └── CMakePresets.json // Compilation configuration items
```
-The CANN software package provides the project creation tool `msopgen`, and the `Spence` operator project can be automatically created through `Spence.json`. For details, please refer to the [Ascend C Operator Development](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
+The CANN software package provides the project creation tool msopgen, and the Spence operator project can be automatically created through Spence.json. For details, please refer to the [Ascend C Operator Development](https://hiascend.com/document/redirect/CannCommunityOpdevAscendC) > Operator Development > Operator Development Project > Operator Development Based on Custom Operator Project > Creating Operator Project section.
+
## Compiling and Running the Example Operator
For custom operator projects, the compilation and running process includes the following steps:
- Compile the custom operator project to generate the operator installation package;
--
Gitee