| Files | Last commit | Last update |
|---|---|---|
优化多个文件中的代码风格 Co-authored-by: yuantao<taoyuan18@huawei.com> Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> # message auto-generated for no-merge-commit merge: !1295 merge clean into master 优化多个文件中的代码风格 Created-by: yuantao_ Commit-by: init__zhb__;yuantao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 多个文件中的代码风格可以进行改进: | 文件路径 | 代码片段 | 问题描述 | 行号 | | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------- | --- | | conversion/concat_d/op_api/concat_d.cpp | if (tail_dim * type_size[promoteType] % 32 != 0) { | 避免魔法数字 (32) | 54 | | conversion/depth_to_space/examples/test_geir_depth_to_space.cpp | add1.update_output_desc_##outputName(outputName##outputIndex##_desc); | 宏定义无需分号 | 68 | | conversion/depth_to_space/examples/test_geir_depth_to_space.cpp | inputs.push_back(placeholder##intputIndex); | 宏定义无需分号 | 60 | | conversion/depth_to_space/examples/test_geir_depth_to_space.cpp | char *endptr; | 使用std::string替代char* | 202 | | conversion/strided_slice_grad/examples/test_geir_strided_slice_grad.cpp | pData[i] = value + (i % 3) * 0.4f; // 让数据更有意义 | 避免魔法数字 (3) | 126 | | conversion/strided_slice_grad/examples/test_geir_strided_slice_grad.cpp | return 2; | 避免魔法数字 (2) | 109 | | conversion/strided_slice_grad/examples/test_geir_strided_slice_grad.cpp | return 4; | 避免魔法数字 (4) | 107 | | conversion/concat_d/op_api/concat_d.cpp | if (inputs->Size() > 512 \|\| inputs->Size() < 33) { | 避免魔法数字 (512) | 45 | | conversion/concat_d/op_api/concat_d.cpp | catMaxInputSize = 512; | 避免魔法数字 (512) | 92 | | conversion/depth_to_space/examples/test_geir_depth_to_space.cpp | FILE *fp; | 变量应在使用时声明初始化 | 153 | | conversion/depth_to_space/examples/test_geir_depth_to_space.cpp | add1.set_attr_##attrName(attrValue); | 宏定义无需分号 | 63 | | random/dsa_random_uniform/op_host/op_api/aclnn_multinomial.cpp | auto randomUniform = GetRandomUniformNoReplaceMent(selfContiguous, randomParams, uniqueExecutor.get()); | 数组参数应传递长度 (randomParams) | 377 | | conversion/squeezev2/op_host/squeezev2_infershape.cpp | return SqueezeWithAxes(x_shape, squeeze_dims, y_shape); | 数组参数应传递长度 (squeeze_dims) | 114 | | conversion/concat_dv2/op_host/concat_dv2_tiling.cpp | tiling.set_endTensorIdx(endTensorIdx); | 数组参数应传递长度 (endTensorIdx) | 143 | | conversion/squeezev3/op_host/squeezev3_infershape.cpp | return SqueezeWithAxes(x_shape, squeeze_dims, y_shape); | 数组参数应传递长度 (squeeze_dims) | 117 | | conversion/concat_dv2/op_host/concat_dv2_tiling.cpp | tiling.set_endTensorOffset(endTensorOffset); | 数组参数应传递长度 (endTensorOffset) | 144 | | conversion/squeezev2/op_host/squeezev2_infershape.cpp | if (!IsAxesRangeValid(squeeze_dims, static_cast<int64_t>(x_shape->GetDimNum()), axes)) { | 数组参数应传递长度 (squeeze_dims) | 108 | | random/sim_thread_exponential/op_kernel/sim_thread_exponential.h | AscendC::And(..., mask, len / SHIFT_LEFT_32, { 1, 1, 1, 8, | 数组参数应传递长度 (mask) | 567 | | random/dsa_gen_bit_mask/examples/test_dropout_gen_mask.cpp | std::vector<float> outHostData(8, 0); | 避免魔法数字 (8) | 89 | | conversion/diag_v2/examples/test_geir_diag_v2.cpp | char *endptr; | 使用std::string替代char* | 220 | | random/dsa_gen_bit_mask/examples/test_dropout_gen_mask.cpp | std::vector<uint8_t> maskOutHostData(16, 0); | 避免魔法数字 (16) | 90 | | conversion/diag_v2/examples/test_geir_diag_v2.cpp | FILE *fp; | 变量应在使用时声明初始化 | 177 | | conversion/diag_v2/examples/test_geir_diag_v2.cpp | add1.set_attr_##attrName(attrValue); | 宏定义无需分号 | 63 | | conversion/diag_v2/examples/test_geir_diag_v2.cpp | inputs.push_back(placeholder##intputIndex); | 宏定义无需分号 | 60 | | conversion/diag_v2/examples/test_geir_diag_v2.cpp | add1.update_output_desc_##outputName(outputName##outputIndex##_desc); | 宏定义无需分号 | 92 | | conversion/unfold_grad/op_kernel/unfold_grad_final_axe_big_size.h | _(空行)_ | 代码块末尾不应有空行 | 56 | | random/dsa_gen_bit_mask/examples/test_aclnn_dropout_gen_mask_v2_tensor.cpp | std::vector<uint8_t> outHostData(16, 0); | 避免魔法数字 (16) | 93 | | random/dsa_gen_bit_mask/examples/test_dropout.cpp | std::vector<uint8_t> maskOutHostData(16, 0); | 避免魔法数字 (16) | 90 | | random/dsa_gen_bit_mask/examples/test_dropout.cpp | std::vector<float> outHostData(8, 0); | 避免魔法数字 (8) | 89 | | conversion/concat_dv2/op_host/concat_dv2_def.cpp | 0 | 代码块末尾不应有空行 | 45 | | conversion/concat_d/op_api/aclnn_cat.cpp | catMaxInputs = 512; | 避免魔法数字 (512) | 337 | | conversion/clip_by_value_v2/examples/test_aclnn_clamp_max.cpp | std::vector<int8_t> outHostData(8, 0); | 避免魔法数字 (8) | 80 | | random/dsa_gen_bit_mask/examples/test_dropout_gen_mask_v2.cpp | std::vector<uint8_t> outHostData(16, 0); | 避免魔法数字 (16) | 86 | | conversion/broadcast_to/examples/test_geir_broadcast_to.cpp | inputs.push_back(placeholder##intputIndex); | 宏定义无需分号 | 89 | | random/dsa_gen_bit_mask/examples/test_aclnn_bernoulli.cpp | std::vector<float> outHostData(16, 0); | 避免魔法数字 (16) | 89 | | conversion/confusion_transpose_d/examples/test_aclnn_confusion_transpose.cpp | std::vector<float> outHostData(8, 1); | 避免魔法数字 (8) | 116 | | conversion/clip_by_value_v2/examples/test_aclnn_clamp_max_tensor.cpp | std::vector<double> outHostData(8, 0); | 避免魔法数字 (8) | 82 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:清理代码,优化代码风格。 See merge request: cann/ops-math!1295 | 8 months ago | |
concatDV2 内存越界bug修复 Co-authored-by: zhuzemao<zhuzemao1@h-partners.com> # message auto-generated for no-merge-commit merge: !1080 merge concatDv2_modify into master concatDV2 内存越界bug修复 Created-by: zhuzemao Commit-by: zhuzemao Merged-by: cann-robot Description: ## 描述 在同一个核中处理同一个tensor时,inputsize大小应为当前核能处理到的末端偏移减去起始偏移 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/608 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!1080 | 9 months ago | |
修改变量名称blockDim为更符合语义的numBlocks Co-authored-by: songkai111<songkai16@huawei.com> # message auto-generated for no-merge-commit merge: !1044 merge master into master 修改变量名称blockDim为更符合语义的numBlocks Created-by: songkai111 Commit-by: songkai111 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修改变量名称blockDim为更符合语义的numBlocks ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!1044 | 9 months ago | |
新增concatDV2 Co-authored-by: zhuzemao<zhuzemao1@h-partners.com> # message auto-generated for no-merge-commit merge: !959 merge add_concatdv2 into master 新增concatDV2 Created-by: zhuzemao Commit-by: zhuzemao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!959 | 9 months ago | |
产品名变更 Co-authored-by: gitcode-chenjiao<chenjiao31@huawei.com> # message auto-generated for no-merge-commit merge: !5912 merge master into master 产品名变更 Created-by: gitcode-chenjiao Commit-by: gitcode-chenjiao Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> AI处理器对应的产品型号名称更新 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> [#3258](https://gitcode.com/cann/ops-math/issues/3258) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ok ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> *.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!5912 | 1 month ago | |
docs: add English translations for markdown files Co-authored-by: jenny_xiang<jenny.xiang@huawei.com> # message auto-generated for no-merge-commit merge: !7113 merge docs/add-english-translations into master docs: add English translations for markdown files Created-by: jenny_xiang Commit-by: jenny_xiang Merged-by: cann-robot Description: ## 描述 新增仓库Markdown文档英文译稿(第二批,共409个文件):第一批(已合入)之外的其余全部译稿,覆盖conversion、examples、ge、math、random各类算子README译稿,以及CHANGELOG_en.md、.gitcode PR模板英文版等。 本批内全部仓内链接均指向master已有文件(含第一批已合入的21+2篇译稿),合入后本仓432篇英文文档全部就位,链接完整生效。 本批同时包含4篇基于最新源文档的增量更新(math/ada_cast、math/prod_force_se_a、math/sinkhorn、math/xlogy,对应上游近期文档变更)。 ## 关联的Issue 无 ## 测试 文档类变更,无需算子测试;已通过链接有效性校验(本批全部相对链接仅指向master已有文件,无指向本PR外未提交文件的链接),并完成逐篇翻译规范自查与语义校对(含支持状态表、限定词、术语、数值符号核对)。 ## 文档更新 新增409个英文译稿文件(*_en.md / .en-US.md),不修改任何现有文件。 ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7113 | 5 days ago |
ConcatDV2
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | x |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | x |
| Atlas inference products | x |
| Atlas training products | x |
Function Description
- Operator function: concatenates multiple input tensors along the specified dimension, and outputs a tensor containing all input data concatenated in order.
- Computation process:
-
Input:
- Tensor list x[0], x[1],..., x[N-1]
- Concatenation dimension concat_dim
-
Process:
- Check that all input tensors have the same data type;
- Check that all dimensions except concat_dim are identical;
- Concatenate along the concat_dim dimension in sequence: y = ConcatDV2(x[0], x[1], ..., x[N-1], axis = concat_dim)
-
Output: concatenated tensor y
-
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Dynamic input list, which is the input x[i] in the process diagram. | BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, UINT8, INT16, INT8, COMPLEX64, INT64, BOOL | ND |
| concat_dim | Input | Specifies the concatenation dimension, which is concat_dim in the computation process. | INT32, INT64 | ND |
| y | Output | Output y in the computation process. | BFLOAT16, FLOAT16, FLOAT, DOUBLE, INT32, UINT8, INT16, INT8, COMPLEX64, INT64, BOOL | ND |
Constraint Description
- All input tensors must have the same shape except for the concatenation dimension.
- The concatenation dimension concat_dim currently supports only 0.
- All tensors in x must have the same data type.
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| aclnn API | test_aclnn_cat | Invokes the ConcatDV2 operator through the aclnnCat API. |