| Files | Last commit | Last update |
|---|---|---|
math仓英文合入 Co-authored-by: y60124828<yanglou1@h-partners.com> # message auto-generated for no-merge-commit merge: !6772 merge master into master math仓英文合入 Created-by: yanglu-1 Commit-by: y60124828 Merged-by: cann-robot Description: ## 描述 math仓master分支英文合入 ## 关联的Issue 关联issue:[4170](https://gitcode.com/cann/ops-math/issues/4170) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6772 | 22 days ago | |
支持下一代slice strided_slice算子实现 Co-authored-by: z00940181<zhanghaodong30@huawei.com> # message auto-generated for no-merge-commit merge: !549 merge master into master 支持下一代slice strided_slice算子实现 Created-by: hawdonz Commit-by: z00940181 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!549 | 10 months ago | |
迁移开源TF插件--conversion Co-authored-by: nextyale<yaochen15@huawei.com> # message auto-generated for no-merge-commit merge: !4310 merge transfer-conversion into master 迁移开源TF插件--conversion Created-by: nextyale Commit-by: nextyale Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述:迁移TF插件 See merge request: cann/ops-math!4310 | 2 months ago | |
feat(slice): 适配 ascend960pr(DV122) 平台 Co-authored-by: jzj007<jiangzhijie9@huawei.com> # message auto-generated for no-merge-commit merge: !7291 merge feat/slice-ascend960pr into master feat(slice): 适配 ascend960pr(DV122) 平台 Created-by: jzj007 Commit-by: jzj007 Merged-by: cann-robot Description: ## 描述 新增 Slice 算子在 ascend960pr(DV122,NpuArch = DAV_9202)平台的支持。 主要改动: 1. conversion/slice/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 增加 ascend960pr,对应 tiling 目录复用 arch35。 2. conversion/slice/op_host/slice_def.cpp:新增 AICore().AddConfig("ascend960pr", config91096),复用 ascend960dt 的输入输出定义与动态编译/动态 shape 配置。 3. conversion/slice/op_api/slice.cpp:IsAiCoreSupport 中 DAV_9202 与 DAV_9201 共用同一 AICore 数据类型支持列表。 4. conversion/slice/op_kernel/arch35/*.h(8 个文件):DataCopyPad / DataCopy 的 loopMode 分支条件由 __DAV_920R1__ 扩展为 __DAV_920R1__ || __DAV_920R2__,使 DV122 走带 loopMode 参数的搬运路径。 5. conversion/slice/op_host/config/ascend960pr/slice_binary.json(新增):ascend960pr 的 kernel binary 配置。 6. scripts/kernel/binary_config/ascendc_config.json:Slice 条目的 compute_units 与 compile_options 增加 ascend960pr。 ## 关联的Issue #4665 ## 测试 - [x] slice_binary.json 通过 JSON 格式校验;ascendc_config.json 修改后整体 JSON 解析通过 - [x] ascend960pr 在 cmake/soc_arch_variables.cmake 中映射为 dav_9202,与 slice 声明的 arch35 tiling 目录匹配 - [x] 已通过编译验证(--soc=ascend960pr) - [x] 已完成上板功能/精度验证(ascend960pr 平台) ## 文档更新 无。本次仅新增芯片平台适配,算子接口与功能不变。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7291 | 10 days ago | |
slice strided_slice strided_slice_v3注册补全HIFLOAT4/HIFLOAT4_SCALE类型 Co-authored-by: xiapengcheng5<xiapengcheng5@huawei.com> # message auto-generated for no-merge-commit merge: !6471 merge master into master slice strided_slice strided_slice_v3注册补全HIFLOAT4/HIFLOAT4_SCALE类型 Created-by: xiapengcheng5 Commit-by: xiapengcheng5 Merged-by: cann-robot Description: ## 描述 slice strided_slice strided_slice_v3注册补全HIFLOAT4/HIFLOAT4_SCALE类型 ## 关联的Issue [#3659](https://gitcode.com/cann/ops-math/issues/3659) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 无 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6471 | 1 month ago | |
feat(slice): 适配 ascend960pr(DV122) 平台 Co-authored-by: jzj007<jiangzhijie9@huawei.com> # message auto-generated for no-merge-commit merge: !7291 merge feat/slice-ascend960pr into master feat(slice): 适配 ascend960pr(DV122) 平台 Created-by: jzj007 Commit-by: jzj007 Merged-by: cann-robot Description: ## 描述 新增 Slice 算子在 ascend960pr(DV122,NpuArch = DAV_9202)平台的支持。 主要改动: 1. conversion/slice/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 增加 ascend960pr,对应 tiling 目录复用 arch35。 2. conversion/slice/op_host/slice_def.cpp:新增 AICore().AddConfig("ascend960pr", config91096),复用 ascend960dt 的输入输出定义与动态编译/动态 shape 配置。 3. conversion/slice/op_api/slice.cpp:IsAiCoreSupport 中 DAV_9202 与 DAV_9201 共用同一 AICore 数据类型支持列表。 4. conversion/slice/op_kernel/arch35/*.h(8 个文件):DataCopyPad / DataCopy 的 loopMode 分支条件由 __DAV_920R1__ 扩展为 __DAV_920R1__ || __DAV_920R2__,使 DV122 走带 loopMode 参数的搬运路径。 5. conversion/slice/op_host/config/ascend960pr/slice_binary.json(新增):ascend960pr 的 kernel binary 配置。 6. scripts/kernel/binary_config/ascendc_config.json:Slice 条目的 compute_units 与 compile_options 增加 ascend960pr。 ## 关联的Issue #4665 ## 测试 - [x] slice_binary.json 通过 JSON 格式校验;ascendc_config.json 修改后整体 JSON 解析通过 - [x] ascend960pr 在 cmake/soc_arch_variables.cmake 中映射为 dav_9202,与 slice 声明的 arch35 tiling 目录匹配 - [x] 已通过编译验证(--soc=ascend960pr) - [x] 已完成上板功能/精度验证(ascend960pr 平台) ## 文档更新 无。本次仅新增芯片平台适配,算子接口与功能不变。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7291 | 10 days ago | |
feat(slice): 适配 ascend960pr(DV122) 平台 Co-authored-by: jzj007<jiangzhijie9@huawei.com> # message auto-generated for no-merge-commit merge: !7291 merge feat/slice-ascend960pr into master feat(slice): 适配 ascend960pr(DV122) 平台 Created-by: jzj007 Commit-by: jzj007 Merged-by: cann-robot Description: ## 描述 新增 Slice 算子在 ascend960pr(DV122,NpuArch = DAV_9202)平台的支持。 主要改动: 1. conversion/slice/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 增加 ascend960pr,对应 tiling 目录复用 arch35。 2. conversion/slice/op_host/slice_def.cpp:新增 AICore().AddConfig("ascend960pr", config91096),复用 ascend960dt 的输入输出定义与动态编译/动态 shape 配置。 3. conversion/slice/op_api/slice.cpp:IsAiCoreSupport 中 DAV_9202 与 DAV_9201 共用同一 AICore 数据类型支持列表。 4. conversion/slice/op_kernel/arch35/*.h(8 个文件):DataCopyPad / DataCopy 的 loopMode 分支条件由 __DAV_920R1__ 扩展为 __DAV_920R1__ || __DAV_920R2__,使 DV122 走带 loopMode 参数的搬运路径。 5. conversion/slice/op_host/config/ascend960pr/slice_binary.json(新增):ascend960pr 的 kernel binary 配置。 6. scripts/kernel/binary_config/ascendc_config.json:Slice 条目的 compute_units 与 compile_options 增加 ascend960pr。 ## 关联的Issue #4665 ## 测试 - [x] slice_binary.json 通过 JSON 格式校验;ascendc_config.json 修改后整体 JSON 解析通过 - [x] ascend960pr 在 cmake/soc_arch_variables.cmake 中映射为 dav_9202,与 slice 声明的 arch35 tiling 目录匹配 - [x] 已通过编译验证(--soc=ascend960pr) - [x] 已完成上板功能/精度验证(ascend960pr 平台) ## 文档更新 无。本次仅新增芯片平台适配,算子接口与功能不变。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7291 | 10 days ago | |
日志整改(im2col等算子) Co-authored-by: wow5523<wuao1@huawei.com> # message auto-generated for no-merge-commit merge: !5009 merge log-remediation into master 日志整改(im2col等算子) Created-by: zhu-xun Commit-by: wow5523 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 日志整改(im2col等算子) ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!5009 | 2 months ago | |
feat(slice): 适配 ascend960pr(DV122) 平台 Co-authored-by: jzj007<jiangzhijie9@huawei.com> # message auto-generated for no-merge-commit merge: !7291 merge feat/slice-ascend960pr into master feat(slice): 适配 ascend960pr(DV122) 平台 Created-by: jzj007 Commit-by: jzj007 Merged-by: cann-robot Description: ## 描述 新增 Slice 算子在 ascend960pr(DV122,NpuArch = DAV_9202)平台的支持。 主要改动: 1. conversion/slice/CMakeLists.txt:SUPPORT_COMPUTE_UNIT 增加 ascend960pr,对应 tiling 目录复用 arch35。 2. conversion/slice/op_host/slice_def.cpp:新增 AICore().AddConfig("ascend960pr", config91096),复用 ascend960dt 的输入输出定义与动态编译/动态 shape 配置。 3. conversion/slice/op_api/slice.cpp:IsAiCoreSupport 中 DAV_9202 与 DAV_9201 共用同一 AICore 数据类型支持列表。 4. conversion/slice/op_kernel/arch35/*.h(8 个文件):DataCopyPad / DataCopy 的 loopMode 分支条件由 __DAV_920R1__ 扩展为 __DAV_920R1__ || __DAV_920R2__,使 DV122 走带 loopMode 参数的搬运路径。 5. conversion/slice/op_host/config/ascend960pr/slice_binary.json(新增):ascend960pr 的 kernel binary 配置。 6. scripts/kernel/binary_config/ascendc_config.json:Slice 条目的 compute_units 与 compile_options 增加 ascend960pr。 ## 关联的Issue #4665 ## 测试 - [x] slice_binary.json 通过 JSON 格式校验;ascendc_config.json 修改后整体 JSON 解析通过 - [x] ascend960pr 在 cmake/soc_arch_variables.cmake 中映射为 dav_9202,与 slice 声明的 arch35 tiling 目录匹配 - [x] 已通过编译验证(--soc=ascend960pr) - [x] 已完成上板功能/精度验证(ascend960pr 平台) ## 文档更新 无。本次仅新增芯片平台适配,算子接口与功能不变。 ## 类型标签 - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!7291 | 10 days 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 | 15 days ago |
Slice
English | 简体中文
Product Support Status
| Product | Supported |
|---|---|
| Ascend 950PR&950DT products | √ |
| Atlas A3 products | √ |
| Atlas A2 products | √ |
| Atlas 200I/500 A2 inference products | × |
| Atlas inference products | √ |
| Atlas training products | √ |
Function Description
- Operator function: extracts a slice from a tensor. This operation extracts a slice of "size" from the tensor "x", where the start position is specified by "offsets".
y=x[offsets:offsets+size]y = x[offsets:offsets + size] y=x[offsets:offsets+size]
Parameter Description
| Parameter Name | Input/Output/Attribute | Description | Data Type | Data Format |
|---|---|---|---|---|
| x | Input | Input tensor | INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN | ND |
| offsets | Input | Start position of the slice | INT32, INT64 | ND |
| size | Input | Size of the slice | INT32, INT64 | ND |
| y | Output | Output tensor | INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, FLOAT16, BF16, BOOL, HIFLOAT8, FLOAT8_E5M2, FLOAT8_E4M3FN | ND |
Constraint Description
- For each dimension n of the input x, the following condition must be satisfied: 0 <= offsets[i] <= offsets[i] + size[i] <= x_dim[i] for i in [0,n].
Invocation Description
| Invocation Method | Sample Code | Description |
|---|---|---|
| aclnn invocation | test_aclnn_slice | Invokes the Slice operator through the aclnnSlice API |