| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
增加FullLoad类样例约束 & 33conv2D约束 Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> # message auto-generated for no-merge-commit merge: !789 merge br.constrains into master 增加FullLoad类样例约束 & 33conv2D约束 Created-by: init__zhb__ Commit-by: init__zhb__ Merged-by: cann-robot Description: ## 描述 增加FullLoad类样例约束,并补充33conv2D约束 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> ## 原因 <!--说明此次改动的目的、解决的问题等,应与类型标签匹配 --> ## 测试 33样例修复前后:  其中左侧为修复前,未拦截精度失败;右侧为修复后,测试拦截。 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!789 | 1 个月前 | |
Complete and refine tile-level unittests. Co-authored-by: init__zhb__<zhanghaobo6@huawei.com> # message auto-generated for no-merge-commit merge: !730 merge ut.dev into master 补充TLA Tile组件UT测试件 Created-by: init__zhb__ Commit-by: init__zhb__ Merged-by: cann-robot Description: ## 描述 补充TLA Tile组件UT测试件。 |数据通路|被测组件|源文件|非TLA 特化数|TLA/Sparse 特化数| |---|---|---|---|---| |**GM→L1**|CopyGmToL1 / GMMPTD / DynamicOptimized / IntervalDataCopy||\~24|10| |**L1→L0A**|CopyL1ToL0A ||10|6| |**L1→L0B**|CopyL1ToL0B ||13|6| |**L0C→GM** |CopyL0CToGm ||7|3| |**GM→UB**|CopyGm2Ub / CopyGm2UbAligned / CopyPerTokenScale2Ub||4|1| |**UB→GM**|CopyUb2Gm / CopyUb2GmAligned||3|1| |**MMAD** |TileMmad||2|2| |**合计**|||**\~63**|**\~27**| - 特别说明:本PR涉及对公共 MakeIntegerSequence的修改,原因在于后续make_index_sequence = MakeIntegerSequence<size_t, N>和make_int_sequence = MakeIntegerSequence<int, N>中涉及int和size_t两种类型,而MakeIntegerSequenceImpl中展开量的类型限定为size_t,GCC/Clang stub 编译阶段严格拒绝了可能的隐式转换。 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> ## 原因 <!--说明此次改动的目的、解决的问题等,应与类型标签匹配 --> ## 测试 ### UT组件通过情况 - Arch2201: bash ... [----------] Global test environment tear-down [==========] 581 tests from 19 test suites ran. (129 ms total) [ PASSED ] 548 tests. [ SKIPPED ] 33 tests, listed below: [ SKIPPED ] CopyGmToL1/TileCopyGmToL1TestAtlasA2.RowMajorTozNTestOneRow_GMMPTD/0 [ SKIPPED ] CopyGmToL1/TileCopyGmToL1TestAtlasA2.RowMajorTozNTestOneRow_GMMPTD/2 ... - Arch3510: bash ... [ RUN ] Ascend950/TypedTileMmadA950Suite.DisableGemvMmad/14 [ OK ] Ascend950/TypedTileMmadA950Suite.DisableGemvMmad/14 (0 ms) [----------] 120 tests from Ascend950/TypedTileMmadA950Suite (2 ms total) [----------] Global test environment tear-down [==========] 383 tests from 20 test suites ran. (32 ms total) [ PASSED ] 383 tests. ### 覆盖率 <span style="color:green">FULL</span> bash Overall coverage rate: lines......: 100.0% (2486 of 2486 lines) functions..: 99.3% (1480 of 1490 functions) Reading tracefile /catlass/build/coverage/coverage.info |Lines |Functions|Branches Filename |Rate Num|Rate Num|Rate Num ================================================================================ [/catlass/include/] catlass/coord.hpp | 100% 17| 100% 23| - 0 catlass/detail/alignment.hpp | 100% 10| 100% 25| - 0 catlass/epilogue/tile/copy_gm_to_ub.hpp | 100% 68| 100% 6| - 0 catlass/epilogue/tile/copy_gm_to_ub_tla.hpp | 100% 19| 100% 2| - 0 catlass/epilogue/tile/copy_ub_to_gm.hpp | 100% 45| 100% 5| - 0 catlass/epilogue/tile/copy_ub_to_gm_tla.hpp | 100% 10| 100% 1| - 0 catlass/gemm/tile/ascend950/copy_gm_to_l1.hpp | 100% 417| 100% 46| - 0 catlass/gemm/tile/ascend950/copy_l0c_to_gm.hpp | 100% 99| 100% 10| - 0 catlass/gemm/tile/ascend950/copy_l0c_to_ub.hpp | 100% 44| 100% 3| - 0 catlass/gemm/tile/ascend950/copy_l1_to_bt.hpp | 100% 12| 100% 4| - 0 catlass/gemm/tile/ascend950/copy_l1_to_l0a.hpp | 100% 98| 100% 16| - 0 catlass/gemm/tile/ascend950/copy_l1_to_l0b.hpp | 100% 162| 100% 20| - 0 catlass/gemm/tile/atlasa2/copy_gm_to_l1.hpp | 100% 611| 100% 68| - 0 catlass/gemm/tile/atlasa2/copy_gm_to_ub.hpp | 100% 12| 100% 2| - 0 catlass/gemm/tile/atlasa2/copy_l0c_to_gm.hpp | 100% 69| 100% 9| - 0 catlass/gemm/tile/atlasa2/copy_l1_to_l0a.hpp | 100% 171| 100% 22| - 0 catlass/gemm/tile/atlasa2/copy_l1_to_l0b.hpp | 100% 219| 100% 26| - 0 catlass/gemm/tile/atlasa2/copy_ub_to_gm.hpp | 100% 11| 100% 2| - 0 catlass/gemm/tile/tile_mmad.hpp | 100% 91| 100% 20| - 0 catlass/layout/matrix.hpp | 100% 139| 100% 63| - 0 catlass/layout/vector.hpp | 100% 5| 100% 3| - 0 catlass/numeric_size.hpp | 100% 2| 100% 1| - 0 tla/int_tuple.hpp | 100% 16| 100% 47| - 0 tla/layout.hpp | 100% 85|99.6% 244| - 0 tla/numeric/integral_constant.hpp | 100% 4| 100% 17| - 0 tla/numeric/math.hpp | 100% 4| 100% 3| - 0 tla/tensor.hpp | 100% 24|99.2% 241| - 0 tla/tuple.hpp | 100% 22|98.8% 561| - 0 ================================================================================ Total:| 100% 2486|99.3% 1k| - 0 [100%] Built target coverage_collect ### 变异测试(部分) 1. src和dst typo错误混杂 Ref bugfix commit: 02d1078 Mutation: diff --- a/include/catlass/gemm/tile/ascend950/copy_l1_to_l0a.hpp +++ b/include/catlass/gemm/tile/ascend950/copy_l1_to_l0a.hpp @@ -626,7 +626,7 @@ struct CopyL1ToL0A<Arch::Ascend950, Gemm::GemmType<Element, layout::nZ, AscendC: const uint32_t L0M = layoutDst.shape(0) * layoutDst.shape(1); const uint32_t L0K = layoutDst.shape(2) * layoutDst.shape(3); const uint32_t srcOuterStrideRow = layoutSrc.stride(1); - const uint32_t dstOuterStrideCol = layoutDst.stride(3); + const uint32_t dstOuterStrideCol = layoutSrc.stride(3); AscendC::LoadData2DParamsV2 loadDataParams; loadDataParams.mStartPosition = 0; Result: <span style="color:green">KILLED</span> bash [ FAILED ] 3 tests, listed below: [ FAILED ] CopyL1ToL0A/TileCopyL1ToL0ATestAscend950.nZTozNTestBasic/0, where GetParam() = 8-byte object <80-00 00-00 40-00 00-00> [ FAILED ] CopyL1ToL0A/TileCopyL1ToL0ATestAscend950.nZTozNTestBasic/2, where GetParam() = 8-byte object <40-00 00-00 2A-00 00-00> [ FAILED ] CopyL1ToL0A/TileCopyL1ToL0ATestAscend950.nZTozNTestBasic/3, where GetParam() = 8-byte object <7B-00 00-00 08-00 00-00> 3 FAILED TESTS 2. 不对齐的情况 Ref bugfix commit: 0439b54e Mutation: diff --- a/include/catlass/gemm/tile/ascend950/copy_l0c_to_ub.hpp +++ b/include/catlass/gemm/tile/ascend950/copy_l0c_to_ub.hpp @@ -148,7 +148,7 @@ struct CopyL0CToUBTla< AscendC::FixpipeParamsC310<AscendC::CO2Layout::ROW_MAJOR> intriParams; // Fixpipe layout information - intriParams.nSize = RoundUp(tla::get<1>(dstTensor.originShape()), 32); // n must be multiple of 32 when split n + intriParams.nSize = tla::get<1>(dstTensor.originShape()); // n must be multiple of 32 when split n intriParams.mSize = tla::get<0>(dstTensor.originShape()); intriParams.srcStride = tla::get<1, 1>(srcTensor.stride()) / tla::get<0, 0>(srcTensor.stride()); intriParams.dstStride = tla::get<0>(dstTensor.stride()); Result: <span style="color:green">KILLED</span> [ FAILED ] 1 test, listed below: [ FAILED ] CopyL0CToUbTlaAscend950/TileCopyL0CToUbTlaAscend950Test.L0CToRowMajorTestSplitN/1, where GetParam() = 8-byte object <41-00 00-00 7F-00 00-00> 1 FAILED TEST 3. 常量错误 Ref bugfix commit: 81e1129e Mutation: diff --- a/include/catlass/gemm/tile/ascend950/copy_l1_to_bt.hpp +++ b/include/catlass/gemm/tile/ascend950/copy_l1_to_bt.hpp @@ -80,7 +80,7 @@ struct CopyL1ToBT<Arch::Ascend950, Catlass::Gemm::GemmType<ElementSrc, layout::V using LayoutDst = layout::VectorLayout; using LayoutSrc = layout::VectorLayout; - static constexpr uint32_t ELE_NUM_PER_C0 = BytesToBits(BYTE_PER_C0) / SizeOfBits<ElementSrc>::value; + static constexpr uint32_t ELE_NUM_PER_C2 = BytesToBits(BYTE_PER_C2) / SizeOfBits<ElementSrc>::value; CATLASS_DEVICE CopyL1ToBT(){} @@ -93,7 +93,7 @@ struct CopyL1ToBT<Arch::Ascend950, Catlass::Gemm::GemmType<ElementSrc, layout::V ){ AscendC::DataCopyParams intriParams; intriParams.blockCount = 1; - intriParams.blockLen = CeilDiv(layoutDst.shape(0), ELE_NUM_PER_C0); + intriParams.blockLen = CeilDiv(layoutDst.shape(0), ELE_NUM_PER_C2); if (sizeof(ElementSrc) == 4) { Result: <span style="color:yellow">SURVIVED</span> <span style="color:green">KILLED</span>(commit:b1d60262) bash [ FAILED ] 6 tests, listed below: [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestHalf/0, where GetParam() = 8-byte object <80-00 00-00 01-00 00-00> [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestHalf/1, where GetParam() = 8-byte object <43-00 00-00 01-00 00-00> [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestHalf/2, where GetParam() = 8-byte object <00-01 00-00 01-00 00-00> [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestFloat/0, where GetParam() = 8-byte object <80-00 00-00 01-00 00-00> [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestFloat/1, where GetParam() = 8-byte object <43-00 00-00 01-00 00-00> [ FAILED ] Ascend950/TypedL1ToBTA950Suite.VectorToVectorTestFloat/2, where GetParam() = 8-byte object <00-01 00-00 01-00 00-00> 6 FAILED TESTS ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/catlass!730 | 1 个月前 |