已合并
docs下基本概念文件名从中文改为英文 #1151
chenjiao创建于 29 天前
docs下基本概念文件名从中文改为英文 #1151
已合并
共 65 个文件变更+404-410
| @@ -24,11 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | - CANNLab云开发环境: | 25 | - CANNLab云开发环境: |
| 26 | 26 | ||
| 27 | - 默认提供最新版本CANN包配套的项目源码,进入源码目录,\$\{gitCode\_id\}替换为开发者个人gitCode账号。 | 27 | + 默认提供最新版本CANN包配套的项目源码,资源一般在`/mnt/workspace/gitCode`目录下,请进入目标分支源码目录。 |
| 28 | - | ||
| 29 | - ```bash | ||
| 30 | - cd /mnt/workspace/gitCode/${gitCode_id}/ops-cv | ||
| 31 | - ``` | ||
| 32 | 28 | ||
| 33 | - 非CANNLab云开发环境: | 29 | - 非CANNLab云开发环境: |
| 34 | 30 | ||
| @@ -66,5 +66,5 @@ Docs目录结构说明如下: | |||
| 66 | 66 | ||
| 67 | | 文档 | 说明 | | 67 | | 文档 | 说明 | |
| 68 | | ----------------------------------- | ------------------------------------------------------------ | | 68 | | ----------------------------------- | ------------------------------------------------------------ | |
| 69 | -| [算子基本概念](zh/context/基本概念.md) | 介绍算子领域相关的基础概念和术语,如量化/稀疏、数据类型、数据格式等。 | | 69 | +| [算子基本概念](zh/context/basic_concept.md) | 介绍算子领域相关的基础概念和术语,如量化/稀疏、数据类型、数据格式等。 | |
| 70 | | [build参数说明](zh/install/build.md) | 介绍本项目build.sh参数功能和取值,包括源码编译、算子调用、调试等。 | | 70 | | [build参数说明](zh/install/build.md) | 介绍本项目build.sh参数功能和取值,包括源码编译、算子调用、调试等。 | |
| @@ -0,0 +1,12 @@ | |||
| 1 | +# 基本概念 | ||
| 2 | + | ||
| 3 | +- [两段式接口](./two_phase_api.md) | ||
| 4 | +- [数据结构](./data_structure.md) | ||
| 5 | +- [数据类型](./data_type.md) | ||
| 6 | +- [数据格式](./data_format.md) | ||
| 7 | +- [非连续的Tensor](./non_contiguous_tensor.md) | ||
| 8 | +- [broadcast关系](./broadcast_relationship.md) | ||
| 9 | +- [互推导关系](./deduction_relationship.md) | ||
| 10 | +- [互转换关系](./conversion_relationship.md) | ||
| 11 | +- [量化介绍](./quant_mode_introduction.md) | ||
| 12 | +- [sparse模式介绍](./sparse_mode_introduction.md) | ||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | 当一个API(如aclnnAdd、aclnnMul等)**输入的aclTensor数据类型**不一致时,API内部会推导出一个数据类型,将输入数据转换成该数据类型进行计算。 | 7 | 当一个API(如aclnnAdd、aclnnMul等)**输入的aclTensor数据类型**不一致时,API内部会推导出一个数据类型,将输入数据转换成该数据类型进行计算。 |
| 8 | 8 | ||
| 9 | -aclTensor支持的数据类型参见[数据类型](数据类型.md),其中部分类型满足如下推导规则,推导原理类似PyTorch的[Type Promotion](https://pytorch.org/docs/stable/tensor_attributes.html#type-promotion-doc)。 | 9 | +aclTensor支持的数据类型参见[数据类型](data_type.md),其中部分类型满足如下推导规则,推导原理类似PyTorch的[Type Promotion](https://pytorch.org/docs/stable/tensor_attributes.html#type-promotion-doc)。 |
| 10 | 10 | ||
| 11 | 类型推导的规则如下: | 11 | 类型推导的规则如下: |
| 12 | 12 | ||
| @@ -48,7 +48,7 @@ aclTensor支持的数据类型参见[数据类型](数据类型.md),其中部 | |||
| 48 | 48 | ||
| 49 | 当一个API(如aclnnAdds、aclnnMuls等)**输入的Tensor数据类型**和**输入的Scalar数据类型**不一致时,API内部会推导出一个数据类型,将输入数据转换成该数据类型进行计算。 | 49 | 当一个API(如aclnnAdds、aclnnMuls等)**输入的Tensor数据类型**和**输入的Scalar数据类型**不一致时,API内部会推导出一个数据类型,将输入数据转换成该数据类型进行计算。 |
| 50 | 50 | ||
| 51 | -aclTensor支持的数据类型参见[数据类型](数据类型.md),其中部分类型满足如下推导规则,推导原理类似PyTorch的[Type Promotion](https://pytorch.org/docs/stable/tensor_attributes.html#type-promotion-doc)。 | 51 | +aclTensor支持的数据类型参见[数据类型](data_type.md),其中部分类型满足如下推导规则,推导原理类似PyTorch的[Type Promotion](https://pytorch.org/docs/stable/tensor_attributes.html#type-promotion-doc)。 |
| 52 | 52 | ||
| 53 | 类型推导的规则如下: | 53 | 类型推导的规则如下: |
| 54 | 54 | ||
| @@ -7,16 +7,16 @@ | |||
| 7 | ## 示例1 | 7 | ## 示例1 |
| 8 | 8 | ||
| 9 | 例如现有一个shape=\(6, 5\)、strides=\(10, 1\)、offset=22的Tensor,其内存排布如下: | 9 | 例如现有一个shape=\(6, 5\)、strides=\(10, 1\)、offset=22的Tensor,其内存排布如下: |
| 10 | -> a<sub>0,0</sub> , a<sub>0,1</sub> , a<sub>0,2</sub> , a<sub>0,3</sub> , a<sub>0,4</sub> , a<sub>0,5</sub> , a<sub>0,6</sub> , a<sub>0,7</sub> , a<sub>0,8</sub> , a<sub>0,9</sub> | 10 | +> a<sub>0,0</sub> , a<sub>0,1</sub> , a<sub>0,2</sub> , a<sub>0,3</sub> , a<sub>0,4</sub> , a<sub>0,5</sub> , a<sub>0,6</sub> , a<sub>0,7</sub> , a<sub>0,8</sub> , a<sub>0,9</sub> |
| 11 | -> a<sub>1,0</sub> , a<sub>1,1</sub> , a<sub>1,2</sub> , a<sub>1,3</sub> , a<sub>1,4</sub> , a<sub>1,5</sub> , a<sub>1,6</sub> , a<sub>1,7</sub> , a<sub>1,8</sub> , a<sub>1,9</sub> | 11 | +> a<sub>1,0</sub> , a<sub>1,1</sub> , a<sub>1,2</sub> , a<sub>1,3</sub> , a<sub>1,4</sub> , a<sub>1,5</sub> , a<sub>1,6</sub> , a<sub>1,7</sub> , a<sub>1,8</sub> , a<sub>1,9</sub> |
| 12 | -> a<sub>2,0</sub> , a<sub>2,1</sub> , **a<sub>2,2</sub> , a<sub>2,3</sub> , a<sub>2,4</sub> , a<sub>2,5</sub> , a<sub>2,6</sub>** , a<sub>2,7</sub> , a<sub>2,8</sub> , a<sub>2,9</sub> | 12 | +> a<sub>2,0</sub> , a<sub>2,1</sub> , **a<sub>2,2</sub> , a<sub>2,3</sub> , a<sub>2,4</sub> , a<sub>2,5</sub> , a<sub>2,6</sub>** , a<sub>2,7</sub> , a<sub>2,8</sub> , a<sub>2,9</sub> |
| 13 | -> a<sub>3,0</sub> , a<sub>3,1</sub> , **a<sub>3,2</sub> , a<sub>3,3</sub> , a<sub>3,4</sub> , a<sub>3,5</sub> , a<sub>3,6</sub>** , a<sub>3,7</sub> , a<sub>3,8</sub> , a<sub>3,9</sub> | 13 | +> a<sub>3,0</sub> , a<sub>3,1</sub> , **a<sub>3,2</sub> , a<sub>3,3</sub> , a<sub>3,4</sub> , a<sub>3,5</sub> , a<sub>3,6</sub>** , a<sub>3,7</sub> , a<sub>3,8</sub> , a<sub>3,9</sub> |
| 14 | -> a<sub>4,0</sub> , a<sub>4,1</sub> , **a<sub>4,2</sub> , a<sub>4,3</sub> , a<sub>4,4</sub> , a<sub>4,5</sub> , a<sub>4,6</sub>** , a<sub>4,7</sub> , a<sub>4,8</sub> , a<sub>4,9</sub> | 14 | +> a<sub>4,0</sub> , a<sub>4,1</sub> , **a<sub>4,2</sub> , a<sub>4,3</sub> , a<sub>4,4</sub> , a<sub>4,5</sub> , a<sub>4,6</sub>** , a<sub>4,7</sub> , a<sub>4,8</sub> , a<sub>4,9</sub> |
| 15 | -> a<sub>5,0</sub> , a<sub>5,1</sub> , **a<sub>5,2</sub> , a<sub>5,3</sub> , a<sub>5,4</sub> , a<sub>5,5</sub> , a<sub>5,6</sub>** , a<sub>5,7</sub> , a<sub>5,8</sub> , a<sub>5,9</sub> | 15 | +> a<sub>5,0</sub> , a<sub>5,1</sub> , **a<sub>5,2</sub> , a<sub>5,3</sub> , a<sub>5,4</sub> , a<sub>5,5</sub> , a<sub>5,6</sub>** , a<sub>5,7</sub> , a<sub>5,8</sub> , a<sub>5,9</sub> |
| 16 | -> a<sub>6,0</sub> , a<sub>6,1</sub> , **a<sub>6,2</sub> , a<sub>6,3</sub> , a<sub>6,4</sub> , a<sub>6,5</sub> , a<sub>6,6</sub>** , a<sub>6,7</sub> , a<sub>6,8</sub> , a<sub>6,9</sub> | 16 | +> a<sub>6,0</sub> , a<sub>6,1</sub> , **a<sub>6,2</sub> , a<sub>6,3</sub> , a<sub>6,4</sub> , a<sub>6,5</sub> , a<sub>6,6</sub>** , a<sub>6,7</sub> , a<sub>6,8</sub> , a<sub>6,9</sub> |
| 17 | -> a<sub>7,0</sub> , a<sub>7,1</sub> , **a<sub>7,2</sub> , a<sub>7,3</sub> , a<sub>7,4</sub> , a<sub>7,5</sub> , a<sub>7,6</sub>** , a<sub>7,7</sub> , a<sub>7,8</sub> , a<sub>7,9</sub> | 17 | +> a<sub>7,0</sub> , a<sub>7,1</sub> , **a<sub>7,2</sub> , a<sub>7,3</sub> , a<sub>7,4</sub> , a<sub>7,5</sub> , a<sub>7,6</sub>** , a<sub>7,7</sub> , a<sub>7,8</sub> , a<sub>7,9</sub> |
| 18 | -> a<sub>8,0</sub> , a<sub>8,1</sub> , a<sub>8,2</sub> , a<sub>8,3</sub> , a<sub>8,4</sub> , a<sub>8,5</sub> , a<sub>8,6</sub> , a<sub>8,7</sub> , a<sub>8,8</sub> , a<sub>8,9</sub> | 18 | +> a<sub>8,0</sub> , a<sub>8,1</sub> , a<sub>8,2</sub> , a<sub>8,3</sub> , a<sub>8,4</sub> , a<sub>8,5</sub> , a<sub>8,6</sub> , a<sub>8,7</sub> , a<sub>8,8</sub> , a<sub>8,9</sub> |
| 19 | -> a<sub>9,0</sub> , a<sub>9,1</sub> , a<sub>9,2</sub> , a<sub>9,3</sub> , a<sub>9,4</sub> , a<sub>9,5</sub> , a<sub>9,6</sub> , a<sub>9,7</sub> , a<sub>9,8</sub> , a<sub>9,9</sub> | 19 | +> a<sub>9,0</sub> , a<sub>9,1</sub> , a<sub>9,2</sub> , a<sub>9,3</sub> , a<sub>9,4</sub> , a<sub>9,5</sub> , a<sub>9,6</sub> , a<sub>9,7</sub> , a<sub>9,8</sub> , a<sub>9,9</sub> |
| 20 | 20 | ||
| 21 | 即该Tensor排布如上图的深色位置。这个完整的Tensor在内存排布上是不连续的,strides描述Tensor维度上相邻两个元素的间隔,如果在维度1上的stride为1,该维度是连续的;如果在维度0上的stride为10,那么相邻的元素间隔10个元素,即非连续。offset表示这个Tensor的首元素相对addr的偏移。 | 21 | 即该Tensor排布如上图的深色位置。这个完整的Tensor在内存排布上是不连续的,strides描述Tensor维度上相邻两个元素的间隔,如果在维度1上的stride为1,该维度是连续的;如果在维度0上的stride为10,那么相邻的元素间隔10个元素,即非连续。offset表示这个Tensor的首元素相对addr的偏移。 |
| 22 | 22 | ||
| @@ -24,15 +24,15 @@ | |||
| 24 | 24 | ||
| 25 | 例如现有一个shape=\(4, 3\)、strides=\(20, 2\)、offset=22的Tensor,其内存排布如下: | 25 | 例如现有一个shape=\(4, 3\)、strides=\(20, 2\)、offset=22的Tensor,其内存排布如下: |
| 26 | 26 | ||
| 27 | -> a<sub>0,0</sub> , a<sub>0,1</sub> , a<sub>0,2</sub> , a<sub>0,3</sub> , a<sub>0,4</sub> , a<sub>0,5</sub> , a<sub>0,6</sub> , a<sub>0,7</sub> , a<sub>0,8</sub> , a<sub>0,9</sub> | 27 | +> a<sub>0,0</sub> , a<sub>0,1</sub> , a<sub>0,2</sub> , a<sub>0,3</sub> , a<sub>0,4</sub> , a<sub>0,5</sub> , a<sub>0,6</sub> , a<sub>0,7</sub> , a<sub>0,8</sub> , a<sub>0,9</sub> |
| 28 | -> a<sub>1,0</sub> , a<sub>1,1</sub> , a<sub>1,2</sub> , a<sub>1,3</sub> , a<sub>1,4</sub> , a<sub>1,5</sub> , a<sub>1,6</sub> , a<sub>1,7</sub> , a<sub>1,8</sub> , a<sub>1,9</sub> | 28 | +> a<sub>1,0</sub> , a<sub>1,1</sub> , a<sub>1,2</sub> , a<sub>1,3</sub> , a<sub>1,4</sub> , a<sub>1,5</sub> , a<sub>1,6</sub> , a<sub>1,7</sub> , a<sub>1,8</sub> , a<sub>1,9</sub> |
| 29 | -> a<sub>2,0</sub> , a<sub>2,1</sub> , **a<sub>2,2</sub>** , a<sub>2,3</sub> , **a<sub>2,4</sub>** , a<sub>2,5</sub> , **a<sub>2,6</sub>** , a<sub>2,7</sub> , a<sub>2,8</sub> , a<sub>2,9</sub> | 29 | +> a<sub>2,0</sub> , a<sub>2,1</sub> , **a<sub>2,2</sub>** , a<sub>2,3</sub> , **a<sub>2,4</sub>** , a<sub>2,5</sub> , **a<sub>2,6</sub>** , a<sub>2,7</sub> , a<sub>2,8</sub> , a<sub>2,9</sub> |
| 30 | -> a<sub>3,0</sub> , a<sub>3,1</sub> , a<sub>3,2</sub> , a<sub>3,3</sub> , a<sub>3,4</sub> , a<sub>3,5</sub> , a<sub>3,6</sub> , a<sub>3,7</sub> , a<sub>3,8</sub> , a<sub>3,9</sub> | 30 | +> a<sub>3,0</sub> , a<sub>3,1</sub> , a<sub>3,2</sub> , a<sub>3,3</sub> , a<sub>3,4</sub> , a<sub>3,5</sub> , a<sub>3,6</sub> , a<sub>3,7</sub> , a<sub>3,8</sub> , a<sub>3,9</sub> |
| 31 | -> a<sub>4,0</sub> , a<sub>4,1</sub> , **a<sub>4,2</sub>** , a<sub>4,3</sub> , **a<sub>4,4</sub>** , a<sub>4,5</sub> , **a<sub>4,6</sub>** , a<sub>4,7</sub> , a<sub>4,8</sub> , a<sub>4,9</sub> | 31 | +> a<sub>4,0</sub> , a<sub>4,1</sub> , **a<sub>4,2</sub>** , a<sub>4,3</sub> , **a<sub>4,4</sub>** , a<sub>4,5</sub> , **a<sub>4,6</sub>** , a<sub>4,7</sub> , a<sub>4,8</sub> , a<sub>4,9</sub> |
| 32 | -> a<sub>5,0</sub> , a<sub>5,1</sub> , a<sub>5,2</sub> , a<sub>5,3</sub> , a<sub>5,4</sub> , a<sub>5,5</sub> , a<sub>5,6</sub> , a<sub>5,7</sub> , a<sub>5,8</sub> , a<sub>5,9</sub> | 32 | +> a<sub>5,0</sub> , a<sub>5,1</sub> , a<sub>5,2</sub> , a<sub>5,3</sub> , a<sub>5,4</sub> , a<sub>5,5</sub> , a<sub>5,6</sub> , a<sub>5,7</sub> , a<sub>5,8</sub> , a<sub>5,9</sub> |
| 33 | -> a<sub>6,0</sub> , a<sub>6,1</sub> , **a<sub>6,2</sub>** , a<sub>6,3</sub> , **a<sub>6,4</sub>** , a<sub>6,5</sub> , **a<sub>6,6</sub>** , a<sub>6,7</sub> , a<sub>6,8</sub> , a<sub>6,9</sub> | 33 | +> a<sub>6,0</sub> , a<sub>6,1</sub> , **a<sub>6,2</sub>** , a<sub>6,3</sub> , **a<sub>6,4</sub>** , a<sub>6,5</sub> , **a<sub>6,6</sub>** , a<sub>6,7</sub> , a<sub>6,8</sub> , a<sub>6,9</sub> |
| 34 | -> a<sub>7,0</sub> , a<sub>7,1</sub> , a<sub>7,2</sub> , a<sub>7,3</sub> , a<sub>7,4</sub> , a<sub>7,5</sub> , a<sub>7,6</sub> , a<sub>7,7</sub> , a<sub>7,8</sub> , a<sub>7,9</sub> | 34 | +> a<sub>7,0</sub> , a<sub>7,1</sub> , a<sub>7,2</sub> , a<sub>7,3</sub> , a<sub>7,4</sub> , a<sub>7,5</sub> , a<sub>7,6</sub> , a<sub>7,7</sub> , a<sub>7,8</sub> , a<sub>7,9</sub> |
| 35 | -> a<sub>8,0</sub> , a<sub>8,1</sub> , **a<sub>8,2</sub>** , a<sub>8,3</sub> , **a<sub>8,4</sub>** , a<sub>8,5</sub> , **a<sub>8,6</sub>** , a<sub>8,7</sub> , a<sub>8,8</sub> , a<sub>8,9</sub> | 35 | +> a<sub>8,0</sub> , a<sub>8,1</sub> , **a<sub>8,2</sub>** , a<sub>8,3</sub> , **a<sub>8,4</sub>** , a<sub>8,5</sub> , **a<sub>8,6</sub>** , a<sub>8,7</sub> , a<sub>8,8</sub> , a<sub>8,9</sub> |
| 36 | -> a<sub>9,0</sub> , a<sub>9,1</sub> , a<sub>9,2</sub> , a<sub>9,3</sub> , a<sub>9,4</sub> , a<sub>9,5</sub> , a<sub>9,6</sub> , a<sub>9,7</sub> , a<sub>9,8</sub> , a<sub>9,9</sub> | 36 | +> a<sub>9,0</sub> , a<sub>9,1</sub> , a<sub>9,2</sub> , a<sub>9,3</sub> , a<sub>9,4</sub> , a<sub>9,5</sub> , a<sub>9,6</sub> , a<sub>9,7</sub> , a<sub>9,8</sub> , a<sub>9,9</sub> |
| 37 | 37 | ||
| 38 | 即该Tensor排布如上图的深色位置。这个完整的Tensor在内存排布上是不连续的,strides描述Tensor维度上相邻两个元素的间隔,如果在维度1上的stride为2,该维度上间隔1个元素;如果在维度0上的stride为20,那么相邻的元素间隔20个元素,即非连续。offset表示这个Tensor的首元素相对addr的偏移。 | 38 | 即该Tensor排布如上图的深色位置。这个完整的Tensor在内存排布上是不连续的,strides描述Tensor维度上相邻两个元素的间隔,如果在维度1上的stride为2,该维度上间隔1个元素;如果在维度0上的stride为20,那么相邻的元素间隔20个元素,即非连续。offset表示这个Tensor的首元素相对addr的偏移。 |
Ddocs/zh/context/基本概念.md+0-12
| @@ -1,12 +0,0 @@ | |||
| 1 | -# 基本概念 | ||
| 2 | - | ||
| 3 | -- [两段式接口](./两段式接口.md) | ||
| 4 | -- [数据结构](./数据结构.md) | ||
| 5 | -- [数据类型](./数据类型.md) | ||
| 6 | -- [数据格式](./数据格式.md) | ||
| 7 | -- [非连续的Tensor](./非连续的Tensor.md) | ||
| 8 | -- [broadcast关系](./broadcast关系.md) | ||
| 9 | -- [互推导关系](./互推导关系.md) | ||
| 10 | -- [互转换关系](./互转换关系.md) | ||
| 11 | -- [量化介绍](./量化介绍.md) | ||
| 12 | -- [sparse模式介绍](./sparse_mode参数说明.md) | ||
| @@ -27,9 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | <img src="../figures/cloudIDE.png" alt="云平台" width="750px" height="85px"> | 28 | <img src="../figures/cloudIDE.png" alt="云平台" width="750px" height="85px"> |
| 29 | 29 | ||
| 30 | -2. 根据页面提示创建NPU环境并配置规格,启动云开发环境后,单击“`连接 > WebIDE`”进入一站式开发平台。 | 30 | +2. 根据页面提示创建NPU环境并配置规格,启动云开发环境后,单击“`连接 > WebIDE`”进入一站式开发平台。当前开源项目资源默认在`/mnt/workspace/gitCode`目录下。 |
| 31 | - | ||
| 32 | - 当前开源项目资源默认在`/mnt/workspace/gitCode/${gitCode_id}`目录下,\$\{gitCode\_id\}表示开发者个人gitCode账号。 | ||
| 33 | 31 | ||
| 34 | <img src="../figures/webIDE.png" alt="云平台" width="1000px" height="150px"> | 32 | <img src="../figures/webIDE.png" alt="云平台" width="1000px" height="150px"> |
| 35 | 33 | ||
| @@ -17,28 +17,28 @@ | |||
| 17 | 17 | ||
| 18 | ## 函数原型 | 18 | ## 函数原型 |
| 19 | 19 | ||
| 20 | -每个算子分为[两段式接口](../../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiAlignV2BackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2Backward”接口执行计算。 | 20 | +每个算子分为[两段式接口](../../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiAlignV2BackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2Backward”接口执行计算。 |
| 21 | 21 | ||
| 22 | ```Cpp | 22 | ```Cpp |
| 23 | aclnnStatus aclnnRoiAlignV2BackwardGetWorkspaceSize( | 23 | aclnnStatus aclnnRoiAlignV2BackwardGetWorkspaceSize( |
| 24 | - const aclTensor* gradOutput, | 24 | + const aclTensor* gradOutput, |
| 25 | - const aclTensor* boxes, | 25 | + const aclTensor* boxes, |
| 26 | - const aclIntArray* inputShape, | 26 | + const aclIntArray* inputShape, |
| 27 | - int64_t pooledHeight, | 27 | + int64_t pooledHeight, |
| 28 | - int64_t pooledWidth, | 28 | + int64_t pooledWidth, |
| 29 | - float spatialScale, | 29 | + float spatialScale, |
| 30 | - int64_t samplingRatio, | 30 | + int64_t samplingRatio, |
| 31 | - bool aligned, | 31 | + bool aligned, |
| 32 | - aclTensor* gradInput, | 32 | + aclTensor* gradInput, |
| 33 | - uint64_t* workspaceSize, | 33 | + uint64_t* workspaceSize, |
| 34 | aclOpExecutor** executor) | 34 | aclOpExecutor** executor) |
| 35 | ``` | 35 | ``` |
| 36 | 36 | ||
| 37 | ```Cpp | 37 | ```Cpp |
| 38 | aclnnStatus aclnnRoiAlignV2Backward( | 38 | aclnnStatus aclnnRoiAlignV2Backward( |
| 39 | - void* workspace, | 39 | + void* workspace, |
| 40 | - uint64_t workspaceSize, | 40 | + uint64_t workspaceSize, |
| 41 | - aclOpExecutor* executor, | 41 | + aclOpExecutor* executor, |
| 42 | aclrtStream stream) | 42 | aclrtStream stream) |
| 43 | ``` | 43 | ``` |
| 44 | 44 | ||
| @@ -182,7 +182,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 182 | 182 | ||
| 183 | - **返回码:** | 183 | - **返回码:** |
| 184 | 184 | ||
| 185 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../../docs/zh/context/aclnn返回码.md)。 | 185 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../../docs/zh/context/aclnn_return_code.md)。 |
| 186 | 186 | ||
| 187 | 第一段接口完成入参校验,出现以下场景时报错: | 187 | 第一段接口完成入参校验,出现以下场景时报错: |
| 188 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 188 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| @@ -257,7 +257,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 257 | 257 | ||
| 258 | - **返回码:** | 258 | - **返回码:** |
| 259 | 259 | ||
| 260 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../../docs/zh/context/aclnn返回码.md)。 | 260 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../../docs/zh/context/aclnn_return_code.md)。 |
| 261 | 261 | ||
| 262 | ## 约束说明 | 262 | ## 约束说明 |
| 263 | 263 | ||
| @@ -266,7 +266,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 266 | 266 | ||
| 267 | ## 调用示例 | 267 | ## 调用示例 |
| 268 | 268 | ||
| 269 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../../docs/zh/context/编译与运行样例.md)。 | 269 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../../docs/zh/context/compile_and_run_sample.md)。 |
| 270 | 270 | ||
| 271 | ```Cpp | 271 | ```Cpp |
| 272 | #include <iostream> | 272 | #include <iostream> |
| @@ -401,7 +401,7 @@ int main() { | |||
| 401 | uint64_t workspaceSize = 0; | 401 | uint64_t workspaceSize = 0; |
| 402 | aclOpExecutor* executor; | 402 | aclOpExecutor* executor; |
| 403 | // 调用aclnnRoiAlignV2Backward第一段接口 | 403 | // 调用aclnnRoiAlignV2Backward第一段接口 |
| 404 | - ret = aclnnRoiAlignV2BackwardGetWorkspaceSize(gradOutput, boxes, inputShapeArray, pooledHeight, pooledWidth, spatialScale, | 404 | + ret = aclnnRoiAlignV2BackwardGetWorkspaceSize(gradOutput, boxes, inputShapeArray, pooledHeight, pooledWidth, spatialScale, |
| 405 | samplingRatio, aligned, gradInput, &workspaceSize, &executor); | 405 | samplingRatio, aligned, gradInput, &workspaceSize, &executor); |
| 406 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2BackwardGetWorkspaceSize failed. ERROR: %d\n", ret); return ret); | 406 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2BackwardGetWorkspaceSize failed. ERROR: %d\n", ret); return ret); |
| 407 | // 根据第一段接口计算出的workspaceSize申请device内存 | 407 | // 根据第一段接口计算出的workspaceSize申请device内存 |
| @@ -17,7 +17,7 @@ | |||
| 17 | 17 | ||
| 18 | - 算子功能:从批处理输入张量中提取滑动局部块,将滑动局部块数组合并为一个大张量。 | 18 | - 算子功能:从批处理输入张量中提取滑动局部块,将滑动局部块数组合并为一个大张量。 |
| 19 | - 计算公式: | 19 | - 计算公式: |
| 20 | - | 20 | + |
| 21 | 考虑一个形状为 $(N,C,*)$的批处理input张量,其中$N$是批处理维度,$C$是通道维度,而$*$表示任意空间维度。 | 21 | 考虑一个形状为 $(N,C,*)$的批处理input张量,其中$N$是批处理维度,$C$是通道维度,而$*$表示任意空间维度。 |
| 22 | 22 | ||
| 23 | 此操作将input空间维度内的每个滑动kernel_size大小的块展平为形状是$(N,C×\prod(kernel\_size),L)$ 的3-D output张量的列(即最后一维)。 | 23 | 此操作将input空间维度内的每个滑动kernel_size大小的块展平为形状是$(N,C×\prod(kernel\_size),L)$ 的3-D output张量的列(即最后一维)。 |
| @@ -34,33 +34,33 @@ | |||
| 34 | 34 | ||
| 35 | ## 函数原型 | 35 | ## 函数原型 |
| 36 | 36 | ||
| 37 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnIm2colBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnIm2colBackward”接口执行计算。 | 37 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnIm2colBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnIm2colBackward”接口执行计算。 |
| 38 | 38 | ||
| 39 | ```Cpp | 39 | ```Cpp |
| 40 | aclnnStatus aclnnIm2colBackwardGetWorkspaceSize( | 40 | aclnnStatus aclnnIm2colBackwardGetWorkspaceSize( |
| 41 | - const aclTensor *gradOutput, | 41 | + const aclTensor *gradOutput, |
| 42 | - const aclIntArray *inputSize, | 42 | + const aclIntArray *inputSize, |
| 43 | - const aclIntArray *kernelSize, | 43 | + const aclIntArray *kernelSize, |
| 44 | - const aclIntArray *dilation, | 44 | + const aclIntArray *dilation, |
| 45 | - const aclIntArray *padding, | 45 | + const aclIntArray *padding, |
| 46 | - const aclIntArray *stride, | 46 | + const aclIntArray *stride, |
| 47 | - aclTensor *out, | 47 | + aclTensor *out, |
| 48 | - uint64_t *workspaceSize, | 48 | + uint64_t *workspaceSize, |
| 49 | aclOpExecutor **executor) | 49 | aclOpExecutor **executor) |
| 50 | ``` | 50 | ``` |
| 51 | 51 | ||
| 52 | ```Cpp | 52 | ```Cpp |
| 53 | aclnnStatus aclnnIm2colBackward( | 53 | aclnnStatus aclnnIm2colBackward( |
| 54 | - void *workspace, | 54 | + void *workspace, |
| 55 | - uint64_t workspaceSize, | 55 | + uint64_t workspaceSize, |
| 56 | - aclOpExecutor *executor, | 56 | + aclOpExecutor *executor, |
| 57 | aclrtStream stream) | 57 | aclrtStream stream) |
| 58 | ``` | 58 | ``` |
| 59 | 59 | ||
| 60 | ## aclnnIm2colBackwardGetWorkspaceSize | 60 | ## aclnnIm2colBackwardGetWorkspaceSize |
| 61 | 61 | ||
| 62 | - **参数说明** | 62 | - **参数说明** |
| 63 | - | 63 | + |
| 64 | <table style="undefined;table-layout: fixed; width: 1546px"><colgroup> | 64 | <table style="undefined;table-layout: fixed; width: 1546px"><colgroup> |
| 65 | <col style="width: 165px"> | 65 | <col style="width: 165px"> |
| 66 | <col style="width: 121px"> | 66 | <col style="width: 121px"> |
| @@ -176,9 +176,9 @@ aclnnStatus aclnnIm2colBackward( | |||
| 176 | </tbody></table> | 176 | </tbody></table> |
| 177 | 177 | ||
| 178 | - **返回值** | 178 | - **返回值** |
| 179 | - | 179 | + |
| 180 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 180 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 181 | - | 181 | + |
| 182 | 第一段接口完成入参校验,出现以下场景时报错: | 182 | 第一段接口完成入参校验,出现以下场景时报错: |
| 183 | 183 | ||
| 184 | <table style="undefined;table-layout: fixed; width: 1124px"><colgroup> | 184 | <table style="undefined;table-layout: fixed; width: 1124px"><colgroup> |
| @@ -230,7 +230,7 @@ aclnnStatus aclnnIm2colBackward( | |||
| 230 | ## aclnnIm2colBackward | 230 | ## aclnnIm2colBackward |
| 231 | 231 | ||
| 232 | - **参数说明** | 232 | - **参数说明** |
| 233 | - | 233 | + |
| 234 | <table style="undefined;table-layout: fixed; width: 1149px"><colgroup> | 234 | <table style="undefined;table-layout: fixed; width: 1149px"><colgroup> |
| 235 | <col style="width: 180px"> | 235 | <col style="width: 180px"> |
| 236 | <col style="width: 130px"> | 236 | <col style="width: 130px"> |
| @@ -267,8 +267,8 @@ aclnnStatus aclnnIm2colBackward( | |||
| 267 | </table> | 267 | </table> |
| 268 | 268 | ||
| 269 | - **返回值** | 269 | - **返回值** |
| 270 | - | 270 | + |
| 271 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 271 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 272 | 272 | ||
| 273 | ## 约束说明 | 273 | ## 约束说明 |
| 274 | 274 | ||
| @@ -277,7 +277,7 @@ aclnnStatus aclnnIm2colBackward( | |||
| 277 | 277 | ||
| 278 | ## 调用示例 | 278 | ## 调用示例 |
| 279 | 279 | ||
| 280 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 280 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 281 | 281 | ||
| 282 | ```Cpp | 282 | ```Cpp |
| 283 | #include <iostream> | 283 | #include <iostream> |
| @@ -127,7 +127,7 @@ | |||
| 127 | 127 | ||
| 128 | ## 函数原型 | 128 | ## 函数原型 |
| 129 | 129 | ||
| 130 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnGridSampler2DGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler2D”接口执行计算。 | 130 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnGridSampler2DGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler2D”接口执行计算。 |
| 131 | 131 | ||
| 132 | ```Cpp | 132 | ```Cpp |
| 133 | aclnnStatus aclnnGridSampler2DGetWorkspaceSize( | 133 | aclnnStatus aclnnGridSampler2DGetWorkspaceSize( |
| @@ -282,7 +282,7 @@ aclnnStatus aclnnGridSampler2D( | |||
| 282 | 282 | ||
| 283 | - **返回值** | 283 | - **返回值** |
| 284 | 284 | ||
| 285 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 285 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 286 | 286 | ||
| 287 | 第一段接口完成入参校验,出现以下场景时报错: | 287 | 第一段接口完成入参校验,出现以下场景时报错: |
| 288 | 288 | ||
| @@ -363,7 +363,7 @@ aclnnStatus aclnnGridSampler2D( | |||
| 363 | 363 | ||
| 364 | - **返回值** | 364 | - **返回值** |
| 365 | 365 | ||
| 366 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 366 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 367 | 367 | ||
| 368 | ## 约束说明 | 368 | ## 约束说明 |
| 369 | 369 | ||
| @@ -380,7 +380,7 @@ aclnnStatus aclnnGridSampler2D( | |||
| 380 | 380 | ||
| 381 | ## 调用示例 | 381 | ## 调用示例 |
| 382 | 382 | ||
| 383 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 383 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 384 | 384 | ||
| 385 | ```Cpp | 385 | ```Cpp |
| 386 | #include <iostream> | 386 | #include <iostream> |
| @@ -122,7 +122,7 @@ | |||
| 122 | 122 | ||
| 123 | ## 函数原型 | 123 | ## 函数原型 |
| 124 | 124 | ||
| 125 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnGridSampler3DGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler3D”接口执行计算。 | 125 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnGridSampler3DGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler3D”接口执行计算。 |
| 126 | 126 | ||
| 127 | ```Cpp | 127 | ```Cpp |
| 128 | aclnnStatus aclnnGridSampler3DGetWorkspaceSize( | 128 | aclnnStatus aclnnGridSampler3DGetWorkspaceSize( |
| @@ -259,7 +259,7 @@ aclnnStatus aclnnGridSampler3D( | |||
| 259 | 259 | ||
| 260 | - **返回值** | 260 | - **返回值** |
| 261 | 261 | ||
| 262 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 262 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 263 | 263 | ||
| 264 | 第一段接口完成入参校验,出现以下场景时报错: | 264 | 第一段接口完成入参校验,出现以下场景时报错: |
| 265 | 265 | ||
| @@ -337,7 +337,7 @@ aclnnStatus aclnnGridSampler3D( | |||
| 337 | 337 | ||
| 338 | - **返回值** | 338 | - **返回值** |
| 339 | 339 | ||
| 340 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 340 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 341 | 341 | ||
| 342 | ## 约束说明 | 342 | ## 约束说明 |
| 343 | 343 | ||
| @@ -347,7 +347,7 @@ aclnnStatus aclnnGridSampler3D( | |||
| 347 | 347 | ||
| 348 | ## 调用示例 | 348 | ## 调用示例 |
| 349 | 349 | ||
| 350 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 350 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 351 | 351 | ||
| 352 | ```Cpp | 352 | ```Cpp |
| 353 | #include <iostream> | 353 | #include <iostream> |
| @@ -244,7 +244,7 @@ | |||
| 244 | 244 | ||
| 245 | ## 函数原型 | 245 | ## 函数原型 |
| 246 | 246 | ||
| 247 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnGridSampler2DBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler2DBackward”接口执行计算。 | 247 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnGridSampler2DBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler2DBackward”接口执行计算。 |
| 248 | 248 | ||
| 249 | ```Cpp | 249 | ```Cpp |
| 250 | aclnnStatus aclnnGridSampler2DBackwardGetWorkspaceSize( | 250 | aclnnStatus aclnnGridSampler2DBackwardGetWorkspaceSize( |
| @@ -414,7 +414,7 @@ aclnnStatus aclnnGridSampler2DBackward( | |||
| 414 | 414 | ||
| 415 | - **返回值** | 415 | - **返回值** |
| 416 | 416 | ||
| 417 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 417 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 418 | 418 | ||
| 419 | 第一段接口完成入参校验,出现以下场景时报错: | 419 | 第一段接口完成入参校验,出现以下场景时报错: |
| 420 | 420 | ||
| @@ -510,7 +510,7 @@ aclnnStatus aclnnGridSampler2DBackward( | |||
| 510 | 510 | ||
| 511 | - **返回值** | 511 | - **返回值** |
| 512 | 512 | ||
| 513 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 513 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 514 | 514 | ||
| 515 | ## 约束说明 | 515 | ## 约束说明 |
| 516 | 516 | ||
| @@ -521,7 +521,7 @@ aclnnStatus aclnnGridSampler2DBackward( | |||
| 521 | 521 | ||
| 522 | ## 调用示例 | 522 | ## 调用示例 |
| 523 | 523 | ||
| 524 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 524 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 525 | 525 | ||
| 526 | ```Cpp | 526 | ```Cpp |
| 527 | #include <iostream> | 527 | #include <iostream> |
| @@ -173,7 +173,7 @@ | |||
| 173 | 173 | ||
| 174 | ## 函数原型 | 174 | ## 函数原型 |
| 175 | 175 | ||
| 176 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnGridSampler3DBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler3DBackward”接口执行计算。 | 176 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnGridSampler3DBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnGridSampler3DBackward”接口执行计算。 |
| 177 | 177 | ||
| 178 | ```Cpp | 178 | ```Cpp |
| 179 | aclnnStatus aclnnGridSampler3DBackwardGetWorkspaceSize( | 179 | aclnnStatus aclnnGridSampler3DBackwardGetWorkspaceSize( |
| @@ -343,7 +343,7 @@ aclnnStatus aclnnGridSampler3DBackward( | |||
| 343 | 343 | ||
| 344 | - **返回值** | 344 | - **返回值** |
| 345 | 345 | ||
| 346 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 346 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 347 | 347 | ||
| 348 | 第一段接口完成入参校验,出现以下场景时报错: | 348 | 第一段接口完成入参校验,出现以下场景时报错: |
| 349 | 349 | ||
| @@ -419,7 +419,7 @@ aclnnStatus aclnnGridSampler3DBackward( | |||
| 419 | 419 | ||
| 420 | - **返回值** | 420 | - **返回值** |
| 421 | 421 | ||
| 422 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 422 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 423 | 423 | ||
| 424 | ## 约束说明 | 424 | ## 约束说明 |
| 425 | 425 | ||
| @@ -428,7 +428,7 @@ aclnnStatus aclnnGridSampler3DBackward( | |||
| 428 | 428 | ||
| 429 | ## 调用示例 | 429 | ## 调用示例 |
| 430 | 430 | ||
| 431 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 431 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 432 | 432 | ||
| 433 | ```Cpp | 433 | ```Cpp |
| 434 | #include <iostream> | 434 | #include <iostream> |
| @@ -111,7 +111,7 @@ | |||
| 111 | 111 | ||
| 112 | ## 函数原型 | 112 | ## 函数原型 |
| 113 | 113 | ||
| 114 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRasterizerGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRasterizer”接口执行计算。 | 114 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRasterizerGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRasterizer”接口执行计算。 |
| 115 | 115 | ||
| 116 | ```Cpp | 116 | ```Cpp |
| 117 | aclnnStatus aclnnRasterizerGetWorkspaceSize( | 117 | aclnnStatus aclnnRasterizerGetWorkspaceSize( |
| @@ -276,7 +276,7 @@ aclnnStatus aclnnRasterizer( | |||
| 276 | </table> | 276 | </table> |
| 277 | - **返回值** | 277 | - **返回值** |
| 278 | 278 | ||
| 279 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](https://gitcode.com/cann/ops-cv/blob/master/docs/zh/context/aclnn%E8%BF%94%E5%9B%9E%E7%A0%81.md)。 | 279 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 280 | 280 | ||
| 281 | 第一段接口完成入参校验,出现以下场景时报错: | 281 | 第一段接口完成入参校验,出现以下场景时报错: |
| 282 | 282 | ||
| @@ -353,7 +353,7 @@ aclnnStatus aclnnRasterizer( | |||
| 353 | </table> | 353 | </table> |
| 354 | - **返回值** | 354 | - **返回值** |
| 355 | 355 | ||
| 356 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 356 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 357 | 357 | ||
| 358 | ## 约束说明 | 358 | ## 约束说明 |
| 359 | 359 | ||
| @@ -364,7 +364,7 @@ aclnnStatus aclnnRasterizer( | |||
| 364 | 364 | ||
| 365 | ## 调用示例 | 365 | ## 调用示例 |
| 366 | 366 | ||
| 367 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 367 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 368 | 368 | ||
| 369 | ```Cpp | 369 | ```Cpp |
| 370 | #include <iostream> | 370 | #include <iostream> |
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | ## 函数原型 | 31 | ## 函数原型 |
| 32 | 32 | ||
| 33 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnResizeGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnResize”接口执行计算。 | 33 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnResizeGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnResize”接口执行计算。 |
| 34 | 34 | ||
| 35 | ```Cpp | 35 | ```Cpp |
| 36 | aclnnStatus aclnnResizeGetWorkspaceSize( | 36 | aclnnStatus aclnnResizeGetWorkspaceSize( |
| @@ -145,7 +145,7 @@ aclnnStatus aclnnResize( | |||
| 145 | 145 | ||
| 146 | - **返回值** | 146 | - **返回值** |
| 147 | 147 | ||
| 148 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 148 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 149 | 149 | ||
| 150 | 第一段接口完成入参校验,出现以下场景时报错: | 150 | 第一段接口完成入参校验,出现以下场景时报错: |
| 151 | 151 | ||
| @@ -223,7 +223,7 @@ aclnnStatus aclnnResize( | |||
| 223 | 223 | ||
| 224 | - **返回值** | 224 | - **返回值** |
| 225 | 225 | ||
| 226 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 226 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 227 | 227 | ||
| 228 | ## 约束说明 | 228 | ## 约束说明 |
| 229 | 229 | ||
| @@ -232,7 +232,7 @@ aclnnStatus aclnnResize( | |||
| 232 | 232 | ||
| 233 | ## 调用示例 | 233 | ## 调用示例 |
| 234 | 234 | ||
| 235 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 235 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 236 | 236 | ||
| 237 | ```Cpp | 237 | ```Cpp |
| 238 | #include <unistd.h> | 238 | #include <unistd.h> |
| @@ -73,14 +73,14 @@ | |||
| 73 | $$ | 73 | $$ |
| 74 | 74 | ||
| 75 | - 假设:正向插值的输出图像out $(x, y)$受原图像input $(x_i, y_j)$影响,则有: | 75 | - 假设:正向插值的输出图像out $(x, y)$受原图像input $(x_i, y_j)$影响,则有: |
| 76 | - | 76 | + |
| 77 | $$ | 77 | $$ |
| 78 | gradInput(x_i,y_j) += gradOutput(x,y) * lambda(x_i,y_j) * lambdb(x_i,y_j) | 78 | gradInput(x_i,y_j) += gradOutput(x,y) * lambda(x_i,y_j) * lambdb(x_i,y_j) |
| 79 | $$ | 79 | $$ |
| 80 | 80 | ||
| 81 | ## 函数原型 | 81 | ## 函数原型 |
| 82 | 82 | ||
| 83 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBilinear2dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dBackward”接口执行计算。 | 83 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBilinear2dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dBackward”接口执行计算。 |
| 84 | 84 | ||
| 85 | ```Cpp | 85 | ```Cpp |
| 86 | aclnnStatus aclnnUpsampleBilinear2dBackwardGetWorkspaceSize( | 86 | aclnnStatus aclnnUpsampleBilinear2dBackwardGetWorkspaceSize( |
| @@ -231,8 +231,8 @@ aclnnStatus aclnnUpsampleBilinear2dBackward( | |||
| 231 | 231 | ||
| 232 | - **返回值** | 232 | - **返回值** |
| 233 | 233 | ||
| 234 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 234 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 235 | - | 235 | + |
| 236 | 第一段接口完成入参校验,出现以下场景时报错: | 236 | 第一段接口完成入参校验,出现以下场景时报错: |
| 237 | 237 | ||
| 238 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> | 238 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> |
| @@ -331,7 +331,7 @@ aclnnStatus aclnnUpsampleBilinear2dBackward( | |||
| 331 | 331 | ||
| 332 | - **返回值** | 332 | - **返回值** |
| 333 | 333 | ||
| 334 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 334 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 335 | 335 | ||
| 336 | ## 约束说明 | 336 | ## 约束说明 |
| 337 | 337 | ||
| @@ -351,7 +351,7 @@ aclnnStatus aclnnUpsampleBilinear2dBackward( | |||
| 351 | 351 | ||
| 352 | ## 调用示例 | 352 | ## 调用示例 |
| 353 | 353 | ||
| 354 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 354 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 355 | 355 | ||
| 356 | ```Cpp | 356 | ```Cpp |
| 357 | #include <iostream> | 357 | #include <iostream> |
| @@ -18,29 +18,29 @@ | |||
| 18 | - 接口功能:对由多个输入通道组成的输入信号应用最近邻插值算法进行上采样。如果输入shape为(N, C, L),则输出shape为(N, C, outputSize)。 | 18 | - 接口功能:对由多个输入通道组成的输入信号应用最近邻插值算法进行上采样。如果输入shape为(N, C, L),则输出shape为(N, C, outputSize)。 |
| 19 | 19 | ||
| 20 | - 计算公式: | 20 | - 计算公式: |
| 21 | - | 21 | + |
| 22 | $$ | 22 | $$ |
| 23 | out(N, C, l) = self(N, C, min(floor(l * scale), L-1)), \ scale = self\_L / outputSize[0] | 23 | out(N, C, l) = self(N, C, min(floor(l * scale), L-1)), \ scale = self\_L / outputSize[0] |
| 24 | $$ | 24 | $$ |
| 25 | 25 | ||
| 26 | ## 函数原型 | 26 | ## 函数原型 |
| 27 | 27 | ||
| 28 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearest1dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest1d”接口执行计算。 | 28 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearest1dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest1d”接口执行计算。 |
| 29 | 29 | ||
| 30 | ```Cpp | 30 | ```Cpp |
| 31 | aclnnStatus aclnnUpsampleNearest1dGetWorkspaceSize( | 31 | aclnnStatus aclnnUpsampleNearest1dGetWorkspaceSize( |
| 32 | - const aclTensor *self, | 32 | + const aclTensor *self, |
| 33 | - const aclIntArray *outputSize, | 33 | + const aclIntArray *outputSize, |
| 34 | - aclTensor *out, | 34 | + aclTensor *out, |
| 35 | - uint64_t *workspaceSize, | 35 | + uint64_t *workspaceSize, |
| 36 | aclOpExecutor **executor) | 36 | aclOpExecutor **executor) |
| 37 | ``` | 37 | ``` |
| 38 | 38 | ||
| 39 | ```Cpp | 39 | ```Cpp |
| 40 | aclnnStatus aclnnUpsampleNearest1d( | 40 | aclnnStatus aclnnUpsampleNearest1d( |
| 41 | - void *workspace, | 41 | + void *workspace, |
| 42 | - uint64_t workspaceSize, | 42 | + uint64_t workspaceSize, |
| 43 | - aclOpExecutor *executor, | 43 | + aclOpExecutor *executor, |
| 44 | aclrtStream stream) | 44 | aclrtStream stream) |
| 45 | ``` | 45 | ``` |
| 46 | 46 | ||
| @@ -124,13 +124,13 @@ aclnnStatus aclnnUpsampleNearest1d( | |||
| 124 | </table> | 124 | </table> |
| 125 | 125 | ||
| 126 | - <term>Atlas 推理系列产品</term>、<term>Atlas 训练系列产品</term>: | 126 | - <term>Atlas 推理系列产品</term>、<term>Atlas 训练系列产品</term>: |
| 127 | - | 127 | + |
| 128 | 入参`self`和出参`out`的数据类型不支持BFLOAT16。 | 128 | 入参`self`和出参`out`的数据类型不支持BFLOAT16。 |
| 129 | - | 129 | + |
| 130 | - **返回值** | 130 | - **返回值** |
| 131 | 131 | ||
| 132 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 132 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 133 | - | 133 | + |
| 134 | 第一段接口完成入参校验,出现以下场景时报错: | 134 | 第一段接口完成入参校验,出现以下场景时报错: |
| 135 | 135 | ||
| 136 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> | 136 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> |
| @@ -205,7 +205,7 @@ aclnnStatus aclnnUpsampleNearest1d( | |||
| 205 | 205 | ||
| 206 | - **返回值** | 206 | - **返回值** |
| 207 | 207 | ||
| 208 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 208 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 209 | 209 | ||
| 210 | ## 约束说明 | 210 | ## 约束说明 |
| 211 | 211 | ||
| @@ -214,7 +214,7 @@ aclnnStatus aclnnUpsampleNearest1d( | |||
| 214 | 214 | ||
| 215 | ## 调用示例 | 215 | ## 调用示例 |
| 216 | 216 | ||
| 217 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 217 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 218 | 218 | ||
| 219 | ```Cpp | 219 | ```Cpp |
| 220 | #include <iostream> | 220 | #include <iostream> |
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | ## 函数原型 | 33 | ## 函数原型 |
| 34 | 34 | ||
| 35 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用`aclnnUpsampleNearest2dGetWorkspaceSize`接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearest2d`接口执行计算。 | 35 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用`aclnnUpsampleNearest2dGetWorkspaceSize`接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearest2d`接口执行计算。 |
| 36 | 36 | ||
| 37 | ```Cpp | 37 | ```Cpp |
| 38 | aclnnStatus aclnnUpsampleNearest2dGetWorkspaceSize( | 38 | aclnnStatus aclnnUpsampleNearest2dGetWorkspaceSize( |
| @@ -135,7 +135,7 @@ aclnnStatus aclnnUpsampleNearest2d( | |||
| 135 | 135 | ||
| 136 | - **返回值** | 136 | - **返回值** |
| 137 | 137 | ||
| 138 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 138 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 139 | 139 | ||
| 140 | 第一段接口完成入参校验,出现以下场景时报错: | 140 | 第一段接口完成入参校验,出现以下场景时报错: |
| 141 | 141 | ||
| @@ -217,7 +217,7 @@ aclnnStatus aclnnUpsampleNearest2d( | |||
| 217 | 217 | ||
| 218 | - **返回值** | 218 | - **返回值** |
| 219 | 219 | ||
| 220 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 220 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 221 | 221 | ||
| 222 | ## 约束说明 | 222 | ## 约束说明 |
| 223 | 223 | ||
| @@ -239,7 +239,7 @@ aclnnStatus aclnnUpsampleNearest2d( | |||
| 239 | 239 | ||
| 240 | ## 调用示例 | 240 | ## 调用示例 |
| 241 | 241 | ||
| 242 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 242 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 243 | 243 | ||
| 244 | ```Cpp | 244 | ```Cpp |
| 245 | #include <iostream> | 245 | #include <iostream> |
| @@ -93,7 +93,7 @@ | |||
| 93 | 93 | ||
| 94 | ## 函数原型 | 94 | ## 函数原型 |
| 95 | 95 | ||
| 96 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleTrilinear3dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleTrilinear3d”接口执行计算。 | 96 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleTrilinear3dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleTrilinear3d”接口执行计算。 |
| 97 | 97 | ||
| 98 | ```Cpp | 98 | ```Cpp |
| 99 | aclnnStatus aclnnUpsampleTrilinear3dGetWorkspaceSize( | 99 | aclnnStatus aclnnUpsampleTrilinear3dGetWorkspaceSize( |
| @@ -248,7 +248,7 @@ aclnnStatus aclnnUpsampleTrilinear3d( | |||
| 248 | 248 | ||
| 249 | - **返回值** | 249 | - **返回值** |
| 250 | 250 | ||
| 251 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 251 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 252 | 252 | ||
| 253 | 第一段接口完成入参校验,出现以下场景时报错: | 253 | 第一段接口完成入参校验,出现以下场景时报错: |
| 254 | 254 | ||
| @@ -330,7 +330,7 @@ aclnnStatus aclnnUpsampleTrilinear3d( | |||
| 330 | 330 | ||
| 331 | - **返回值** | 331 | - **返回值** |
| 332 | 332 | ||
| 333 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 333 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 334 | 334 | ||
| 335 | ## 约束说明 | 335 | ## 约束说明 |
| 336 | 336 | ||
| @@ -382,7 +382,7 @@ aclnnStatus aclnnUpsampleTrilinear3d( | |||
| 382 | 382 | ||
| 383 | ## 调用示例 | 383 | ## 调用示例 |
| 384 | 384 | ||
| 385 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 385 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 386 | 386 | ||
| 387 | ```Cpp | 387 | ```Cpp |
| 388 | #include <iostream> | 388 | #include <iostream> |
| @@ -13,14 +13,14 @@ | |||
| 13 | 13 | ||
| 14 | ## 函数原型 | 14 | ## 函数原型 |
| 15 | 15 | ||
| 16 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnThreeInterpolateBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnThreeInterpolateBackward”接口执行计算。 | 16 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnThreeInterpolateBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnThreeInterpolateBackward”接口执行计算。 |
| 17 | 17 | ||
| 18 | ```Cpp | 18 | ```Cpp |
| 19 | aclnnStatus aclnnThreeInterpolateBackwardGetWorkspaceSize( | 19 | aclnnStatus aclnnThreeInterpolateBackwardGetWorkspaceSize( |
| 20 | const aclTensor *grad_x, | 20 | const aclTensor *grad_x, |
| 21 | const aclTensor *idx, | 21 | const aclTensor *idx, |
| 22 | const aclTensor *weight, | 22 | const aclTensor *weight, |
| 23 | - int m, | 23 | + int m, |
| 24 | aclTensor *grad_y, | 24 | aclTensor *grad_y, |
| 25 | uint64_t *workspaceSize, | 25 | uint64_t *workspaceSize, |
| 26 | aclOpExecutor **executor) | 26 | aclOpExecutor **executor) |
| @@ -28,9 +28,9 @@ aclnnStatus aclnnThreeInterpolateBackwardGetWorkspaceSize( | |||
| 28 | 28 | ||
| 29 | ```Cpp | 29 | ```Cpp |
| 30 | aclnnStatus aclnnThreeInterpolateBackward( | 30 | aclnnStatus aclnnThreeInterpolateBackward( |
| 31 | - void *workspace, | 31 | + void *workspace, |
| 32 | - uint64_t workspace_size, | 32 | + uint64_t workspace_size, |
| 33 | - aclOpExecutor *executor, | 33 | + aclOpExecutor *executor, |
| 34 | aclrtStream stream) | 34 | aclrtStream stream) |
| 35 | ``` | 35 | ``` |
| 36 | 36 | ||
| @@ -41,7 +41,7 @@ aclnnStatus aclnnThreeInterpolateBackward( | |||
| 41 | - 计算公式: | 41 | - 计算公式: |
| 42 | 42 | ||
| 43 | $$ | 43 | $$ |
| 44 | - grad\_y[b,c,idx[b,n,i]] = | 44 | + grad\_y[b,c,idx[b,n,i]] = |
| 45 | grad\_y[b,c,idx[b,n,i]] + grad\_x[b,c,n]*weight[b,n,i]\\ i\in[0,2]\ b\in[0,B) \ c\in[0,C) \ n\in[0,N) | 45 | grad\_y[b,c,idx[b,n,i]] + grad\_x[b,c,n]*weight[b,n,i]\\ i\in[0,2]\ b\in[0,B) \ c\in[0,C) \ n\in[0,N) |
| 46 | $$ | 46 | $$ |
| 47 | 47 | ||
| @@ -145,7 +145,7 @@ aclnnStatus aclnnThreeInterpolateBackward( | |||
| 145 | 145 | ||
| 146 | - **返回值** | 146 | - **返回值** |
| 147 | 147 | ||
| 148 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 148 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 149 | 149 | ||
| 150 | 第一段接口完成入参校验,出现以下场景时报错: | 150 | 第一段接口完成入参校验,出现以下场景时报错: |
| 151 | 151 | ||
| @@ -218,7 +218,7 @@ aclnnStatus aclnnThreeInterpolateBackward( | |||
| 218 | 218 | ||
| 219 | - **返回值** | 219 | - **返回值** |
| 220 | 220 | ||
| 221 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 221 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 222 | 222 | ||
| 223 | ## 约束说明 | 223 | ## 约束说明 |
| 224 | 224 | ||
| @@ -228,7 +228,7 @@ aclnnStatus aclnnThreeInterpolateBackward( | |||
| 228 | 228 | ||
| 229 | ## 调用示例 | 229 | ## 调用示例 |
| 230 | 230 | ||
| 231 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 231 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 232 | 232 | ||
| 233 | ```Cpp | 233 | ```Cpp |
| 234 | #include <iostream> | 234 | #include <iostream> |
| @@ -58,7 +58,7 @@ | |||
| 58 | 58 | ||
| 59 | ## 函数原型 | 59 | ## 函数原型 |
| 60 | 60 | ||
| 61 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBicubic2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2d”接口执行计算。 | 61 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBicubic2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2d”接口执行计算。 |
| 62 | 62 | ||
| 63 | ```Cpp | 63 | ```Cpp |
| 64 | aclnnStatus aclnnUpsampleBicubic2dGetWorkspaceSize( | 64 | aclnnStatus aclnnUpsampleBicubic2dGetWorkspaceSize( |
| @@ -198,7 +198,7 @@ aclnnStatus aclnnUpsampleBicubic2d( | |||
| 198 | 198 | ||
| 199 | - **返回值** | 199 | - **返回值** |
| 200 | 200 | ||
| 201 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 201 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 202 | 202 | ||
| 203 | 第一段接口完成入参校验,出现以下场景时报错: | 203 | 第一段接口完成入参校验,出现以下场景时报错: |
| 204 | 204 | ||
| @@ -298,7 +298,7 @@ aclnnStatus aclnnUpsampleBicubic2d( | |||
| 298 | 298 | ||
| 299 | - **返回值** | 299 | - **返回值** |
| 300 | 300 | ||
| 301 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 301 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 302 | 302 | ||
| 303 | ## 约束说明 | 303 | ## 约束说明 |
| 304 | 304 | ||
| @@ -331,7 +331,7 @@ aclnnStatus aclnnUpsampleBicubic2d( | |||
| 331 | 331 | ||
| 332 | ## 调用示例 | 332 | ## 调用示例 |
| 333 | 333 | ||
| 334 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 334 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 335 | 335 | ||
| 336 | ```Cpp | 336 | ```Cpp |
| 337 | #include <iostream> | 337 | #include <iostream> |
| @@ -63,7 +63,7 @@ | |||
| 63 | 63 | ||
| 64 | ## 函数原型 | 64 | ## 函数原型 |
| 65 | 65 | ||
| 66 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBicubic2dAAGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2dAA”接口执行计算。 | 66 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBicubic2dAAGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2dAA”接口执行计算。 |
| 67 | 67 | ||
| 68 | ```Cpp | 68 | ```Cpp |
| 69 | aclnnStatus aclnnUpsampleBicubic2dAAGetWorkspaceSize( | 69 | aclnnStatus aclnnUpsampleBicubic2dAAGetWorkspaceSize( |
| @@ -196,7 +196,7 @@ aclnnStatus aclnnUpsampleBicubic2dAA( | |||
| 196 | 196 | ||
| 197 | - **返回值** | 197 | - **返回值** |
| 198 | 198 | ||
| 199 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 199 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 200 | 200 | ||
| 201 | 第一段接口完成入参校验,出现以下场景时报错: | 201 | 第一段接口完成入参校验,出现以下场景时报错: |
| 202 | 202 | ||
| @@ -275,7 +275,7 @@ aclnnStatus aclnnUpsampleBicubic2dAA( | |||
| 275 | 275 | ||
| 276 | - **返回值** | 276 | - **返回值** |
| 277 | 277 | ||
| 278 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 278 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 279 | 279 | ||
| 280 | ## 约束说明 | 280 | ## 约束说明 |
| 281 | 281 | ||
| @@ -320,7 +320,7 @@ aclnnStatus aclnnUpsampleBicubic2dAA( | |||
| 320 | 320 | ||
| 321 | ## 调用示例 | 321 | ## 调用示例 |
| 322 | 322 | ||
| 323 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 323 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 324 | 324 | ||
| 325 | ```Cpp | 325 | ```Cpp |
| 326 | #include <iostream> | 326 | #include <iostream> |
| @@ -58,7 +58,7 @@ | |||
| 58 | 58 | ||
| 59 | ## 函数原型 | 59 | ## 函数原型 |
| 60 | 60 | ||
| 61 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBicubic2dAAGradGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2dAAGrad”接口执行计算。 | 61 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBicubic2dAAGradGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBicubic2dAAGrad”接口执行计算。 |
| 62 | 62 | ||
| 63 | ```Cpp | 63 | ```Cpp |
| 64 | aclnnStatus aclnnUpsampleBicubic2dAAGradGetWorkspaceSize( | 64 | aclnnStatus aclnnUpsampleBicubic2dAAGradGetWorkspaceSize( |
| @@ -202,7 +202,7 @@ aclnnStatus aclnnUpsampleBicubic2dAAGrad( | |||
| 202 | 202 | ||
| 203 | - **返回值** | 203 | - **返回值** |
| 204 | 204 | ||
| 205 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 205 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 206 | 206 | ||
| 207 | 第一段接口完成入参校验,出现以下场景时报错: | 207 | 第一段接口完成入参校验,出现以下场景时报错: |
| 208 | 208 | ||
| @@ -290,7 +290,7 @@ aclnnStatus aclnnUpsampleBicubic2dAAGrad( | |||
| 290 | 290 | ||
| 291 | - **返回值** | 291 | - **返回值** |
| 292 | 292 | ||
| 293 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 293 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 294 | 294 | ||
| 295 | ## 约束说明 | 295 | ## 约束说明 |
| 296 | 296 | ||
| @@ -336,7 +336,7 @@ aclnnStatus aclnnUpsampleBicubic2dAAGrad( | |||
| 336 | 336 | ||
| 337 | ## 调用示例 | 337 | ## 调用示例 |
| 338 | 338 | ||
| 339 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 339 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 340 | 340 | ||
| 341 | ```Cpp | 341 | ```Cpp |
| 342 | #include <iostream> | 342 | #include <iostream> |
| @@ -18,11 +18,11 @@ | |||
| 18 | - 接口功能:[aclnnUpsampleBicubic2d](../../upsample_bicubic2d/docs/aclnnUpsampleBicubic2d.md)的反向传播。如果输入张量的shape为(N, C, H, W),则输出张量的shape为(N, C, inputSize[2], inputSize[3])。 | 18 | - 接口功能:[aclnnUpsampleBicubic2d](../../upsample_bicubic2d/docs/aclnnUpsampleBicubic2d.md)的反向传播。如果输入张量的shape为(N, C, H, W),则输出张量的shape为(N, C, inputSize[2], inputSize[3])。 |
| 19 | 19 | ||
| 20 | - 计算公式:对于一个二维插值点$(N, C, h, w)$,插值$gradInput(N, C, h, w)$可以表示为: | 20 | - 计算公式:对于一个二维插值点$(N, C, h, w)$,插值$gradInput(N, C, h, w)$可以表示为: |
| 21 | - | 21 | + |
| 22 | $$ | 22 | $$ |
| 23 | {gradInput(N, C, h, w)}=\sum_{i=0}^{3}\sum_{j=0}^{3}{W(i, j)}*{f(h_i, w_j)} | 23 | {gradInput(N, C, h, w)}=\sum_{i=0}^{3}\sum_{j=0}^{3}{W(i, j)}*{f(h_i, w_j)} |
| 24 | $$ | 24 | $$ |
| 25 | - | 25 | + |
| 26 | $$ | 26 | $$ |
| 27 | scaleH =\begin{cases} | 27 | scaleH =\begin{cases} |
| 28 | (inputSize[2]-1) / (outputSize[0]-1) & alignCorners=true \\ | 28 | (inputSize[2]-1) / (outputSize[0]-1) & alignCorners=true \\ |
| @@ -30,7 +30,7 @@ | |||
| 30 | inputSize[2] / outputSize[0] & otherwise | 30 | inputSize[2] / outputSize[0] & otherwise |
| 31 | \end{cases} | 31 | \end{cases} |
| 32 | $$ | 32 | $$ |
| 33 | - | 33 | + |
| 34 | $$ | 34 | $$ |
| 35 | scaleW =\begin{cases} | 35 | scaleW =\begin{cases} |
| 36 | (inputSize[3]-1) / (outputSize[1]-1) & alignCorners=true \\ | 36 | (inputSize[3]-1) / (outputSize[1]-1) & alignCorners=true \\ |
| @@ -38,7 +38,7 @@ | |||
| 38 | inputSize[3] / outputSize[1] & otherwise | 38 | inputSize[3] / outputSize[1] & otherwise |
| 39 | \end{cases} | 39 | \end{cases} |
| 40 | $$ | 40 | $$ |
| 41 | - | 41 | + |
| 42 | 其中: | 42 | 其中: |
| 43 | - alignCorners为true,表示输入和输出张量的角像素点对齐;alignCorners为false,表示输入和输出张量的边像素点对齐。 | 43 | - alignCorners为true,表示输入和输出张量的角像素点对齐;alignCorners为false,表示输入和输出张量的边像素点对齐。 |
| 44 | - i和j是$W(i, j)$的索引变量。 | 44 | - i和j是$W(i, j)$的索引变量。 |
| @@ -59,7 +59,7 @@ | |||
| 59 | 59 | ||
| 60 | ## 函数原型 | 60 | ## 函数原型 |
| 61 | 61 | ||
| 62 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBicubic2dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleBicubic2dBackward”接口执行计算。 | 62 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBicubic2dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleBicubic2dBackward”接口执行计算。 |
| 63 | 63 | ||
| 64 | ```Cpp | 64 | ```Cpp |
| 65 | aclnnStatus aclnnUpsampleBicubic2dBackwardGetWorkspaceSize( | 65 | aclnnStatus aclnnUpsampleBicubic2dBackwardGetWorkspaceSize( |
| @@ -205,13 +205,13 @@ aclnnStatus aclnnUpsampleBicubic2dBackward( | |||
| 205 | - 参数`gradOut`、`gradInput`的数据类型不支持BFLOAT16。 | 205 | - 参数`gradOut`、`gradInput`的数据类型不支持BFLOAT16。 |
| 206 | - 参数`gradOut`、`gradInput`的数据格式不支持NHWC。 | 206 | - 参数`gradOut`、`gradInput`的数据格式不支持NHWC。 |
| 207 | - <term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term>、<term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term>: | 207 | - <term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term>、<term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term>: |
| 208 | - | 208 | + |
| 209 | 参数`gradOut`、`gradInput`的数据格式不支持NHWC。 | 209 | 参数`gradOut`、`gradInput`的数据格式不支持NHWC。 |
| 210 | 210 | ||
| 211 | - **返回值** | 211 | - **返回值** |
| 212 | 212 | ||
| 213 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 213 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 214 | - | 214 | + |
| 215 | 第一段接口完成入参校验,出现以下场景时报错: | 215 | 第一段接口完成入参校验,出现以下场景时报错: |
| 216 | 216 | ||
| 217 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> | 217 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> |
| @@ -267,7 +267,7 @@ aclnnStatus aclnnUpsampleBicubic2dBackward( | |||
| 267 | <tr> | 267 | <tr> |
| 268 | <td>gradOut和gradInput的数据格式不在支持的范围之内。</td> | 268 | <td>gradOut和gradInput的数据格式不在支持的范围之内。</td> |
| 269 | </tr> | 269 | </tr> |
| 270 | - </tbody></table> | 270 | + </tbody></table> |
| 271 | 271 | ||
| 272 | ## aclnnUpsampleBicubic2dBackward | 272 | ## aclnnUpsampleBicubic2dBackward |
| 273 | 273 | ||
| @@ -309,8 +309,8 @@ aclnnStatus aclnnUpsampleBicubic2dBackward( | |||
| 309 | </table> | 309 | </table> |
| 310 | 310 | ||
| 311 | - **返回值** | 311 | - **返回值** |
| 312 | - | 312 | + |
| 313 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 313 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 314 | 314 | ||
| 315 | ## 约束说明 | 315 | ## 约束说明 |
| 316 | 316 | ||
| @@ -333,7 +333,7 @@ aclnnStatus aclnnUpsampleBicubic2dBackward( | |||
| 333 | $$ | 333 | $$ |
| 334 | 334 | ||
| 335 | - 确定性计算: | 335 | - 确定性计算: |
| 336 | - | 336 | + |
| 337 | aclnnUpsampleBicubic2dBackward默认非确定性实现,支持通过aclrtCtxSetSysParamOpt开启确定性。当满足如下条件时不支持确定性计算: | 337 | aclnnUpsampleBicubic2dBackward默认非确定性实现,支持通过aclrtCtxSetSysParamOpt开启确定性。当满足如下条件时不支持确定性计算: |
| 338 | - $inputSize\_W$ > 130000 | 338 | - $inputSize\_W$ > 130000 |
| 339 | - $inputSize\_H$/$outputSize\_H$ >=50 | 339 | - $inputSize\_H$/$outputSize\_H$ >=50 |
| @@ -342,7 +342,7 @@ aclnnStatus aclnnUpsampleBicubic2dBackward( | |||
| 342 | 342 | ||
| 343 | ## 调用示例 | 343 | ## 调用示例 |
| 344 | 344 | ||
| 345 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 345 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 346 | 346 | ||
| 347 | ```Cpp | 347 | ```Cpp |
| 348 | #include <iostream> | 348 | #include <iostream> |
| @@ -80,7 +80,7 @@ | |||
| 80 | 80 | ||
| 81 | ## 函数原型 | 81 | ## 函数原型 |
| 82 | 82 | ||
| 83 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBilinear2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2d”接口执行计算。 | 83 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBilinear2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2d”接口执行计算。 |
| 84 | 84 | ||
| 85 | ```Cpp | 85 | ```Cpp |
| 86 | aclnnStatus aclnnUpsampleBilinear2dGetWorkspaceSize( | 86 | aclnnStatus aclnnUpsampleBilinear2dGetWorkspaceSize( |
| @@ -217,7 +217,7 @@ aclnnStatus aclnnUpsampleBilinear2d( | |||
| 217 | 217 | ||
| 218 | - **返回值** | 218 | - **返回值** |
| 219 | 219 | ||
| 220 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 220 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 221 | 221 | ||
| 222 | 第一段接口完成入参校验,出现以下场景时报错: | 222 | 第一段接口完成入参校验,出现以下场景时报错: |
| 223 | 223 | ||
| @@ -296,7 +296,7 @@ aclnnStatus aclnnUpsampleBilinear2d( | |||
| 296 | 296 | ||
| 297 | - **返回值** | 297 | - **返回值** |
| 298 | 298 | ||
| 299 | -aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 299 | +aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 300 | 300 | ||
| 301 | ## 约束说明 | 301 | ## 约束说明 |
| 302 | 302 | ||
| @@ -315,7 +315,7 @@ aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/co | |||
| 315 | 315 | ||
| 316 | ## 调用示例 | 316 | ## 调用示例 |
| 317 | 317 | ||
| 318 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 318 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 319 | 319 | ||
| 320 | ```Cpp | 320 | ```Cpp |
| 321 | #include <iostream> | 321 | #include <iostream> |
| @@ -18,11 +18,11 @@ | |||
| 18 | - 接口功能:对由多个输入通道组成的输入信号应用2D双线性抗锯齿采样。 | 18 | - 接口功能:对由多个输入通道组成的输入信号应用2D双线性抗锯齿采样。 |
| 19 | 19 | ||
| 20 | - 计算公式:对于一个二维插值点$(N, C, H, W)$,插值$I(N, C, H, W)$可以表示为: | 20 | - 计算公式:对于一个二维插值点$(N, C, H, W)$,插值$I(N, C, H, W)$可以表示为: |
| 21 | - | 21 | + |
| 22 | $$ | 22 | $$ |
| 23 | {I(N, C, H, W)} = \sum_{i=0}^{kW}\sum_{j=0}^{kH}{w(i) * w(j)} * {f(h_i, w_j)}/\sum_{i=0}^{kW}w(i)/\sum_{j=0}^{kH}w(j) | 23 | {I(N, C, H, W)} = \sum_{i=0}^{kW}\sum_{j=0}^{kH}{w(i) * w(j)} * {f(h_i, w_j)}/\sum_{i=0}^{kW}w(i)/\sum_{j=0}^{kH}w(j) |
| 24 | $$ | 24 | $$ |
| 25 | - | 25 | + |
| 26 | $$ | 26 | $$ |
| 27 | scaleH =\begin{cases} | 27 | scaleH =\begin{cases} |
| 28 | (input.dim(2)-1) / (outputSize[0]-1) & alignCorners=true \\ | 28 | (input.dim(2)-1) / (outputSize[0]-1) & alignCorners=true \\ |
| @@ -30,7 +30,7 @@ | |||
| 30 | input.dim(2) / outputSize[0] & otherwise | 30 | input.dim(2) / outputSize[0] & otherwise |
| 31 | \end{cases} | 31 | \end{cases} |
| 32 | $$ | 32 | $$ |
| 33 | - | 33 | + |
| 34 | $$ | 34 | $$ |
| 35 | scaleW =\begin{cases} | 35 | scaleW =\begin{cases} |
| 36 | (input.dim(3)-1) / (outputSize[1]-1) & alignCorners=true \\ | 36 | (input.dim(3)-1) / (outputSize[1]-1) & alignCorners=true \\ |
| @@ -38,9 +38,9 @@ | |||
| 38 | input.dim(3) / outputSize[1] & otherwise | 38 | input.dim(3) / outputSize[1] & otherwise |
| 39 | \end{cases} | 39 | \end{cases} |
| 40 | $$ | 40 | $$ |
| 41 | - | 41 | + |
| 42 | 其中: | 42 | 其中: |
| 43 | - | 43 | + |
| 44 | - alignCorners为true,表示输入和输出张量的角像素点对齐;alignCorners为false,表示输入和输出张量的边像素点对齐。 | 44 | - alignCorners为true,表示输入和输出张量的角像素点对齐;alignCorners为false,表示输入和输出张量的边像素点对齐。 |
| 45 | - $kW$、$kH$分别表示W方向和H方向影响插值点大小的点的数量 | 45 | - $kW$、$kH$分别表示W方向和H方向影响插值点大小的点的数量 |
| 46 | - 如果$scaleH >= 1$,则$kH = floor(scaleH) * 2 + 1$,否则$kH = 3$ | 46 | - 如果$scaleH >= 1$,则$kH = floor(scaleH) * 2 + 1$,否则$kH = 3$ |
| @@ -64,7 +64,7 @@ | |||
| 64 | 64 | ||
| 65 | ## 函数原型 | 65 | ## 函数原型 |
| 66 | 66 | ||
| 67 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBilinear2dAAGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dAA”接口执行计算。 | 67 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBilinear2dAAGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dAA”接口执行计算。 |
| 68 | 68 | ||
| 69 | ```Cpp | 69 | ```Cpp |
| 70 | aclnnStatus aclnnUpsampleBilinear2dAAGetWorkspaceSize( | 70 | aclnnStatus aclnnUpsampleBilinear2dAAGetWorkspaceSize( |
| @@ -197,8 +197,8 @@ aclnnStatus aclnnUpsampleBilinear2dAA( | |||
| 197 | 197 | ||
| 198 | - **返回值**: | 198 | - **返回值**: |
| 199 | 199 | ||
| 200 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 200 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 201 | - | 201 | + |
| 202 | 第一段接口完成入参校验,出现以下场景时报错: | 202 | 第一段接口完成入参校验,出现以下场景时报错: |
| 203 | 203 | ||
| 204 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> | 204 | <table style="undefined;table-layout: fixed;width: 1170px"><colgroup> |
| @@ -282,7 +282,7 @@ aclnnStatus aclnnUpsampleBilinear2dAA( | |||
| 282 | 282 | ||
| 283 | - **返回值** | 283 | - **返回值** |
| 284 | 284 | ||
| 285 | -aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 285 | +aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 286 | 286 | ||
| 287 | ## 约束说明 | 287 | ## 约束说明 |
| 288 | 288 | ||
| @@ -294,11 +294,11 @@ aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/co | |||
| 294 | - N代表输入和输出的N轴。 | 294 | - N代表输入和输出的N轴。 |
| 295 | - C代表输入和输出的C轴。 | 295 | - C代表输入和输出的C轴。 |
| 296 | - 输入数据缩放场景缩小倍数必须小于等于50,即: | 296 | - 输入数据缩放场景缩小倍数必须小于等于50,即: |
| 297 | - | 297 | + |
| 298 | $$ | 298 | $$ |
| 299 | 输入shape的高度H/outputSize\_H <= 50 | 299 | 输入shape的高度H/outputSize\_H <= 50 |
| 300 | $$ | 300 | $$ |
| 301 | - | 301 | + |
| 302 | $$ | 302 | $$ |
| 303 | 输入shape的宽度W/outputSize\_W <=50 | 303 | 输入shape的宽度W/outputSize\_W <=50 |
| 304 | $$ | 304 | $$ |
| @@ -318,7 +318,7 @@ aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/co | |||
| 318 | 318 | ||
| 319 | ## 调用示例 | 319 | ## 调用示例 |
| 320 | 320 | ||
| 321 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 321 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 322 | 322 | ||
| 323 | ```Cpp | 323 | ```Cpp |
| 324 | #include <iostream> | 324 | #include <iostream> |
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | ## 函数原型 | 68 | ## 函数原型 |
| 69 | 69 | ||
| 70 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBilinear2dAABackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dAABackward”接口执行计算。 | 70 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBilinear2dAABackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dAABackward”接口执行计算。 |
| 71 | 71 | ||
| 72 | ```Cpp | 72 | ```Cpp |
| 73 | aclnnStatus aclnnUpsampleBilinear2dAABackwardGetWorkspaceSize( | 73 | aclnnStatus aclnnUpsampleBilinear2dAABackwardGetWorkspaceSize( |
| @@ -211,7 +211,7 @@ aclnnStatus aclnnUpsampleBilinear2dAABackward( | |||
| 211 | 211 | ||
| 212 | * **返回值**: | 212 | * **返回值**: |
| 213 | 213 | ||
| 214 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 214 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 215 | 215 | ||
| 216 | 第一段接口完成入参校验,出现以下场景时报错: | 216 | 第一段接口完成入参校验,出现以下场景时报错: |
| 217 | 217 | ||
| @@ -302,7 +302,7 @@ aclnnStatus aclnnUpsampleBilinear2dAABackward( | |||
| 302 | 302 | ||
| 303 | - **返回值** | 303 | - **返回值** |
| 304 | 304 | ||
| 305 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 305 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 306 | 306 | ||
| 307 | ## 约束说明 | 307 | ## 约束说明 |
| 308 | 308 | ||
| @@ -339,7 +339,7 @@ aclnnStatus aclnnUpsampleBilinear2dAABackward( | |||
| 339 | 339 | ||
| 340 | ## 调用示例 | 340 | ## 调用示例 |
| 341 | 341 | ||
| 342 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 342 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 343 | 343 | ||
| 344 | ```Cpp | 344 | ```Cpp |
| 345 | #include <iostream> | 345 | #include <iostream> |
| @@ -84,7 +84,7 @@ | |||
| 84 | 84 | ||
| 85 | ## 函数原型 | 85 | ## 函数原型 |
| 86 | 86 | ||
| 87 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleBilinear2dBackwardV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dBackwardV2”接口执行计算。 | 87 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleBilinear2dBackwardV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleBilinear2dBackwardV2”接口执行计算。 |
| 88 | 88 | ||
| 89 | ```Cpp | 89 | ```Cpp |
| 90 | aclnnStatus aclnnUpsampleBilinear2dBackwardV2GetWorkspaceSize( | 90 | aclnnStatus aclnnUpsampleBilinear2dBackwardV2GetWorkspaceSize( |
| @@ -232,7 +232,7 @@ aclnnStatus aclnnUpsampleBilinear2dBackwardV2( | |||
| 232 | 232 | ||
| 233 | - **返回值** | 233 | - **返回值** |
| 234 | 234 | ||
| 235 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 235 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 236 | 236 | ||
| 237 | 第一段接口完成入参校验,出现以下场景时报错: | 237 | 第一段接口完成入参校验,出现以下场景时报错: |
| 238 | 238 | ||
| @@ -329,7 +329,7 @@ aclnnStatus aclnnUpsampleBilinear2dBackwardV2( | |||
| 329 | 329 | ||
| 330 | - **返回值** | 330 | - **返回值** |
| 331 | 331 | ||
| 332 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 332 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 333 | 333 | ||
| 334 | ## 约束说明 | 334 | ## 约束说明 |
| 335 | 335 | ||
| @@ -363,7 +363,7 @@ aclnnStatus aclnnUpsampleBilinear2dBackwardV2( | |||
| 363 | 363 | ||
| 364 | ## 调用示例 | 364 | ## 调用示例 |
| 365 | 365 | ||
| 366 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 366 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 367 | 367 | ||
| 368 | ```Cpp | 368 | ```Cpp |
| 369 | #include <iostream> | 369 | #include <iostream> |
| @@ -62,7 +62,7 @@ | |||
| 62 | 62 | ||
| 63 | ## 函数原型 | 63 | ## 函数原型 |
| 64 | 64 | ||
| 65 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleLinear1dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleLinear1dBackward”接口执行计算。 | 65 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleLinear1dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleLinear1dBackward”接口执行计算。 |
| 66 | 66 | ||
| 67 | ```Cpp | 67 | ```Cpp |
| 68 | aclnnStatus aclnnUpsampleLinear1dBackwardGetWorkspaceSize( | 68 | aclnnStatus aclnnUpsampleLinear1dBackwardGetWorkspaceSize( |
| @@ -203,7 +203,7 @@ aclnnStatus aclnnUpsampleLinear1dBackward( | |||
| 203 | 203 | ||
| 204 | - **返回值** | 204 | - **返回值** |
| 205 | 205 | ||
| 206 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 206 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 207 | 207 | ||
| 208 | 第一段接口完成入参校验,出现以下场景时报错: | 208 | 第一段接口完成入参校验,出现以下场景时报错: |
| 209 | 209 | ||
| @@ -295,7 +295,7 @@ aclnnStatus aclnnUpsampleLinear1dBackward( | |||
| 295 | 295 | ||
| 296 | - **返回值** | 296 | - **返回值** |
| 297 | 297 | ||
| 298 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 298 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 299 | 299 | ||
| 300 | ## 约束说明 | 300 | ## 约束说明 |
| 301 | 301 | ||
| @@ -332,7 +332,7 @@ aclnnStatus aclnnUpsampleLinear1dBackward( | |||
| 332 | 332 | ||
| 333 | ## 调用示例 | 333 | ## 调用示例 |
| 334 | 334 | ||
| 335 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 335 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 336 | 336 | ||
| 337 | ```Cpp | 337 | ```Cpp |
| 338 | #include <iostream> | 338 | #include <iostream> |
| @@ -56,7 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | ## 函数原型 | 57 | ## 函数原型 |
| 58 | 58 | ||
| 59 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleLinear1dGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleLinear1d”接口执行计算。 | 59 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleLinear1dGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleLinear1d”接口执行计算。 |
| 60 | 60 | ||
| 61 | ```Cpp | 61 | ```Cpp |
| 62 | aclnnStatus aclnnUpsampleLinear1dGetWorkspaceSize( | 62 | aclnnStatus aclnnUpsampleLinear1dGetWorkspaceSize( |
| @@ -184,7 +184,7 @@ aclnnStatus aclnnUpsampleLinear1d( | |||
| 184 | 184 | ||
| 185 | - **返回值** | 185 | - **返回值** |
| 186 | 186 | ||
| 187 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 187 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 188 | 188 | ||
| 189 | 第一段接口完成入参校验,出现以下场景时报错: | 189 | 第一段接口完成入参校验,出现以下场景时报错: |
| 190 | 190 | ||
| @@ -267,7 +267,7 @@ aclnnStatus aclnnUpsampleLinear1d( | |||
| 267 | 267 | ||
| 268 | - **返回值** | 268 | - **返回值** |
| 269 | 269 | ||
| 270 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 270 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 271 | 271 | ||
| 272 | ## 约束说明 | 272 | ## 约束说明 |
| 273 | 273 | ||
| @@ -283,7 +283,7 @@ aclnnStatus aclnnUpsampleLinear1d( | |||
| 283 | 283 | ||
| 284 | ## 调用示例 | 284 | ## 调用示例 |
| 285 | 285 | ||
| 286 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 286 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 287 | 287 | ||
| 288 | ```Cpp | 288 | ```Cpp |
| 289 | #include <iostream> | 289 | #include <iostream> |
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | ## 函数原型 | 29 | ## 函数原型 |
| 30 | 30 | ||
| 31 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用**aclnnUpsampleNearestExact1dGetWorkspaceSize**接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearestExact1d`接口执行计算。 | 31 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用**aclnnUpsampleNearestExact1dGetWorkspaceSize**接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearestExact1d`接口执行计算。 |
| 32 | 32 | ||
| 33 | ```cpp | 33 | ```cpp |
| 34 | aclnnStatus aclnnUpsampleNearestExact1dGetWorkspaceSize( | 34 | aclnnStatus aclnnUpsampleNearestExact1dGetWorkspaceSize( |
| @@ -142,7 +142,7 @@ aclnnStatus aclnnUpsampleNearestExact1d( | |||
| 142 | 142 | ||
| 143 | - **返回值** | 143 | - **返回值** |
| 144 | 144 | ||
| 145 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 145 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 146 | 146 | ||
| 147 | 第一段接口完成入参校验,出现以下场景时报错: | 147 | 第一段接口完成入参校验,出现以下场景时报错: |
| 148 | 148 | ||
| @@ -217,7 +217,7 @@ aclnnStatus aclnnUpsampleNearestExact1d( | |||
| 217 | 217 | ||
| 218 | - **返回值** | 218 | - **返回值** |
| 219 | 219 | ||
| 220 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 220 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 221 | 221 | ||
| 222 | ## 约束说明 | 222 | ## 约束说明 |
| 223 | 223 | ||
| @@ -247,7 +247,7 @@ aclnnStatus aclnnUpsampleNearestExact1d( | |||
| 247 | 247 | ||
| 248 | ## 调用示例 | 248 | ## 调用示例 |
| 249 | 249 | ||
| 250 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 250 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 251 | 251 | ||
| 252 | ```Cpp | 252 | ```Cpp |
| 253 | #include <iostream> | 253 | #include <iostream> |
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | ## 函数原型 | 33 | ## 函数原型 |
| 34 | 34 | ||
| 35 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearestExact2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearestExact2d”接口执行计算。 | 35 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearestExact2dGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearestExact2d”接口执行计算。 |
| 36 | 36 | ||
| 37 | ```Cpp | 37 | ```Cpp |
| 38 | aclnnStatus aclnnUpsampleNearestExact2dGetWorkspaceSize( | 38 | aclnnStatus aclnnUpsampleNearestExact2dGetWorkspaceSize( |
| @@ -158,7 +158,7 @@ aclnnStatus aclnnUpsampleNearestExact2d( | |||
| 158 | 158 | ||
| 159 | - **返回值** | 159 | - **返回值** |
| 160 | 160 | ||
| 161 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 161 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 162 | 162 | ||
| 163 | 第一段接口完成入参校验,出现以下场景时报错: | 163 | 第一段接口完成入参校验,出现以下场景时报错: |
| 164 | 164 | ||
| @@ -237,7 +237,7 @@ aclnnStatus aclnnUpsampleNearestExact2d( | |||
| 237 | 237 | ||
| 238 | - **返回值** | 238 | - **返回值** |
| 239 | 239 | ||
| 240 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 240 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 241 | 241 | ||
| 242 | ## 约束说明 | 242 | ## 约束说明 |
| 243 | 243 | ||
| @@ -271,7 +271,7 @@ aclnnStatus aclnnUpsampleNearestExact2d( | |||
| 271 | 271 | ||
| 272 | ## 调用示例 | 272 | ## 调用示例 |
| 273 | 273 | ||
| 274 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 274 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 275 | 275 | ||
| 276 | ```Cpp | 276 | ```Cpp |
| 277 | #include <iostream> | 277 | #include <iostream> |
| @@ -41,7 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | ## 函数原型 | 42 | ## 函数原型 |
| 43 | 43 | ||
| 44 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearest1dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearest1dBackward”接口执行计算。 | 44 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearest1dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearest1dBackward”接口执行计算。 |
| 45 | 45 | ||
| 46 | ```Cpp | 46 | ```Cpp |
| 47 | aclnnStatus aclnnUpsampleNearest1dBackwardGetWorkspaceSize( | 47 | aclnnStatus aclnnUpsampleNearest1dBackwardGetWorkspaceSize( |
| @@ -167,7 +167,7 @@ aclnnStatus aclnnUpsampleNearest1dBackward( | |||
| 167 | 167 | ||
| 168 | - **返回值** | 168 | - **返回值** |
| 169 | 169 | ||
| 170 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 170 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 171 | 171 | ||
| 172 | 第一段接口完成入参校验,出现以下场景时报错: | 172 | 第一段接口完成入参校验,出现以下场景时报错: |
| 173 | 173 | ||
| @@ -254,7 +254,7 @@ aclnnStatus aclnnUpsampleNearest1dBackward( | |||
| 254 | 254 | ||
| 255 | - **返回值** | 255 | - **返回值** |
| 256 | 256 | ||
| 257 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 257 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 258 | 258 | ||
| 259 | ## 约束说明 | 259 | ## 约束说明 |
| 260 | 260 | ||
| @@ -269,7 +269,7 @@ aclnnStatus aclnnUpsampleNearest1dBackward( | |||
| 269 | 269 | ||
| 270 | ## 调用示例 | 270 | ## 调用示例 |
| 271 | 271 | ||
| 272 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 272 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 273 | 273 | ||
| 274 | ```Cpp | 274 | ```Cpp |
| 275 | #include <iostream> | 275 | #include <iostream> |
| @@ -53,7 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | ## 函数原型 | 54 | ## 函数原型 |
| 55 | 55 | ||
| 56 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearest2dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearest2dBackward”接口执行计算。 | 56 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearest2dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearest2dBackward”接口执行计算。 |
| 57 | 57 | ||
| 58 | ```Cpp | 58 | ```Cpp |
| 59 | aclnnStatus aclnnUpsampleNearest2dBackwardGetWorkspaceSize( | 59 | aclnnStatus aclnnUpsampleNearest2dBackwardGetWorkspaceSize( |
| @@ -190,7 +190,7 @@ aclnnStatus aclnnUpsampleNearest2dBackward( | |||
| 190 | 190 | ||
| 191 | - **返回值** | 191 | - **返回值** |
| 192 | 192 | ||
| 193 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 193 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 194 | 194 | ||
| 195 | 第一段接口完成入参校验,出现以下场景时报错: | 195 | 第一段接口完成入参校验,出现以下场景时报错: |
| 196 | 196 | ||
| @@ -278,7 +278,7 @@ aclnnStatus aclnnUpsampleNearest2dBackward( | |||
| 278 | 278 | ||
| 279 | - **返回值** | 279 | - **返回值** |
| 280 | 280 | ||
| 281 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 281 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 282 | 282 | ||
| 283 | ## 约束说明 | 283 | ## 约束说明 |
| 284 | 284 | ||
| @@ -297,7 +297,7 @@ aclnnStatus aclnnUpsampleNearest2dBackward( | |||
| 297 | 297 | ||
| 298 | ## 调用示例 | 298 | ## 调用示例 |
| 299 | 299 | ||
| 300 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 300 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 301 | 301 | ||
| 302 | ```Cpp | 302 | ```Cpp |
| 303 | #include <iostream> | 303 | #include <iostream> |
| @@ -25,7 +25,7 @@ | |||
| 25 | 25 | ||
| 26 | ## 函数原型 | 26 | ## 函数原型 |
| 27 | 27 | ||
| 28 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearest1dV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest1dV2”接口执行计算。 | 28 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearest1dV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest1dV2”接口执行计算。 |
| 29 | 29 | ||
| 30 | ```Cpp | 30 | ```Cpp |
| 31 | aclnnStatus aclnnUpsampleNearest1dV2GetWorkspaceSize( | 31 | aclnnStatus aclnnUpsampleNearest1dV2GetWorkspaceSize( |
| @@ -141,7 +141,7 @@ aclnnStatus aclnnUpsampleNearest1dV2( | |||
| 141 | 141 | ||
| 142 | - **返回值** | 142 | - **返回值** |
| 143 | 143 | ||
| 144 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 144 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 145 | 145 | ||
| 146 | 第一段接口完成入参校验,出现以下场景时报错: | 146 | 第一段接口完成入参校验,出现以下场景时报错: |
| 147 | 147 | ||
| @@ -220,7 +220,7 @@ aclnnStatus aclnnUpsampleNearest1dV2( | |||
| 220 | 220 | ||
| 221 | - **返回值** | 221 | - **返回值** |
| 222 | 222 | ||
| 223 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 223 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 224 | 224 | ||
| 225 | ## 约束说明 | 225 | ## 约束说明 |
| 226 | 226 | ||
| @@ -235,7 +235,7 @@ aclnnStatus aclnnUpsampleNearest1dV2( | |||
| 235 | 235 | ||
| 236 | ## 调用示例 | 236 | ## 调用示例 |
| 237 | 237 | ||
| 238 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 238 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 239 | 239 | ||
| 240 | ```Cpp | 240 | ```Cpp |
| 241 | #include <iostream> | 241 | #include <iostream> |
| @@ -33,7 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | ## 函数原型 | 34 | ## 函数原型 |
| 35 | 35 | ||
| 36 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearest2dV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest2dV2”接口执行计算。 | 36 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearest2dV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearest2dV2”接口执行计算。 |
| 37 | 37 | ||
| 38 | ```Cpp | 38 | ```Cpp |
| 39 | aclnnStatus aclnnUpsampleNearest2dV2GetWorkspaceSize( | 39 | aclnnStatus aclnnUpsampleNearest2dV2GetWorkspaceSize( |
| @@ -159,7 +159,7 @@ aclnnStatus aclnnUpsampleNearest2dV2( | |||
| 159 | 159 | ||
| 160 | - **返回值** | 160 | - **返回值** |
| 161 | 161 | ||
| 162 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 162 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 163 | 163 | ||
| 164 | 第一段接口完成入参校验,出现以下场景时报错: | 164 | 第一段接口完成入参校验,出现以下场景时报错: |
| 165 | 165 | ||
| @@ -238,7 +238,7 @@ aclnnStatus aclnnUpsampleNearest2dV2( | |||
| 238 | 238 | ||
| 239 | - **返回值** | 239 | - **返回值** |
| 240 | 240 | ||
| 241 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 241 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 242 | 242 | ||
| 243 | ## 约束说明 | 243 | ## 约束说明 |
| 244 | 244 | ||
| @@ -257,7 +257,7 @@ aclnnStatus aclnnUpsampleNearest2dV2( | |||
| 257 | 257 | ||
| 258 | ## 调用示例 | 258 | ## 调用示例 |
| 259 | 259 | ||
| 260 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 260 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 261 | 261 | ||
| 262 | ```Cpp | 262 | ```Cpp |
| 263 | #include <iostream> | 263 | #include <iostream> |
| @@ -40,7 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | ## 函数原型 | 41 | ## 函数原型 |
| 42 | 42 | ||
| 43 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用`aclnnUpsampleNearest3dGetWorkspaceSize`接口获取入参并根据计算流程计算所需workspace大小,再调用`aclnnUpsampleNearest3d`接口执行计算。 | 43 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用`aclnnUpsampleNearest3dGetWorkspaceSize`接口获取入参并根据计算流程计算所需workspace大小,再调用`aclnnUpsampleNearest3d`接口执行计算。 |
| 44 | 44 | ||
| 45 | ```Cpp | 45 | ```Cpp |
| 46 | aclnnStatus aclnnUpsampleNearest3dGetWorkspaceSize( | 46 | aclnnStatus aclnnUpsampleNearest3dGetWorkspaceSize( |
| @@ -182,7 +182,7 @@ aclnnStatus aclnnUpsampleNearest3d( | |||
| 182 | 182 | ||
| 183 | - **返回值** | 183 | - **返回值** |
| 184 | 184 | ||
| 185 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 185 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 186 | 186 | ||
| 187 | 第一段接口完成入参校验,出现以下场景时报错: | 187 | 第一段接口完成入参校验,出现以下场景时报错: |
| 188 | 188 | ||
| @@ -266,7 +266,7 @@ aclnnStatus aclnnUpsampleNearest3d( | |||
| 266 | 266 | ||
| 267 | - **返回值** | 267 | - **返回值** |
| 268 | 268 | ||
| 269 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 269 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 270 | 270 | ||
| 271 | ## 约束说明 | 271 | ## 约束说明 |
| 272 | 272 | ||
| @@ -289,7 +289,7 @@ aclnnStatus aclnnUpsampleNearest3d( | |||
| 289 | 289 | ||
| 290 | ## 调用示例 | 290 | ## 调用示例 |
| 291 | 291 | ||
| 292 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 292 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 293 | 293 | ||
| 294 | ```Cpp | 294 | ```Cpp |
| 295 | #include <iostream> | 295 | #include <iostream> |
| @@ -64,7 +64,7 @@ | |||
| 64 | 64 | ||
| 65 | ## 函数原型 | 65 | ## 函数原型 |
| 66 | 66 | ||
| 67 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用`aclnnUpsampleNearest3dBackwardGetWorkspaceSize`接口获取入参并根据计算流程计算所需workspace大小,再调用`aclnnUpsampleNearest3dBackward`接口执行计算。 | 67 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用`aclnnUpsampleNearest3dBackwardGetWorkspaceSize`接口获取入参并根据计算流程计算所需workspace大小,再调用`aclnnUpsampleNearest3dBackward`接口执行计算。 |
| 68 | 68 | ||
| 69 | ```Cpp | 69 | ```Cpp |
| 70 | aclnnStatus aclnnUpsampleNearest3dBackwardGetWorkspaceSize( | 70 | aclnnStatus aclnnUpsampleNearest3dBackwardGetWorkspaceSize( |
| @@ -207,7 +207,7 @@ aclnnStatus aclnnUpsampleNearest3dBackward( | |||
| 207 | 207 | ||
| 208 | - **返回值** | 208 | - **返回值** |
| 209 | 209 | ||
| 210 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 210 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 211 | 211 | ||
| 212 | 第一段接口完成入参校验,出现以下场景时报错: | 212 | 第一段接口完成入参校验,出现以下场景时报错: |
| 213 | 213 | ||
| @@ -303,7 +303,7 @@ aclnnStatus aclnnUpsampleNearest3dBackward( | |||
| 303 | 303 | ||
| 304 | - **返回值** | 304 | - **返回值** |
| 305 | 305 | ||
| 306 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 306 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 307 | 307 | ||
| 308 | ## 约束说明 | 308 | ## 约束说明 |
| 309 | 309 | ||
| @@ -342,7 +342,7 @@ aclnnStatus aclnnUpsampleNearest3dBackward( | |||
| 342 | 342 | ||
| 343 | ## 调用示例 | 343 | ## 调用示例 |
| 344 | 344 | ||
| 345 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 345 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 346 | 346 | ||
| 347 | ```Cpp | 347 | ```Cpp |
| 348 | #include <iostream> | 348 | #include <iostream> |
| @@ -40,7 +40,7 @@ | |||
| 40 | 40 | ||
| 41 | ## 函数原型 | 41 | ## 函数原型 |
| 42 | 42 | ||
| 43 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用`aclnnUpsampleNearestExact1dBackwardGetWorkspaceSize`接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearestExact1dBackward`接口执行计算。 | 43 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用`aclnnUpsampleNearestExact1dBackwardGetWorkspaceSize`接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用`aclnnUpsampleNearestExact1dBackward`接口执行计算。 |
| 44 | 44 | ||
| 45 | ```cpp | 45 | ```cpp |
| 46 | aclnnStatus aclnnUpsampleNearestExact1dBackwardGetWorkspaceSize( | 46 | aclnnStatus aclnnUpsampleNearestExact1dBackwardGetWorkspaceSize( |
| @@ -161,7 +161,7 @@ aclnnStatus aclnnUpsampleNearestExact1dBackward( | |||
| 161 | 161 | ||
| 162 | - **返回值** | 162 | - **返回值** |
| 163 | 163 | ||
| 164 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 164 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 165 | 165 | ||
| 166 | 第一段接口完成入参校验,出现以下场景时报错: | 166 | 第一段接口完成入参校验,出现以下场景时报错: |
| 167 | 167 | ||
| @@ -245,7 +245,7 @@ aclnnStatus aclnnUpsampleNearestExact1dBackward( | |||
| 245 | 245 | ||
| 246 | - **返回值** | 246 | - **返回值** |
| 247 | 247 | ||
| 248 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 248 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 249 | 249 | ||
| 250 | ## 约束说明 | 250 | ## 约束说明 |
| 251 | 251 | ||
| @@ -266,7 +266,7 @@ aclnnStatus aclnnUpsampleNearestExact1dBackward( | |||
| 266 | 266 | ||
| 267 | ## 调用示例 | 267 | ## 调用示例 |
| 268 | 268 | ||
| 269 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 269 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 270 | 270 | ||
| 271 | ```cpp | 271 | ```cpp |
| 272 | #include <iostream> | 272 | #include <iostream> |
| @@ -52,7 +52,7 @@ | |||
| 52 | 52 | ||
| 53 | ## 函数原型 | 53 | ## 函数原型 |
| 54 | 54 | ||
| 55 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearestExact2dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearestExact2dBackward”接口执行计算。 | 55 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearestExact2dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleNearestExact2dBackward”接口执行计算。 |
| 56 | 56 | ||
| 57 | ```Cpp | 57 | ```Cpp |
| 58 | aclnnStatus aclnnUpsampleNearestExact2dBackwardGetWorkspaceSize( | 58 | aclnnStatus aclnnUpsampleNearestExact2dBackwardGetWorkspaceSize( |
| @@ -185,7 +185,7 @@ aclnnStatus aclnnUpsampleNearestExact2dBackward( | |||
| 185 | 185 | ||
| 186 | - **返回值** | 186 | - **返回值** |
| 187 | 187 | ||
| 188 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 188 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 189 | 189 | ||
| 190 | 第一段接口完成入参校验,出现以下场景时报错: | 190 | 第一段接口完成入参校验,出现以下场景时报错: |
| 191 | 191 | ||
| @@ -270,7 +270,7 @@ aclnnStatus aclnnUpsampleNearestExact2dBackward( | |||
| 270 | 270 | ||
| 271 | - **返回值** | 271 | - **返回值** |
| 272 | 272 | ||
| 273 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 273 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 274 | 274 | ||
| 275 | ## 约束说明 | 275 | ## 约束说明 |
| 276 | 276 | ||
| @@ -299,7 +299,7 @@ aclnnStatus aclnnUpsampleNearestExact2dBackward( | |||
| 299 | 299 | ||
| 300 | ## 调用示例 | 300 | ## 调用示例 |
| 301 | 301 | ||
| 302 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 302 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 303 | 303 | ||
| 304 | ```Cpp | 304 | ```Cpp |
| 305 | #include <iostream> | 305 | #include <iostream> |
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | ## 函数原型 | 37 | ## 函数原型 |
| 38 | 38 | ||
| 39 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearestExact3dGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearestExact3d”接口执行计算。 | 39 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearestExact3dGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearestExact3d”接口执行计算。 |
| 40 | 40 | ||
| 41 | ```Cpp | 41 | ```Cpp |
| 42 | aclnnStatus aclnnUpsampleNearestExact3dGetWorkspaceSize( | 42 | aclnnStatus aclnnUpsampleNearestExact3dGetWorkspaceSize( |
| @@ -173,7 +173,7 @@ aclnnStatus aclnnUpsampleNearestExact3d( | |||
| 173 | 173 | ||
| 174 | - **返回值** | 174 | - **返回值** |
| 175 | 175 | ||
| 176 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 176 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 177 | 177 | ||
| 178 | 第一段接口完成入参校验,出现以下场景时报错: | 178 | 第一段接口完成入参校验,出现以下场景时报错: |
| 179 | 179 | ||
| @@ -258,7 +258,7 @@ aclnnStatus aclnnUpsampleNearestExact3d( | |||
| 258 | 258 | ||
| 259 | - **返回值** | 259 | - **返回值** |
| 260 | 260 | ||
| 261 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 261 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 262 | 262 | ||
| 263 | ## 约束说明 | 263 | ## 约束说明 |
| 264 | 264 | ||
| @@ -281,7 +281,7 @@ aclnnStatus aclnnUpsampleNearestExact3d( | |||
| 281 | 281 | ||
| 282 | ## 调用示例 | 282 | ## 调用示例 |
| 283 | 283 | ||
| 284 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 284 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 285 | 285 | ||
| 286 | ```Cpp | 286 | ```Cpp |
| 287 | #include <iostream> | 287 | #include <iostream> |
| @@ -64,7 +64,7 @@ | |||
| 64 | 64 | ||
| 65 | ## 函数原型 | 65 | ## 函数原型 |
| 66 | 66 | ||
| 67 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearestExact3dBackward”接口执行计算。 | 67 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnUpsampleNearestExact3dBackward”接口执行计算。 |
| 68 | 68 | ||
| 69 | ```Cpp | 69 | ```Cpp |
| 70 | aclnnStatus aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize( | 70 | aclnnStatus aclnnUpsampleNearestExact3dBackwardGetWorkspaceSize( |
| @@ -208,7 +208,7 @@ aclnnStatus aclnnUpsampleNearestExact3dBackward( | |||
| 208 | 208 | ||
| 209 | - **返回值** | 209 | - **返回值** |
| 210 | 210 | ||
| 211 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 211 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 212 | 212 | ||
| 213 | 第一段接口完成入参校验,出现以下场景时报错: | 213 | 第一段接口完成入参校验,出现以下场景时报错: |
| 214 | 214 | ||
| @@ -308,7 +308,7 @@ aclnnStatus aclnnUpsampleNearestExact3dBackward( | |||
| 308 | 308 | ||
| 309 | - **返回值** | 309 | - **返回值** |
| 310 | 310 | ||
| 311 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 311 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 312 | 312 | ||
| 313 | ## 约束说明 | 313 | ## 约束说明 |
| 314 | 314 | ||
| @@ -361,7 +361,7 @@ aclnnStatus aclnnUpsampleNearestExact3dBackward( | |||
| 361 | 361 | ||
| 362 | ## 调用示例 | 362 | ## 调用示例 |
| 363 | 363 | ||
| 364 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 364 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 365 | 365 | ||
| 366 | ```Cpp | 366 | ```Cpp |
| 367 | #include <iostream> | 367 | #include <iostream> |
| @@ -101,7 +101,7 @@ | |||
| 101 | 101 | ||
| 102 | ## 函数原型 | 102 | ## 函数原型 |
| 103 | 103 | ||
| 104 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnUpsampleTrilinear3dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleTrilinear3dBackward”接口执行计算。 | 104 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnUpsampleTrilinear3dBackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnUpsampleTrilinear3dBackward”接口执行计算。 |
| 105 | 105 | ||
| 106 | ```Cpp | 106 | ```Cpp |
| 107 | aclnnStatus aclnnUpsampleTrilinear3dBackwardGetWorkspaceSize( | 107 | aclnnStatus aclnnUpsampleTrilinear3dBackwardGetWorkspaceSize( |
| @@ -260,7 +260,7 @@ aclnnStatus aclnnUpsampleTrilinear3dBackward( | |||
| 260 | 260 | ||
| 261 | - **返回值** | 261 | - **返回值** |
| 262 | 262 | ||
| 263 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 263 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 264 | 264 | ||
| 265 | 第一段接口完成入参校验,出现以下场景时报错: | 265 | 第一段接口完成入参校验,出现以下场景时报错: |
| 266 | 266 | ||
| @@ -357,7 +357,7 @@ aclnnStatus aclnnUpsampleTrilinear3dBackward( | |||
| 357 | 357 | ||
| 358 | - **返回值** | 358 | - **返回值** |
| 359 | 359 | ||
| 360 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 360 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 361 | 361 | ||
| 362 | ## 约束说明 | 362 | ## 约束说明 |
| 363 | 363 | ||
| @@ -395,7 +395,7 @@ aclnnStatus aclnnUpsampleTrilinear3dBackward( | |||
| 395 | 395 | ||
| 396 | ## 调用示例 | 396 | ## 调用示例 |
| 397 | 397 | ||
| 398 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 398 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 399 | 399 | ||
| 400 | ```Cpp | 400 | ```Cpp |
| 401 | #include <iostream> | 401 | #include <iostream> |
| @@ -19,30 +19,30 @@ | |||
| 19 | 将输入的新的背景图片与已有图片进行融合,通过掩码的方式将背景替换为新的背景。 | 19 | 将输入的新的背景图片与已有图片进行融合,通过掩码的方式将背景替换为新的背景。 |
| 20 | 20 | ||
| 21 | - 计算公式: | 21 | - 计算公式: |
| 22 | - | 22 | + |
| 23 | $$ | 23 | $$ |
| 24 | out = bkg * (1 - mask) + src * mask | 24 | out = bkg * (1 - mask) + src * mask |
| 25 | $$ | 25 | $$ |
| 26 | 26 | ||
| 27 | ## 函数原型 | 27 | ## 函数原型 |
| 28 | 28 | ||
| 29 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnBackgroundReplaceGetWorkspaceSize”接口获取入参并根据流程计算所需workspace大小,再调用“aclnnBackgroundReplace”接口执行计算。 | 29 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnBackgroundReplaceGetWorkspaceSize”接口获取入参并根据流程计算所需workspace大小,再调用“aclnnBackgroundReplace”接口执行计算。 |
| 30 | 30 | ||
| 31 | ```Cpp | 31 | ```Cpp |
| 32 | aclnnStatus aclnnBackgroundReplaceGetWorkspaceSize( | 32 | aclnnStatus aclnnBackgroundReplaceGetWorkspaceSize( |
| 33 | - const aclTensor* bkg, | 33 | + const aclTensor* bkg, |
| 34 | - const aclTensor* src, | 34 | + const aclTensor* src, |
| 35 | - const aclTensor* mask, | 35 | + const aclTensor* mask, |
| 36 | - const aclTensor* out, | 36 | + const aclTensor* out, |
| 37 | - uint64_t* workspaceSize, | 37 | + uint64_t* workspaceSize, |
| 38 | aclOpExecutor** executor) | 38 | aclOpExecutor** executor) |
| 39 | ``` | 39 | ``` |
| 40 | 40 | ||
| 41 | ```Cpp | 41 | ```Cpp |
| 42 | aclnnStatus aclnnBackgroundReplace( | 42 | aclnnStatus aclnnBackgroundReplace( |
| 43 | - void* workspace, | 43 | + void* workspace, |
| 44 | - uint64_t workspaceSize, | 44 | + uint64_t workspaceSize, |
| 45 | - aclOpExecutor* executor, | 45 | + aclOpExecutor* executor, |
| 46 | aclrtStream stream) | 46 | aclrtStream stream) |
| 47 | ``` | 47 | ``` |
| 48 | 48 | ||
| @@ -136,7 +136,7 @@ aclnnStatus aclnnBackgroundReplace( | |||
| 136 | 136 | ||
| 137 | - **返回值** | 137 | - **返回值** |
| 138 | 138 | ||
| 139 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 139 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 140 | 140 | ||
| 141 | 第一段接口完成入参校验,出现以下场景时报错: | 141 | 第一段接口完成入参校验,出现以下场景时报错: |
| 142 | 142 | ||
| @@ -215,7 +215,7 @@ aclnnStatus aclnnBackgroundReplace( | |||
| 215 | 215 | ||
| 216 | - **返回值** | 216 | - **返回值** |
| 217 | 217 | ||
| 218 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 218 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 219 | 219 | ||
| 220 | ## 约束说明 | 220 | ## 约束说明 |
| 221 | 221 | ||
| @@ -224,7 +224,7 @@ aclnnStatus aclnnBackgroundReplace( | |||
| 224 | 224 | ||
| 225 | ## 调用示例 | 225 | ## 调用示例 |
| 226 | 226 | ||
| 227 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 227 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 228 | 228 | ||
| 229 | ```Cpp | 229 | ```Cpp |
| 230 | #include <iostream> | 230 | #include <iostream> |
| @@ -25,30 +25,30 @@ $$ | |||
| 25 | 25 | ||
| 26 | ## 函数原型 | 26 | ## 函数原型 |
| 27 | 27 | ||
| 28 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnBlendImagesCustomGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnBlendImagesCustom”接口执行计算。 | 28 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnBlendImagesCustomGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnBlendImagesCustom”接口执行计算。 |
| 29 | 29 | ||
| 30 | ```Cpp | 30 | ```Cpp |
| 31 | aclnnStatus aclnnBlendImagesCustomGetWorkspaceSize( | 31 | aclnnStatus aclnnBlendImagesCustomGetWorkspaceSize( |
| 32 | - const aclTensor* rgb, | 32 | + const aclTensor* rgb, |
| 33 | - const aclTensor* alpha, | 33 | + const aclTensor* alpha, |
| 34 | - const aclTensor* frame, | 34 | + const aclTensor* frame, |
| 35 | - const aclTensor* out, | 35 | + const aclTensor* out, |
| 36 | - uint64_t* workspaceSize, | 36 | + uint64_t* workspaceSize, |
| 37 | aclOpExecutor** executor) | 37 | aclOpExecutor** executor) |
| 38 | ``` | 38 | ``` |
| 39 | 39 | ||
| 40 | ```Cpp | 40 | ```Cpp |
| 41 | aclnnStatus aclnnBlendImagesCustom( | 41 | aclnnStatus aclnnBlendImagesCustom( |
| 42 | - void* workspace, | 42 | + void* workspace, |
| 43 | - uint64_t workspaceSize, | 43 | + uint64_t workspaceSize, |
| 44 | - aclOpExecutor* executor, | 44 | + aclOpExecutor* executor, |
| 45 | aclrtStream stream) | 45 | aclrtStream stream) |
| 46 | ``` | 46 | ``` |
| 47 | 47 | ||
| 48 | ## aclnnBlendImagesCustomGetWorkspaceSize | 48 | ## aclnnBlendImagesCustomGetWorkspaceSize |
| 49 | 49 | ||
| 50 | - **参数说明** | 50 | - **参数说明** |
| 51 | - | 51 | + |
| 52 | <table class="tg" style="undefined;table-layout: fixed; width: 1409px"><colgroup> | 52 | <table class="tg" style="undefined;table-layout: fixed; width: 1409px"><colgroup> |
| 53 | <col style="width: 233px"> | 53 | <col style="width: 233px"> |
| 54 | <col style="width: 120px"> | 54 | <col style="width: 120px"> |
| @@ -78,7 +78,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 78 | <td class="tg-0pky">-</td> | 78 | <td class="tg-0pky">-</td> |
| 79 | <td class="tg-0pky">UINT8</td> | 79 | <td class="tg-0pky">UINT8</td> |
| 80 | <td class="tg-0pky">ND</td> | 80 | <td class="tg-0pky">ND</td> |
| 81 | - <td class="tg-0pky">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast关系.md">broadcast关系</a>。</td> | 81 | + <td class="tg-0pky">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast_relationship.md">broadcast关系</a>。</td> |
| 82 | <td class="tg-0pky">√</td> | 82 | <td class="tg-0pky">√</td> |
| 83 | </tr> | 83 | </tr> |
| 84 | <tr> | 84 | <tr> |
| @@ -88,7 +88,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 88 | <td class="tg-0pky">-</td> | 88 | <td class="tg-0pky">-</td> |
| 89 | <td class="tg-0pky">UINT8</td> | 89 | <td class="tg-0pky">UINT8</td> |
| 90 | <td class="tg-0pky">ND</td> | 90 | <td class="tg-0pky">ND</td> |
| 91 | - <td class="tg-0pky">HWC(C=1),与rgb满足<a href="../../../docs/zh/context/broadcast关系.md">broadcast关系</a>。</td> | 91 | + <td class="tg-0pky">HWC(C=1),与rgb满足<a href="../../../docs/zh/context/broadcast_relationship.md">broadcast关系</a>。</td> |
| 92 | <td class="tg-0pky">√</td> | 92 | <td class="tg-0pky">√</td> |
| 93 | </tr> | 93 | </tr> |
| 94 | <tr> | 94 | <tr> |
| @@ -98,7 +98,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 98 | <td class="tg-0lax">-</td> | 98 | <td class="tg-0lax">-</td> |
| 99 | <td class="tg-0lax">UINT8</td> | 99 | <td class="tg-0lax">UINT8</td> |
| 100 | <td class="tg-0lax">ND</td> | 100 | <td class="tg-0lax">ND</td> |
| 101 | - <td class="tg-0lax">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast关系.md">broadcast关系</a>。</td> | 101 | + <td class="tg-0lax">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast_relationship.md">broadcast关系</a>。</td> |
| 102 | <td class="tg-0lax">√</td> | 102 | <td class="tg-0lax">√</td> |
| 103 | </tr> | 103 | </tr> |
| 104 | <tr> | 104 | <tr> |
| @@ -135,7 +135,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 135 | 135 | ||
| 136 | - **返回值** | 136 | - **返回值** |
| 137 | 137 | ||
| 138 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 138 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 139 | 139 | ||
| 140 | 第一段接口完成入参校验,出现以下场景时报错: | 140 | 第一段接口完成入参校验,出现以下场景时报错: |
| 141 | 141 | ||
| @@ -208,7 +208,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 208 | 208 | ||
| 209 | - **返回值** | 209 | - **返回值** |
| 210 | 210 | ||
| 211 | - aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 211 | + aclnnStatus: 返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 212 | 212 | ||
| 213 | ## 约束说明 | 213 | ## 约束说明 |
| 214 | 214 | ||
| @@ -217,7 +217,7 @@ aclnnStatus aclnnBlendImagesCustom( | |||
| 217 | 217 | ||
| 218 | ## 调用示例 | 218 | ## 调用示例 |
| 219 | 219 | ||
| 220 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 220 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 221 | 221 | ||
| 222 | ```Cpp | 222 | ```Cpp |
| 223 | #include <iostream> | 223 | #include <iostream> |
| @@ -26,7 +26,7 @@ $$ | |||
| 26 | 26 | ||
| 27 | ## 函数原型 | 27 | ## 函数原型 |
| 28 | 28 | ||
| 29 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnCIoUGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnCIoU”接口执行计算。 | 29 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnCIoUGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnCIoU”接口执行计算。 |
| 30 | 30 | ||
| 31 | ```cpp | 31 | ```cpp |
| 32 | aclnnStatus aclnnCIoUGetWorkspaceSize( | 32 | aclnnStatus aclnnCIoUGetWorkspaceSize( |
| @@ -169,7 +169,7 @@ aclnnStatus aclnnCIoU( | |||
| 169 | 169 | ||
| 170 | - **返回值** | 170 | - **返回值** |
| 171 | 171 | ||
| 172 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 172 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 173 | 173 | ||
| 174 | 第一段接口完成入参校验,出现以下场景时报错: | 174 | 第一段接口完成入参校验,出现以下场景时报错: |
| 175 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 175 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| @@ -262,7 +262,7 @@ aclnnStatus aclnnCIoU( | |||
| 262 | 262 | ||
| 263 | - **返回值** | 263 | - **返回值** |
| 264 | 264 | ||
| 265 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 265 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 266 | 266 | ||
| 267 | ## 约束说明 | 267 | ## 约束说明 |
| 268 | 268 | ||
| @@ -274,7 +274,7 @@ aclnnStatus aclnnCIoU( | |||
| 274 | 274 | ||
| 275 | ## 调用示例 | 275 | ## 调用示例 |
| 276 | 276 | ||
| 277 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 277 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 278 | 278 | ||
| 279 | ```Cpp | 279 | ```Cpp |
| 280 | #include <iostream> | 280 | #include <iostream> |
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | $$ | 21 | $$ |
| 22 | IOU = \frac {Area_3} {Area_1 + Area_2 - Area_3} \\ | 22 | IOU = \frac {Area_3} {Area_1 + Area_2 - Area_3} \\ |
| 23 | - IOF = \frac {Area_3} {Area_2} | 23 | + IOF = \frac {Area_3} {Area_2} |
| 24 | $$ | 24 | $$ |
| 25 | 25 | ||
| 26 | 其中,Area_1为bBox的面积,Area_2为gtBox的面积,Area_3为两者重叠部分面积,x和y的定义见参数说明。 | 26 | 其中,Area_1为bBox的面积,Area_2为gtBox的面积,Area_3为两者重叠部分面积,x和y的定义见参数说明。 |
| @@ -33,25 +33,25 @@ | |||
| 33 | 33 | ||
| 34 | ## 函数原型 | 34 | ## 函数原型 |
| 35 | 35 | ||
| 36 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnIouGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnIou”接口执行计算。 | 36 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnIouGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnIou”接口执行计算。 |
| 37 | 37 | ||
| 38 | ```Cpp | 38 | ```Cpp |
| 39 | aclnnStatus aclnnIouGetWorkspaceSize( | 39 | aclnnStatus aclnnIouGetWorkspaceSize( |
| 40 | - const aclTensor* bBoxes, | 40 | + const aclTensor* bBoxes, |
| 41 | - const aclTensor* gtBoxes, | 41 | + const aclTensor* gtBoxes, |
| 42 | - const char* mode, | 42 | + const char* mode, |
| 43 | - float eps, | 43 | + float eps, |
| 44 | - bool aligned, | 44 | + bool aligned, |
| 45 | - aclTensor* overlap, | 45 | + aclTensor* overlap, |
| 46 | - uint64_t* workspaceSize, | 46 | + uint64_t* workspaceSize, |
| 47 | aclOpExecutor** executor) | 47 | aclOpExecutor** executor) |
| 48 | ``` | 48 | ``` |
| 49 | 49 | ||
| 50 | ```Cpp | 50 | ```Cpp |
| 51 | aclnnStatus aclnnIou( | 51 | aclnnStatus aclnnIou( |
| 52 | - void* workspace, | 52 | + void* workspace, |
| 53 | - uint64_t workspaceSize, | 53 | + uint64_t workspaceSize, |
| 54 | - aclOpExecutor* executor, | 54 | + aclOpExecutor* executor, |
| 55 | aclrtStream stream) | 55 | aclrtStream stream) |
| 56 | ``` | 56 | ``` |
| 57 | 57 | ||
| @@ -167,10 +167,10 @@ aclnnStatus aclnnIou( | |||
| 167 | 167 | ||
| 168 | - **返回值** | 168 | - **返回值** |
| 169 | 169 | ||
| 170 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 170 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 171 | 171 | ||
| 172 | 第一段接口完成入参校验,出现以下场景时报错: | 172 | 第一段接口完成入参校验,出现以下场景时报错: |
| 173 | - | 173 | + |
| 174 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 174 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| 175 | <col style="width: 290px"> | 175 | <col style="width: 290px"> |
| 176 | <col style="width: 134px"> | 176 | <col style="width: 134px"> |
| @@ -268,7 +268,7 @@ aclnnStatus aclnnIou( | |||
| 268 | 268 | ||
| 269 | - **返回值** | 269 | - **返回值** |
| 270 | 270 | ||
| 271 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 271 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 272 | 272 | ||
| 273 | ## 约束说明 | 273 | ## 约束说明 |
| 274 | 274 | ||
| @@ -277,7 +277,7 @@ aclnnStatus aclnnIou( | |||
| 277 | 277 | ||
| 278 | ## 调用示例 | 278 | ## 调用示例 |
| 279 | 279 | ||
| 280 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 280 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 281 | 281 | ||
| 282 | ```c++ | 282 | ```c++ |
| 283 | #include <iostream> | 283 | #include <iostream> |
| @@ -28,23 +28,23 @@ | |||
| 28 | 28 | ||
| 29 | ## 函数原型 | 29 | ## 函数原型 |
| 30 | 30 | ||
| 31 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用"aclnnMrgbaCustomGetWorkspaceSize"接口获取计算所需 | 31 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用"aclnnMrgbaCustomGetWorkspaceSize"接口获取计算所需 |
| 32 | workspace大小以及包含了算子计算流程的执行器,再调用"aclnnMrgbaCustom"接口执行计算。 | 32 | workspace大小以及包含了算子计算流程的执行器,再调用"aclnnMrgbaCustom"接口执行计算。 |
| 33 | 33 | ||
| 34 | ```Cpp | 34 | ```Cpp |
| 35 | aclnnStatus aclnnMrgbaCustomGetWorkspaceSize( | 35 | aclnnStatus aclnnMrgbaCustomGetWorkspaceSize( |
| 36 | const aclTensor* rgb, | 36 | const aclTensor* rgb, |
| 37 | - const aclTensor* alpha, | 37 | + const aclTensor* alpha, |
| 38 | - const aclTensor* out, | 38 | + const aclTensor* out, |
| 39 | uint64_t* workspaceSize, | 39 | uint64_t* workspaceSize, |
| 40 | aclOpExecutor** executor) | 40 | aclOpExecutor** executor) |
| 41 | ``` | 41 | ``` |
| 42 | 42 | ||
| 43 | ```Cpp | 43 | ```Cpp |
| 44 | aclnnStatus aclnnMrgbaCustom( | 44 | aclnnStatus aclnnMrgbaCustom( |
| 45 | - void* workspace, | 45 | + void* workspace, |
| 46 | - uint64_t workspaceSize, | 46 | + uint64_t workspaceSize, |
| 47 | - aclOpExecutor* executor, | 47 | + aclOpExecutor* executor, |
| 48 | aclrtStream stream) | 48 | aclrtStream stream) |
| 49 | ``` | 49 | ``` |
| 50 | 50 | ||
| @@ -81,7 +81,7 @@ aclnnStatus aclnnMrgbaCustom( | |||
| 81 | <td class="tg-0pky">-</td> | 81 | <td class="tg-0pky">-</td> |
| 82 | <td class="tg-0pky">UINT8</td> | 82 | <td class="tg-0pky">UINT8</td> |
| 83 | <td class="tg-0pky">ND</td> | 83 | <td class="tg-0pky">ND</td> |
| 84 | - <td class="tg-0pky">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast关系.md">broadcast关系</a>。</td> | 84 | + <td class="tg-0pky">HWC(C=3),与alpha满足<a href="../../../docs/zh/context/broadcast_relationship.md">broadcast关系</a>。</td> |
| 85 | <td class="tg-0pky">√</td> | 85 | <td class="tg-0pky">√</td> |
| 86 | </tr> | 86 | </tr> |
| 87 | <tr> | 87 | <tr> |
| @@ -91,7 +91,7 @@ aclnnStatus aclnnMrgbaCustom( | |||
| 91 | <td class="tg-0pky">-</td> | 91 | <td class="tg-0pky">-</td> |
| 92 | <td class="tg-0pky">UINT8</td> | 92 | <td class="tg-0pky">UINT8</td> |
| 93 | <td class="tg-0pky">ND</td> | 93 | <td class="tg-0pky">ND</td> |
| 94 | - <td class="tg-0pky">HWC(C=1),与rgb满足<a href="../../../docs/zh/context/broadcast关系.md">broadcast关系</a>。</td> | 94 | + <td class="tg-0pky">HWC(C=1),与rgb满足<a href="../../../docs/zh/context/broadcast_relationship.md">broadcast关系</a>。</td> |
| 95 | <td class="tg-0pky">√</td> | 95 | <td class="tg-0pky">√</td> |
| 96 | </tr> | 96 | </tr> |
| 97 | <tr> | 97 | <tr> |
| @@ -128,7 +128,7 @@ aclnnStatus aclnnMrgbaCustom( | |||
| 128 | 128 | ||
| 129 | - **返回值** | 129 | - **返回值** |
| 130 | 130 | ||
| 131 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 131 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 132 | 132 | ||
| 133 | 第一段接口完成入参校验,出现以下场景时报错: | 133 | 第一段接口完成入参校验,出现以下场景时报错: |
| 134 | 134 | ||
| @@ -201,7 +201,7 @@ aclnnStatus aclnnMrgbaCustom( | |||
| 201 | 201 | ||
| 202 | - **返回值** | 202 | - **返回值** |
| 203 | 203 | ||
| 204 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 204 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 205 | 205 | ||
| 206 | ## 约束说明 | 206 | ## 约束说明 |
| 207 | 207 | ||
| @@ -210,7 +210,7 @@ aclnnStatus aclnnMrgbaCustom( | |||
| 210 | 210 | ||
| 211 | ## 调用示例 | 211 | ## 调用示例 |
| 212 | 212 | ||
| 213 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 213 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 214 | 214 | ||
| 215 | ```Cpp | 215 | ```Cpp |
| 216 | #include <iostream> | 216 | #include <iostream> |
| @@ -35,26 +35,26 @@ | |||
| 35 | 35 | ||
| 36 | ## 函数原型 | 36 | ## 函数原型 |
| 37 | 37 | ||
| 38 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnNonMaxSuppressionGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnNonMaxSuppression”接口执行计算。 | 38 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnNonMaxSuppressionGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnNonMaxSuppression”接口执行计算。 |
| 39 | 39 | ||
| 40 | ```Cpp | 40 | ```Cpp |
| 41 | aclnnStatus aclnnNonMaxSuppressionGetWorkspaceSize( | 41 | aclnnStatus aclnnNonMaxSuppressionGetWorkspaceSize( |
| 42 | - const aclTensor* boxes, | 42 | + const aclTensor* boxes, |
| 43 | - const aclTensor* scores, | 43 | + const aclTensor* scores, |
| 44 | - aclIntArray* maxOutputBoxesPerClass, | 44 | + aclIntArray* maxOutputBoxesPerClass, |
| 45 | - aclFloatArray* iouThreshold, | 45 | + aclFloatArray* iouThreshold, |
| 46 | - aclFloatArray* scoreThreshold, | 46 | + aclFloatArray* scoreThreshold, |
| 47 | - int32_t centerPointBox, | 47 | + int32_t centerPointBox, |
| 48 | - aclTensor* selectedIndices, | 48 | + aclTensor* selectedIndices, |
| 49 | - uint64_t* workspaceSize, | 49 | + uint64_t* workspaceSize, |
| 50 | aclOpExecutor** executor) | 50 | aclOpExecutor** executor) |
| 51 | ``` | 51 | ``` |
| 52 | 52 | ||
| 53 | ```Cpp | 53 | ```Cpp |
| 54 | aclnnStatus aclnnNonMaxSuppression( | 54 | aclnnStatus aclnnNonMaxSuppression( |
| 55 | - void* workspace, | 55 | + void* workspace, |
| 56 | - uint64_t workspaceSize, | 56 | + uint64_t workspaceSize, |
| 57 | - aclOpExecutor* executor, | 57 | + aclOpExecutor* executor, |
| 58 | aclrtStream stream) | 58 | aclrtStream stream) |
| 59 | ``` | 59 | ``` |
| 60 | 60 | ||
| @@ -178,7 +178,7 @@ aclnnStatus aclnnNonMaxSuppression( | |||
| 178 | 178 | ||
| 179 | - **返回码:** | 179 | - **返回码:** |
| 180 | 180 | ||
| 181 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 181 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 182 | 182 | ||
| 183 | 第一段接口完成入参校验,出现以下场景时报错: | 183 | 第一段接口完成入参校验,出现以下场景时报错: |
| 184 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 184 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| @@ -270,7 +270,7 @@ aclnnStatus aclnnNonMaxSuppression( | |||
| 270 | 270 | ||
| 271 | - **返回码:** | 271 | - **返回码:** |
| 272 | 272 | ||
| 273 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 273 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 274 | 274 | ||
| 275 | ## 约束说明 | 275 | ## 约束说明 |
| 276 | 276 | ||
| @@ -281,7 +281,7 @@ aclnnStatus aclnnNonMaxSuppression( | |||
| 281 | 281 | ||
| 282 | ## 调用示例 | 282 | ## 调用示例 |
| 283 | 283 | ||
| 284 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 284 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 285 | 285 | ||
| 286 | ```Cpp | 286 | ```Cpp |
| 287 | #include <iostream> | 287 | #include <iostream> |
| @@ -390,9 +390,9 @@ int main() { | |||
| 390 | 49.1, 32.4, 51.0, 35.9, | 390 | 49.1, 32.4, 51.0, 35.9, |
| 391 | 49.3, 32.9, 51.0, 35.3, | 391 | 49.3, 32.9, 51.0, 35.3, |
| 392 | 49.2, 31.8, 51.0, 35.4, | 392 | 49.2, 31.8, 51.0, 35.4, |
| 393 | - 35.1, 11.5, 39.1, 15.7, | 393 | + 35.1, 11.5, 39.1, 15.7, |
| 394 | 35.6, 11.8, 39.3, 14.2, | 394 | 35.6, 11.8, 39.3, 14.2, |
| 395 | - 35.3, 11.5, 39.9, 14.5, | 395 | + 35.3, 11.5, 39.9, 14.5, |
| 396 | 35.2, 11.7, 39.7, 15.7, | 396 | 35.2, 11.7, 39.7, 15.7, |
| 397 | }; | 397 | }; |
| 398 | std::vector<float> scoresHostData = {0.9, 0.9, 0.5, 0.5, 0.5, 0.4, 0.3}; | 398 | std::vector<float> scoresHostData = {0.9, 0.9, 0.5, 0.5, 0.5, 0.4, 0.3}; |
| @@ -19,28 +19,28 @@ RoiAlign是一种池化层,用于非均匀输入尺寸的特征图,并输出 | |||
| 19 | 19 | ||
| 20 | ## 函数原型 | 20 | ## 函数原型 |
| 21 | 21 | ||
| 22 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiAlignGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlign”接口执行计算。 | 22 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiAlignGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlign”接口执行计算。 |
| 23 | 23 | ||
| 24 | ```Cpp | 24 | ```Cpp |
| 25 | aclnnStatus aclnnRoiAlignGetWorkspaceSize( | 25 | aclnnStatus aclnnRoiAlignGetWorkspaceSize( |
| 26 | - const aclTensor* self, | 26 | + const aclTensor* self, |
| 27 | - const aclTensor* rois, | 27 | + const aclTensor* rois, |
| 28 | - const aclTensor* batchIndices, | 28 | + const aclTensor* batchIndices, |
| 29 | - const char* mode, | 29 | + const char* mode, |
| 30 | - int outputHeight, | 30 | + int outputHeight, |
| 31 | - int outputWidth, | 31 | + int outputWidth, |
| 32 | - int samplingRatio, | 32 | + int samplingRatio, |
| 33 | - float spatialScale, | 33 | + float spatialScale, |
| 34 | - aclTensor* out, | 34 | + aclTensor* out, |
| 35 | - uint64_t* workspaceSize, | 35 | + uint64_t* workspaceSize, |
| 36 | aclOpExecutor** executor) | 36 | aclOpExecutor** executor) |
| 37 | ``` | 37 | ``` |
| 38 | 38 | ||
| 39 | ```Cpp | 39 | ```Cpp |
| 40 | aclnnStatus aclnnRoiAlign( | 40 | aclnnStatus aclnnRoiAlign( |
| 41 | - void* workspace, | 41 | + void* workspace, |
| 42 | - uint64_t workspaceSize, | 42 | + uint64_t workspaceSize, |
| 43 | - aclOpExecutor* executor, | 43 | + aclOpExecutor* executor, |
| 44 | const aclrtStream stream) | 44 | const aclrtStream stream) |
| 45 | ``` | 45 | ``` |
| 46 | 46 | ||
| @@ -184,7 +184,7 @@ aclnnStatus aclnnRoiAlign( | |||
| 184 | 184 | ||
| 185 | - **返回码:** | 185 | - **返回码:** |
| 186 | 186 | ||
| 187 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 187 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 188 | 188 | ||
| 189 | 第一段接口完成入参校验,出现以下场景时报错: | 189 | 第一段接口完成入参校验,出现以下场景时报错: |
| 190 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 190 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| @@ -283,7 +283,7 @@ aclnnStatus aclnnRoiAlign( | |||
| 283 | 283 | ||
| 284 | - **返回码:** | 284 | - **返回码:** |
| 285 | 285 | ||
| 286 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 286 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 287 | 287 | ||
| 288 | ## 约束说明 | 288 | ## 约束说明 |
| 289 | 289 | ||
| @@ -292,7 +292,7 @@ aclnnStatus aclnnRoiAlign( | |||
| 292 | 292 | ||
| 293 | ## 调用示例 | 293 | ## 调用示例 |
| 294 | 294 | ||
| 295 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 295 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 296 | 296 | ||
| 297 | ```Cpp | 297 | ```Cpp |
| 298 | #include <iostream> | 298 | #include <iostream> |
| @@ -19,27 +19,27 @@ RoiAlign是一种池化层,用于非均匀输入尺寸的特征图,并输出 | |||
| 19 | 19 | ||
| 20 | ## 函数原型 | 20 | ## 函数原型 |
| 21 | 21 | ||
| 22 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiAlignV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2”接口执行计算。 | 22 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiAlignV2GetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2”接口执行计算。 |
| 23 | 23 | ||
| 24 | ```Cpp | 24 | ```Cpp |
| 25 | aclnnStatus aclnnRoiAlignV2GetWorkspaceSize( | 25 | aclnnStatus aclnnRoiAlignV2GetWorkspaceSize( |
| 26 | - const aclTensor* self, | 26 | + const aclTensor* self, |
| 27 | - const aclTensor* boxes, | 27 | + const aclTensor* boxes, |
| 28 | - int64_t pooledHeight, | 28 | + int64_t pooledHeight, |
| 29 | - int64_t pooledWidth, | 29 | + int64_t pooledWidth, |
| 30 | - float spatialScale, | 30 | + float spatialScale, |
| 31 | - int64_t samplingRatio, | 31 | + int64_t samplingRatio, |
| 32 | - bool aligned, | 32 | + bool aligned, |
| 33 | - aclTensor* out, | 33 | + aclTensor* out, |
| 34 | - uint64_t* workspaceSize, | 34 | + uint64_t* workspaceSize, |
| 35 | aclOpExecutor** executor) | 35 | aclOpExecutor** executor) |
| 36 | ``` | 36 | ``` |
| 37 | 37 | ||
| 38 | ```Cpp | 38 | ```Cpp |
| 39 | aclnnStatus aclnnRoiAlignV2( | 39 | aclnnStatus aclnnRoiAlignV2( |
| 40 | - void* workspace, | 40 | + void* workspace, |
| 41 | - uint64_t workspaceSize, | 41 | + uint64_t workspaceSize, |
| 42 | - aclOpExecutor* executor, | 42 | + aclOpExecutor* executor, |
| 43 | aclrtStream stream) | 43 | aclrtStream stream) |
| 44 | ``` | 44 | ``` |
| 45 | 45 | ||
| @@ -173,8 +173,8 @@ aclnnStatus aclnnRoiAlignV2( | |||
| 173 | 173 | ||
| 174 | - **返回码:** | 174 | - **返回码:** |
| 175 | 175 | ||
| 176 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 176 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 177 | - | 177 | + |
| 178 | 第一段接口完成入参校验,出现以下场景时报错: | 178 | 第一段接口完成入参校验,出现以下场景时报错: |
| 179 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 179 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| 180 | <col style="width: 290px"> | 180 | <col style="width: 290px"> |
| @@ -248,7 +248,7 @@ aclnnStatus aclnnRoiAlignV2( | |||
| 248 | 248 | ||
| 249 | - **返回码:** | 249 | - **返回码:** |
| 250 | 250 | ||
| 251 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 251 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 252 | 252 | ||
| 253 | ## 约束说明 | 253 | ## 约束说明 |
| 254 | 254 | ||
| @@ -257,7 +257,7 @@ aclnnStatus aclnnRoiAlignV2( | |||
| 257 | 257 | ||
| 258 | ## 调用示例 | 258 | ## 调用示例 |
| 259 | 259 | ||
| 260 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 260 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 261 | 261 | ||
| 262 | ```Cpp | 262 | ```Cpp |
| 263 | #include <iostream> | 263 | #include <iostream> |
| @@ -387,7 +387,7 @@ int main() { | |||
| 387 | uint64_t workspaceSize = 0; | 387 | uint64_t workspaceSize = 0; |
| 388 | aclOpExecutor* executor; | 388 | aclOpExecutor* executor; |
| 389 | // 调用aclnnRoiAlignV2第一段接口 | 389 | // 调用aclnnRoiAlignV2第一段接口 |
| 390 | - ret = aclnnRoiAlignV2GetWorkspaceSize(self, boxes, pooledHeight, pooledWidth, spatialScale, | 390 | + ret = aclnnRoiAlignV2GetWorkspaceSize(self, boxes, pooledHeight, pooledWidth, spatialScale, |
| 391 | samplingRatio, aligned, out, &workspaceSize, &executor); | 391 | samplingRatio, aligned, out, &workspaceSize, &executor); |
| 392 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2GetWorkspaceSize failed. ERROR: %d\n", ret); return ret); | 392 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2GetWorkspaceSize failed. ERROR: %d\n", ret); return ret); |
| 393 | // 根据第一段接口计算出的workspaceSize申请device内存 | 393 | // 根据第一段接口计算出的workspaceSize申请device内存 |
| @@ -19,28 +19,28 @@ | |||
| 19 | 19 | ||
| 20 | ## 函数原型 | 20 | ## 函数原型 |
| 21 | 21 | ||
| 22 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiAlignV2BackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2Backward”接口执行计算。 | 22 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiAlignV2BackwardGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiAlignV2Backward”接口执行计算。 |
| 23 | 23 | ||
| 24 | ```Cpp | 24 | ```Cpp |
| 25 | aclnnStatus aclnnRoiAlignV2BackwardGetWorkspaceSize( | 25 | aclnnStatus aclnnRoiAlignV2BackwardGetWorkspaceSize( |
| 26 | - const aclTensor* gradOutput, | 26 | + const aclTensor* gradOutput, |
| 27 | - const aclTensor* boxes, | 27 | + const aclTensor* boxes, |
| 28 | - const aclIntArray* inputShape, | 28 | + const aclIntArray* inputShape, |
| 29 | - int64_t pooledHeight, | 29 | + int64_t pooledHeight, |
| 30 | - int64_t pooledWidth, | 30 | + int64_t pooledWidth, |
| 31 | - float spatialScale, | 31 | + float spatialScale, |
| 32 | - int64_t samplingRatio, | 32 | + int64_t samplingRatio, |
| 33 | - bool aligned, | 33 | + bool aligned, |
| 34 | - aclTensor* gradInput, | 34 | + aclTensor* gradInput, |
| 35 | - uint64_t* workspaceSize, | 35 | + uint64_t* workspaceSize, |
| 36 | aclOpExecutor** executor) | 36 | aclOpExecutor** executor) |
| 37 | ``` | 37 | ``` |
| 38 | 38 | ||
| 39 | ```Cpp | 39 | ```Cpp |
| 40 | aclnnStatus aclnnRoiAlignV2Backward( | 40 | aclnnStatus aclnnRoiAlignV2Backward( |
| 41 | - void* workspace, | 41 | + void* workspace, |
| 42 | - uint64_t workspaceSize, | 42 | + uint64_t workspaceSize, |
| 43 | - aclOpExecutor* executor, | 43 | + aclOpExecutor* executor, |
| 44 | aclrtStream stream) | 44 | aclrtStream stream) |
| 45 | ``` | 45 | ``` |
| 46 | 46 | ||
| @@ -184,7 +184,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 184 | 184 | ||
| 185 | - **返回码:** | 185 | - **返回码:** |
| 186 | 186 | ||
| 187 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 187 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 188 | 188 | ||
| 189 | 第一段接口完成入参校验,出现以下场景时报错: | 189 | 第一段接口完成入参校验,出现以下场景时报错: |
| 190 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> | 190 | <table style="undefined;table-layout: fixed; width: 1148px"><colgroup> |
| @@ -259,7 +259,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 259 | 259 | ||
| 260 | - **返回码:** | 260 | - **返回码:** |
| 261 | 261 | ||
| 262 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 262 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 263 | 263 | ||
| 264 | ## 约束说明 | 264 | ## 约束说明 |
| 265 | 265 | ||
| @@ -268,7 +268,7 @@ aclnnStatus aclnnRoiAlignV2Backward( | |||
| 268 | 268 | ||
| 269 | ## 调用示例 | 269 | ## 调用示例 |
| 270 | 270 | ||
| 271 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 271 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 272 | 272 | ||
| 273 | ```Cpp | 273 | ```Cpp |
| 274 | #include <iostream> | 274 | #include <iostream> |
| @@ -403,7 +403,7 @@ int main() { | |||
| 403 | uint64_t workspaceSize = 0; | 403 | uint64_t workspaceSize = 0; |
| 404 | aclOpExecutor* executor; | 404 | aclOpExecutor* executor; |
| 405 | // 调用aclnnRoiAlignV2Backward第一段接口 | 405 | // 调用aclnnRoiAlignV2Backward第一段接口 |
| 406 | - ret = aclnnRoiAlignV2BackwardGetWorkspaceSize(gradOutput, boxes, inputShapeArray, pooledHeight, pooledWidth, spatialScale, | 406 | + ret = aclnnRoiAlignV2BackwardGetWorkspaceSize(gradOutput, boxes, inputShapeArray, pooledHeight, pooledWidth, spatialScale, |
| 407 | samplingRatio, aligned, gradInput, &workspaceSize, &executor); | 407 | samplingRatio, aligned, gradInput, &workspaceSize, &executor); |
| 408 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2BackwardGetWorkspaceSize failed. ERROR: %d\n", ret); return ret); | 408 | CHECK_RET(ret == ACL_SUCCESS, LOG_PRINT("aclnnRoiAlignV2BackwardGetWorkspaceSize failed. ERROR: %d\n", ret); return ret); |
| 409 | // 根据第一段接口计算出的workspaceSize申请device内存 | 409 | // 根据第一段接口计算出的workspaceSize申请device内存 |
| @@ -21,9 +21,9 @@ | |||
| 21 | $$ | 21 | $$ |
| 22 | \frac{\partial L}{\partial x_i} = \sum_{r}\sum_{j}[i = i^*(r,j)]\frac{\partial L}{\partial y_{rj}} | 22 | \frac{\partial L}{\partial x_i} = \sum_{r}\sum_{j}[i = i^*(r,j)]\frac{\partial L}{\partial y_{rj}} |
| 23 | $$ | 23 | $$ |
| 24 | - | 24 | + |
| 25 | 其中, | 25 | 其中, |
| 26 | - | 26 | + |
| 27 | $$ | 27 | $$ |
| 28 | [i = i^*(r,j)] = \begin{cases} 1, & i^*(r,j) \geq 1 \\ 0, & otherwise \end{cases} | 28 | [i = i^*(r,j)] = \begin{cases} 1, & i^*(r,j) \geq 1 \\ 0, & otherwise \end{cases} |
| 29 | $$ | 29 | $$ |
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | ## 函数原型 | 33 | ## 函数原型 |
| 34 | 34 | ||
| 35 | -算子执行接口为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnRoiPoolingGradWithArgMax”接口执行计算。 | 35 | +算子执行接口为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize”接口获取入参并根据计算流程计算所需workspace大小,再调用“aclnnRoiPoolingGradWithArgMax”接口执行计算。 |
| 36 | 36 | ||
| 37 | ```cpp | 37 | ```cpp |
| 38 | aclnnStatus aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize( | 38 | aclnnStatus aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize( |
| @@ -49,25 +49,25 @@ aclnnStatus aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize( | |||
| 49 | 49 | ||
| 50 | ```cpp | 50 | ```cpp |
| 51 | aclnnStatus aclnnRoiPoolingGradWithArgMax( | 51 | aclnnStatus aclnnRoiPoolingGradWithArgMax( |
| 52 | - void* workspace, | 52 | + void* workspace, |
| 53 | - uint64_t workspace_size, | 53 | + uint64_t workspace_size, |
| 54 | - aclOpExecutor* executor, | 54 | + aclOpExecutor* executor, |
| 55 | aclrtStream stream) | 55 | aclrtStream stream) |
| 56 | ``` | 56 | ``` |
| 57 | 57 | ||
| 58 | ## aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize | 58 | ## aclnnRoiPoolingGradWithArgMaxGetWorkspaceSize |
| 59 | 59 | ||
| 60 | - **参数说明** | 60 | - **参数说明** |
| 61 | - | 61 | + |
| 62 | - <table style="undefined;table-layout: fixed; width: 1547px"><colgroup> | 62 | + <table style="undefined;table-layout: fixed; width: 1547px"><colgroup> |
| 63 | - <col style="width: 200px"> | 63 | + <col style="width: 200px"> |
| 64 | - <col style="width: 120px"> | 64 | + <col style="width: 120px"> |
| 65 | - <col style="width: 250px"> | 65 | + <col style="width: 250px"> |
| 66 | - <col style="width: 120px"> | 66 | + <col style="width: 120px"> |
| 67 | - <col style="width: 212px"> | 67 | + <col style="width: 212px"> |
| 68 | - <col style="width: 120px"> | 68 | + <col style="width: 120px"> |
| 69 | - <col style="width: 250px"> | 69 | + <col style="width: 250px"> |
| 70 | - <col style="width: 145px"> | 70 | + <col style="width: 145px"> |
| 71 | </colgroup> | 71 | </colgroup> |
| 72 | <thead> | 72 | <thead> |
| 73 | <tr> | 73 | <tr> |
| @@ -174,9 +174,9 @@ aclnnStatus aclnnRoiPoolingGradWithArgMax( | |||
| 174 | </tbody></table> | 174 | </tbody></table> |
| 175 | 175 | ||
| 176 | - **返回值** | 176 | - **返回值** |
| 177 | - | 177 | + |
| 178 | - 返回aclnnStatus状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 178 | + 返回aclnnStatus状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 179 | - | 179 | + |
| 180 | 第一段接口完成入参校验,出现以下场景时报错: | 180 | 第一段接口完成入参校验,出现以下场景时报错: |
| 181 | 181 | ||
| 182 | <table style="undefined;table-layout: fixed; width: 1124px"><colgroup> | 182 | <table style="undefined;table-layout: fixed; width: 1124px"><colgroup> |
| @@ -276,7 +276,7 @@ aclnnStatus aclnnRoiPoolingGradWithArgMax( | |||
| 276 | 276 | ||
| 277 | * **返回值**: | 277 | * **返回值**: |
| 278 | 278 | ||
| 279 | - 返回aclnnStatus状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 279 | + 返回aclnnStatus状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 280 | 280 | ||
| 281 | ## 约束说明 | 281 | ## 约束说明 |
| 282 | 282 | ||
| @@ -296,7 +296,7 @@ aclnnStatus aclnnRoiPoolingGradWithArgMax( | |||
| 296 | 296 | ||
| 297 | ## 调用示例 | 297 | ## 调用示例 |
| 298 | 298 | ||
| 299 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。 | 299 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。 |
| 300 | 300 | ||
| 301 | ```Cpp | 301 | ```Cpp |
| 302 | #include <iostream> | 302 | #include <iostream> |
| @@ -82,7 +82,7 @@ | |||
| 82 | 82 | ||
| 83 | ## 函数原型 | 83 | ## 函数原型 |
| 84 | 84 | ||
| 85 | -每个算子分为[两段式接口](../../../docs/zh/context/两段式接口.md),必须先调用“aclnnRoiPoolingWithArgMaxGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiPoolingWithArgMax”接口执行计算。 | 85 | +每个算子分为[两段式接口](../../../docs/zh/context/two_phase_api.md),必须先调用“aclnnRoiPoolingWithArgMaxGetWorkspaceSize”接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用“aclnnRoiPoolingWithArgMax”接口执行计算。 |
| 86 | 86 | ||
| 87 | ```Cpp | 87 | ```Cpp |
| 88 | aclnnStatus aclnnRoiPoolingWithArgMaxGetWorkspaceSize( | 88 | aclnnStatus aclnnRoiPoolingWithArgMaxGetWorkspaceSize( |
| @@ -237,7 +237,7 @@ aclnnStatus aclnnRoiPoolingWithArgMax( | |||
| 237 | 237 | ||
| 238 | - **返回值** | 238 | - **返回值** |
| 239 | 239 | ||
| 240 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 240 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 241 | 241 | ||
| 242 | 第一段接口完成入参校验,出现以下场景时报错: | 242 | 第一段接口完成入参校验,出现以下场景时报错: |
| 243 | 243 | ||
| @@ -315,7 +315,7 @@ aclnnStatus aclnnRoiPoolingWithArgMax( | |||
| 315 | 315 | ||
| 316 | - **返回值** | 316 | - **返回值** |
| 317 | 317 | ||
| 318 | - aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。 | 318 | + aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn_return_code.md)。 |
| 319 | 319 | ||
| 320 | ## 约束说明 | 320 | ## 约束说明 |
| 321 | 321 | ||
| @@ -325,7 +325,7 @@ aclnnStatus aclnnRoiPoolingWithArgMax( | |||
| 325 | 325 | ||
| 326 | ## 调用示例 | 326 | ## 调用示例 |
| 327 | 327 | ||
| 328 | -示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/编译与运行样例.md)。实际调用时需先通过opgen生成`aclnnop/aclnn_roi_pooling_with_arg_max.h`,若生成的头文件或接口签名不同,请以生成接口为准。 | 328 | +示例代码如下,仅供参考,具体编译和执行过程请参考[编译与运行样例](../../../docs/zh/context/compile_and_run_sample.md)。实际调用时需先通过opgen生成`aclnnop/aclnn_roi_pooling_with_arg_max.h`,若生成的头文件或接口签名不同,请以生成接口为准。 |
| 329 | 329 | ||
| 330 | ```Cpp | 330 | ```Cpp |
| 331 | #include <iostream> | 331 | #include <iostream> |
🟡 Medium Priority
在
docs/zh/context/non_contiguous_tensor.md中,示例1(第10-19行)和示例2(第27-36行)的引用块矩阵行原本每行末尾有两个尾随空格(),这是 Markdown 中的强制换行语法(hard line break,产生<br>),用于将 10 行矩阵数据各行渲染为独立行。此 diff 将所有尾随空格移除后,在标准 Markdown 渲染器(如 GitHub Flavored Markdown)中,连续的引用块行(无空行分隔)会被合并为单个段落。这意味着原本 10 行独立显示的矩阵行将全部合并为一行长段落,矩阵结构完全不可读。
受影响的行:
触发条件:任何使用标准 Markdown 渲染器(GitHub、GitCode、大多数文档平台)查看此文件时即可复现。
修复方案:恢复每行末尾的两个空格(
),或改用 HTML<br>标签,或将每行用空行分隔(但这会改变视觉间距)。建议:在每行末尾恢复两个尾随空格(Markdown hard line break 语法),使矩阵各行独立渲染。示例1第10-19行和示例2第27-36行均需恢复。