| 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1136 merge tqbmm into master 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 新增算子TransposeQuantBatchMatMul,支持TBMM的fp8输入,开放aclnn通路和torch单算子直调 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-nn/issues/608 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 二级冒烟,本地自验证 ### 测试用例 int32_t M = 32; int32_t K = 512; int32_t N = 128; int32_t Batch = 16; std::vector<int64_t> x1Shape = {M, Batch, K}; std::vector<int64_t> x2Shape = {Batch, K, N}; std::vector<int64_t> x1ScaleShape = {M}; std::vector<int64_t> x2ScaleShape = {N}; std::vector<int64_t> outShape = {M, Batch, N}; std::vector<int64_t> permX1Series = {1, 0, 2}; std::vector<int64_t> permX2Series = {0, 1, 2}; std::vector<int64_t> permYSeries = {1, 0, 2}; void* x1DeviceAddr = nullptr; void* x2DeviceAddr = nullptr; void* x1ScaleDeviceAddr = nullptr; void* x2ScaleDeviceAddr = nullptr; void* outDeviceAddr = nullptr; aclTensor* x1 = nullptr; aclTensor* x2 = nullptr; aclTensor* x1Scale = nullptr; aclTensor* x2Scale = nullptr; aclTensor* out = nullptr; std::vector<int8_t> x1HostData(GetShapeSize(x1Shape), 0x38); std::vector<int8_t> x2HostData(GetShapeSize(x2Shape), 0x38); std::vector<float> x1ScaleHostData(GetShapeSize(x1ScaleShape), 1); std::vector<float> x2ScaleHostData(GetShapeSize(x2ScaleShape), 1); std::vector<uint16_t> outHostData(GetShapeSize(outShape), 0); // bf16 ### 测试结果 result[65528] is: 512.000000 result[65529] is: 512.000000 result[65530] is: 512.000000 result[65531] is: 512.000000 result[65532] is: 512.000000 result[65533] is: 512.000000 result[65534] is: 512.000000 result[65535] is: 512.000000 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 新增README.md和aclnnTransposeBatchMatMul.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1136 | 6 个月前 |
| tqbmm算子config文件夹改名 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1287 merge tqbmm_950 into master tqbmm算子config文件夹改名 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 对TransposeQuantBatchMatmul算子的json目录进行改名 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/672 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> BIN_GOLD: 99.99824919924352% BIN_REL: DYN_OFF BIN_MEM: OK,OK ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1287 | 6 个月前 |
| TransposeQuantBatchMatmul算子aclnn注释修改 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1937 merge tqbmm_aclnn into 9.0.0-beta.1 TransposeQuantBatchMatmul算子aclnn注释修改 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修改TransposeQuantBatchMatmul算子aclnn注释,修复aclnn描述不正确,芯片名称错误等问题 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/1067 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 仅修改注释和版权声明,无需测试 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1937 | 5 个月前 |
| TransposeQuantBatchMatmul算子aclnn注释修改 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1937 merge tqbmm_aclnn into 9.0.0-beta.1 TransposeQuantBatchMatmul算子aclnn注释修改 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修改TransposeQuantBatchMatmul算子aclnn注释,修复aclnn描述不正确,芯片名称错误等问题 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/1067 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 仅修改注释和版权声明,无需测试 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1937 | 5 个月前 |
| [matmul]socversion整改,增加头文件引用 Co-authored-by: littlemons<yaowenjie7@huawei.com> # message auto-generated for no-merge-commit merge: !1974 merge 9.0.0-beta.1 into 9.0.0-beta.1 [matmul]socversion整改,增加头文件引用 Created-by: littlemons Commit-by: littlemons Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> [matmul]socversion整改,增加头文件引用 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> [#1091](https://gitcode.com/cann/ops-nn/issues/1091) ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 本地编译通过 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1974 | 5 个月前 |
| tqbmm算子config文件夹改名 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1287 merge tqbmm_950 into master tqbmm算子config文件夹改名 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 对TransposeQuantBatchMatmul算子的json目录进行改名 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/672 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> BIN_GOLD: 99.99824919924352% BIN_REL: DYN_OFF BIN_MEM: OK,OK ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1287 | 6 个月前 |
| TransposeQuantBatchMatmul算子aclnn注释修改 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1937 merge tqbmm_aclnn into 9.0.0-beta.1 TransposeQuantBatchMatmul算子aclnn注释修改 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 修改TransposeQuantBatchMatmul算子aclnn注释,修复aclnn描述不正确,芯片名称错误等问题 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/1067 ## 测试 <!--描述进行了哪些测试来验证你的改动。--> 仅修改注释和版权声明,无需测试 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 无 ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1937 | 5 个月前 |
| 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1136 merge tqbmm into master 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 新增算子TransposeQuantBatchMatMul,支持TBMM的fp8输入,开放aclnn通路和torch单算子直调 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-nn/issues/608 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 二级冒烟,本地自验证 ### 测试用例 int32_t M = 32; int32_t K = 512; int32_t N = 128; int32_t Batch = 16; std::vector<int64_t> x1Shape = {M, Batch, K}; std::vector<int64_t> x2Shape = {Batch, K, N}; std::vector<int64_t> x1ScaleShape = {M}; std::vector<int64_t> x2ScaleShape = {N}; std::vector<int64_t> outShape = {M, Batch, N}; std::vector<int64_t> permX1Series = {1, 0, 2}; std::vector<int64_t> permX2Series = {0, 1, 2}; std::vector<int64_t> permYSeries = {1, 0, 2}; void* x1DeviceAddr = nullptr; void* x2DeviceAddr = nullptr; void* x1ScaleDeviceAddr = nullptr; void* x2ScaleDeviceAddr = nullptr; void* outDeviceAddr = nullptr; aclTensor* x1 = nullptr; aclTensor* x2 = nullptr; aclTensor* x1Scale = nullptr; aclTensor* x2Scale = nullptr; aclTensor* out = nullptr; std::vector<int8_t> x1HostData(GetShapeSize(x1Shape), 0x38); std::vector<int8_t> x2HostData(GetShapeSize(x2Shape), 0x38); std::vector<float> x1ScaleHostData(GetShapeSize(x1ScaleShape), 1); std::vector<float> x2ScaleHostData(GetShapeSize(x2ScaleShape), 1); std::vector<uint16_t> outHostData(GetShapeSize(outShape), 0); // bf16 ### 测试结果 result[65528] is: 512.000000 result[65529] is: 512.000000 result[65530] is: 512.000000 result[65531] is: 512.000000 result[65532] is: 512.000000 result[65533] is: 512.000000 result[65534] is: 512.000000 result[65535] is: 512.000000 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 新增README.md和aclnnTransposeBatchMatMul.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1136 | 6 个月前 |
| 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Co-authored-by: jgx12<jingaoxiang@huawei.com> # message auto-generated for no-merge-commit merge: !1136 merge tqbmm into master 新增TransposeQuantBatchMatmul算子,适配transpose+quant_batch_matmul+transpose场景 Created-by: jgx12 Commit-by: jgx12 Merged-by: cann-robot Description: ## 描述 新增算子TransposeQuantBatchMatMul,支持TBMM的fp8输入,开放aclnn通路和torch单算子直调 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> https://gitcode.com/cann/ops-nn/issues/608 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 二级冒烟,本地自验证 ### 测试用例 int32_t M = 32; int32_t K = 512; int32_t N = 128; int32_t Batch = 16; std::vector<int64_t> x1Shape = {M, Batch, K}; std::vector<int64_t> x2Shape = {Batch, K, N}; std::vector<int64_t> x1ScaleShape = {M}; std::vector<int64_t> x2ScaleShape = {N}; std::vector<int64_t> outShape = {M, Batch, N}; std::vector<int64_t> permX1Series = {1, 0, 2}; std::vector<int64_t> permX2Series = {0, 1, 2}; std::vector<int64_t> permYSeries = {1, 0, 2}; void* x1DeviceAddr = nullptr; void* x2DeviceAddr = nullptr; void* x1ScaleDeviceAddr = nullptr; void* x2ScaleDeviceAddr = nullptr; void* outDeviceAddr = nullptr; aclTensor* x1 = nullptr; aclTensor* x2 = nullptr; aclTensor* x1Scale = nullptr; aclTensor* x2Scale = nullptr; aclTensor* out = nullptr; std::vector<int8_t> x1HostData(GetShapeSize(x1Shape), 0x38); std::vector<int8_t> x2HostData(GetShapeSize(x2Shape), 0x38); std::vector<float> x1ScaleHostData(GetShapeSize(x1ScaleShape), 1); std::vector<float> x2ScaleHostData(GetShapeSize(x2ScaleShape), 1); std::vector<uint16_t> outHostData(GetShapeSize(outShape), 0); // bf16 ### 测试结果 result[65528] is: 512.000000 result[65529] is: 512.000000 result[65530] is: 512.000000 result[65531] is: 512.000000 result[65532] is: 512.000000 result[65533] is: 512.000000 result[65534] is: 512.000000 result[65535] is: 512.000000 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 新增README.md和aclnnTransposeBatchMatMul.md ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!1136 | 6 个月前 |