已合并
matmul: replace include guards with #pragma once in common headers #3501
chenqi317创建于 4月2日
matmul: replace include guards with #pragma once in common headers #3501
已合并
chenqi317创建于 4月2日
296 个文件变更+1294-1679
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_asw_al1_full_load_basic_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_ASW_AL1_FULL_LOAD_BASIC_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_ASW_AL1_FULL_LOAD_BASIC_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"
@@ -40,4 +39,4 @@ protected:
40};39};
41}40}
42}41}
43-#endif // __OP_HOST_BATCH_MATMUL_V3_ASW_AL1_FULL_LOAD_BASIC_TILING_H__42+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_asw_basic_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_ASW_BASIC_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_ASW_BASIC_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20 19 
@@ -45,4 +44,4 @@ protected:
45};44};
46}45}
47}46}
48-#endif // __OP_HOST_BATCH_MATMUL_V3_ASW_BAISC_TILING_H__47+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_asw_bl1_full_load_basic_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_ASW_BL1_FULL_LOAD_BASIC_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_ASW_BL1_FULL_LOAD_BASIC_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"
@@ -40,4 +39,4 @@ protected:
40};39};
41}40}
42}41}
43-#endif // __OP_HOST_BATCH_MATMUL_V3_ASW_BL1_FULL_LOAD_BASIC_TILING_H__42+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_asw_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_ASW_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_ASW_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20 19 
@@ -44,4 +43,4 @@ protected:
44};43};
45}44}
46}45}
47-#endif // __OP_HOST_BATCH_MATMUL_V3_ASW_TILING_H__46+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_common_advanced.h+2-3
@@ -12,8 +12,7 @@
12 * \file batch_matmul_v3_common_advanced.h12 * \file batch_matmul_v3_common_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_BATCH_MATMUL_V3_COMMON_ADVANCED_H__15+#pragma once
16-#define __OP_HOST_BATCH_MATMUL_V3_COMMON_ADVANCED_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"
19 18 
@@ -31,4 +30,4 @@ constexpr uint64_t ND_NZ_DIM_DIFF = 2;
31constexpr uint64_t BATCH_DIM_MAX = 6;30constexpr uint64_t BATCH_DIM_MAX = 6;
32}31}
33}32}
34-#endif // __OP_HOST_BATCH_MATMUL_V3_COMMON_ADVANCED_H__33+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_iterbatch_basicapi_tiling.h+2-3
@@ -14,8 +14,7 @@
14 */14 */
15 15 
16 16 
17-#ifndef __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__17+#pragma once
18-#define __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__
19 18 
20#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
21 20 
@@ -62,4 +61,4 @@ private:
62};61};
63}62}
64}63}
65-#endif // __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__64+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_iterbatch_tiling.h+2-3
@@ -14,8 +14,7 @@
14 */14 */
15 15 
16 16 
17-#ifndef __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__17+#pragma once
18-#define __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__
19 18 
20#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
21 20 
@@ -49,4 +48,4 @@ private:
49};48};
50}49}
51}50}
52-#endif // __OP_HOST_BATCH_MATMUL_V3_ITERBATCH_TILING_H__51+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_k_equal_zero_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \file batch_matmul_v3_k_equal_zero_tiling.h13 * \file batch_matmul_v3_k_equal_zero_tiling.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_K_EQUAL_ZERO_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_K_EQUAL_ZERO_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20 19 
@@ -40,4 +39,4 @@ protected:
40};39};
41} // namespace batch_matmul_v3_advanced40} // namespace batch_matmul_v3_advanced
42} // namespace optiling41} // namespace optiling
43-#endif42+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_matmul2mul_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_MATMUL2MUL_TILING_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_MATMUL2MUL_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20 19 
@@ -38,4 +37,4 @@ protected:
38};37};
39} // namespace batch_matmul_v3_advanced38} // namespace batch_matmul_v3_advanced
40} // namespace optiling39} // namespace optiling
41-#endif40+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_mergebatch_basicapi_tiling.h+2-3
@@ -14,8 +14,7 @@
14 */14 */
15 15 
16 16 
17-#ifndef __OP_HOST_BATCH_MATMUL_V3_MERGEBATCH_TILING_H__17+#pragma once
18-#define __OP_HOST_BATCH_MATMUL_V3_MERGEBATCH_TILING_H__
19 18 
20#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
21 20 
@@ -51,4 +50,4 @@ private:
51};50};
52}51}
53}52}
54-#endif // __OP_HOST_BATCH_MATMUL_V3_MERGEBATCH_TILING_H__53+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_tiling_advanced.h+2-3
@@ -12,8 +12,7 @@
12 * \file batch_matmul_v3_tiling_advanced.h12 * \file batch_matmul_v3_tiling_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_BATCH_MATMUL_V3_TILING_ADVANCED_H__15+#pragma once
16-#define __OP_HOST_BATCH_MATMUL_V3_TILING_ADVANCED_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"
19 18 
@@ -37,4 +36,4 @@ protected:
37};36};
38}37}
39}38}
40-#endif // __OP_HOST_BATCH_MATMUL_V3_TILING_ADVANCED_H__39+ 
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_tiling_key.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_TILING_KEY_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_TILING_KEY_H__
18 17 
19#include <sstream>18#include <sstream>
20#include "op_host/tiling_key.h"19#include "op_host/tiling_key.h"
@@ -29,4 +28,3 @@ public:
29} // namespace matmul_v3_advanced28} // namespace matmul_v3_advanced
30} // namespace optiling29} // namespace optiling
31 30 
32-#endif // __OP_HOST_BATCH_MATMUL_V3_TILING_KEY_H__
Mmatmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_tiling_strategy.h+1-3
@@ -13,8 +13,7 @@
13 * \file batch_matmul_v3_tiling_strategy.h13 * \file batch_matmul_v3_tiling_strategy.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_BATCH_MATMUL_V3_TILING_STRATEGY_H__16+#pragma once
17-#define __OP_HOST_BATCH_MATMUL_V3_TILING_STRATEGY_H__
18 17 
19#include <map>18#include <map>
20#include <vector>19#include <vector>
@@ -58,4 +57,3 @@ inline std::vector<int32_t> GetBatchMatMulV3Priorities(NpuArch NpuArch)
58} // namespace batch_matmul_v3_advanced57} // namespace batch_matmul_v3_advanced
59} // namespace optiling58} // namespace optiling
60 59 
61-#endif // __OP_HOST_BATCH_MATMUL_V3_STRATEGY_H__
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_asw_al1_full_load_kernel_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_asw_al1_full_load_kernel_advanced.h12 * \file batch_mat_mul_v3_asw_al1_full_load_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_ASW_AL1_FULL_LOAD_KERNEL_ADVANCED_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_ASW_AL1_FULL_LOAD_KERNEL_ADVANCED_H
17 16 
18#include "batch_mat_mul_v3_asw_block_advanced.h"17#include "batch_mat_mul_v3_asw_block_advanced.h"
19#include "../../mat_mul_v3/arch35/mat_mul_v3_full_load_kernel_helper.h"18#include "../../mat_mul_v3/arch35/mat_mul_v3_full_load_kernel_helper.h"
@@ -116,4 +115,3 @@ __aicore__ inline void BatchMatMulAswAL1FullLoadKernel<A_TYPE, B_TYPE, C_TYPE, B
116}115}
117}116}
118 117 
119-#endif // BATCH_MAT_MUL_V3_ASW_AL1_FULL_LOAD_KERNEL_ADVANCED_H
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_asw_bl1_full_load_kernel_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_asw_bl1_full_load_kernel_advanced.h12 * \file batch_mat_mul_v3_asw_bl1_full_load_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_ASW_BL1_FULL_LOAD_KERNEL_ADVANCED_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_ASW_BL1_FULL_LOAD_KERNEL_ADVANCED_H
17 16 
18#include "batch_mat_mul_v3_asw_block_advanced.h"17#include "batch_mat_mul_v3_asw_block_advanced.h"
19#include "../../mat_mul_v3/arch35/mat_mul_v3_full_load_kernel_helper.h"18#include "../../mat_mul_v3/arch35/mat_mul_v3_full_load_kernel_helper.h"
@@ -117,4 +116,3 @@ __aicore__ inline void BatchMatMulAswBL1FullLoadKernel<A_TYPE, B_TYPE, C_TYPE, B
117}116}
118}117}
119 118 
120-#endif // BATCH_MAT_MUL_V3_ASW_BL1_FULL_LOAD_KERNEL_ADVANCED_H
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_asw_block_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_asw_block_advanced.h12 * \file batch_mat_mul_v3_asw_block_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MATMUL_V3_ASW_BLOCK_ADVANCED_H15+#pragma once
16-#define BATCH_MATMUL_V3_ASW_BLOCK_ADVANCED_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -278,4 +277,3 @@ __aicore__ inline void BatchMatMulAswBlock::CalcSplitKGMOffset(uint64_t splitKIn
278 277 
279} // namespace BatchMatMulV3Advanced278} // namespace BatchMatMulV3Advanced
280 279 
281-#endif // BATCH_MAT_MUL_V3_ASW_BLOCK_ADVANCED_H
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_asw_kernel_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_asw_kernel_advanced.h12 * \file batch_mat_mul_v3_asw_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_ASW_KERNEL_ADVANCED_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_ASW_KERNEL_ADVANCED_H
17 16 
18#include "batch_mat_mul_v3_asw_block_advanced.h"17#include "batch_mat_mul_v3_asw_block_advanced.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -147,4 +146,3 @@ __aicore__ inline void BatchMatMulAswKernel<A_TYPE, B_TYPE, C_TYPE, BIAS_TYPE, B
147 146 
148} // namespace BatchMatMulV3Advanced147} // namespace BatchMatMulV3Advanced
149 148 
150-#endif // BATCH_MAT_MUL_V3_ASW_KERNEL_ADVANCED_H
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_iterbatch_basicapi_block_scheduler.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef BATCH_MAT_MUL_V3_ITERBATCH_BASICAPI_BLOCK_SCHEDULER_H16+#pragma once
17-#define BATCH_MAT_MUL_V3_ITERBATCH_BASICAPI_BLOCK_SCHEDULER_H
18 17 
19#include "cmct/block/block_scheduler_policy.h"18#include "cmct/block/block_scheduler_policy.h"
20#include "cmct/block/block_scheduler_utils.h"19#include "cmct/block/block_scheduler_utils.h"
@@ -163,4 +162,4 @@ struct BlockSchedulerSelector<
163} // namespace Block162} // namespace Block
164} // namespace Gemm163} // namespace Gemm
165} // namespace Cmct164} // namespace Cmct
166-#endif165+ 
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_iterbatch_basicapi_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_iterbatch_basicapi_cmct.h12 * \file batch_mat_mul_v3_iterbatch_basicapi_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_ITERBATCH_BASICAPI_CMCT_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_ITERBATCH_BASICAPI_CMCT_H
17 16 
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -94,4 +93,4 @@ __aicore__ inline void BatchMatMulActIterBatchKernel(
94 MatmulKernel mm;93 MatmulKernel mm;
95 mm(params);94 mm(params);
96}95}
97-#endif96+ 
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_iterbatch_block_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_iterbatch_block_advanced.h12 * \file batch_mat_mul_v3_iterbatch_block_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MATMUL_V3_ITERBATCH_BLOCK_ADVANCED_H15+#pragma once
16-#define BATCH_MATMUL_V3_ITERBATCH_BLOCK_ADVANCED_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -132,4 +131,3 @@ __aicore__ inline void BatchMatMulMultiBatchBaseBlock::CalcGMOffset()
132}131}
133}132}
134 133 
135-#endif // BATCH_MATMUL_V3_ITERBATCH_BLOCK_ADVANCED_H
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_iterbatch_kernel_advanced.h+2-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_iterbatch_kernel_advanced.h12 * \file batch_mat_mul_v3_iterbatch_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_ITERBATCH_KERNEL_ADVANCED_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_ITERBATCH_KERNEL_ADVANCED_H
17 16 
18#include "batch_mat_mul_v3_iterbatch_block_advanced.h"17#include "batch_mat_mul_v3_iterbatch_block_advanced.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -137,4 +136,4 @@ __aicore__ inline void BatchMatMulMultiBatchKernel<A_TYPE, B_TYPE, C_TYPE, BIAS_
137 mm_.SetHF32(false, 0);136 mm_.SetHF32(false, 0);
138}137}
139}138}
140-#endif // BATCH_MAT_MUL_V3_ITERBATCH_KERNEL_ADVANCED_H139+ 
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_matmul2mul_block_scheduler.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef BATCH_MAT_MUL_V3_MATMUL2MUL_BLOCK_SCHEDULER_H16+#pragma once
17-#define BATCH_MAT_MUL_V3_MATMUL2MUL_BLOCK_SCHEDULER_H
18 17 
19#include "cmct/block/block_scheduler_policy.h"18#include "cmct/block/block_scheduler_policy.h"
20#include "cmct/block/block_scheduler_utils.h"19#include "cmct/block/block_scheduler_utils.h"
@@ -75,4 +74,3 @@ struct BlockSchedulerSelector<
75} // namespace Gemm74} // namespace Gemm
76} // namespace Cmct75} // namespace Cmct
77 76 
78-#endif
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_matmul2mul_cmct.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef BATCH_MAT_MUL_V3_MATMUL2MUL_CMCT_H16+#pragma once
17-#define BATCH_MAT_MUL_V3_MATMUL2MUL_CMCT_H
18 17 
19#include "cmct/block/block_scheduler_policy.h"18#include "cmct/block/block_scheduler_policy.h"
20#include "cmct/block/block_scheduler_utils.h"19#include "cmct/block/block_scheduler_utils.h"
@@ -73,4 +72,4 @@ __aicore__ inline void BatchMatMulToMulActKernel(
73 BatchMatmulKernel bmm;72 BatchMatmulKernel bmm;
74 bmm(params);73 bmm(params);
75}74}
76-#endif75+ 
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_mergebatch_basicapi_block_scheduler.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef BATCH_MAT_MUL_V3_MERGEBATCH_BASICAPI_BLOCK_SCHEDULER_H16+#pragma once
17-#define BATCH_MAT_MUL_V3_MERGEBATCH_BASICAPI_BLOCK_SCHEDULER_H
18 17 
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
20#include "cmct/block/block_scheduler_policy.h"19#include "cmct/block/block_scheduler_policy.h"
@@ -191,4 +190,4 @@ struct BlockSchedulerSelector<
191} // namespace Block190} // namespace Block
192} // namespace Gemm191} // namespace Gemm
193} // namespace Act192} // namespace Act
194-#endif193+ 
Mmatmul/batch_mat_mul_v3/op_kernel/arch35/batch_mat_mul_v3_mergebatch_basicapi_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file batch_mat_mul_v3_mergebatch_basicapi_cmct.h12 * \file batch_mat_mul_v3_mergebatch_basicapi_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef BATCH_MAT_MUL_V3_MERGEBATCH_BASICAPI_CMCT_H15+#pragma once
16-#define BATCH_MAT_MUL_V3_MERGEBATCH_BASICAPI_CMCT_H
17#include "cmct/kernel/kernel_matmul_merge_batch.h"16#include "cmct/kernel/kernel_matmul_merge_batch.h"
18#include "batch_mat_mul_v3_mergebatch_basicapi_block_scheduler.h"17#include "batch_mat_mul_v3_mergebatch_basicapi_block_scheduler.h"
19using namespace Cmct;18using namespace Cmct;
@@ -66,4 +65,4 @@ __aicore__ inline void BatchMatMulActMergeBatchKernel(GM_ADDR aGM, GM_ADDR bGM,
66 MatmulKernel mm;65 MatmulKernel mm;
67 mm(params);66 mm(params);
68}67}
69-#endif68+ 
Mmatmul/common/cmct/block/block_batch_matmul_to_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_BATCH_MATMUL_TO_MUL_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_BATCH_MATMUL_TO_MUL_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -320,4 +319,4 @@ private:
320} // namespace Block319} // namespace Block
321} // namespace Gemm320} // namespace Gemm
322} // namespace Cmct321} // namespace Cmct
323-#endif322+ 
Mmatmul/common/cmct/block/block_mmad.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad.h12 * \file block_mmad.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_H
17 16 
18#include <type_traits>17#include <type_traits>
19#include "../utils/arch.h"18#include "../utils/arch.h"
@@ -105,4 +104,4 @@ public:
105} // namespace Cmct104} // namespace Cmct
106#include "block_mmad_a_prefetch_b_prologue.h"105#include "block_mmad_a_prefetch_b_prologue.h"
107#include "block_mmad_b_prologue_mx.h"106#include "block_mmad_b_prologue_mx.h"
108-#endif107+ 
Mmatmul/common/cmct/block/block_mmad_a8w8_fixpipe_quant.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef BLOCK_MMAD_A8W8_FIXPIPE_QUANT_H16+#pragma once
17-#define BLOCK_MMAD_A8W8_FIXPIPE_QUANT_H
18#include "../policy/dispatch_policy.h"17#include "../policy/dispatch_policy.h"
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
20#include "../utils/layout_utils.h"19#include "../utils/layout_utils.h"
@@ -689,4 +688,4 @@ private:
689}688}
690}689}
691}690}
692-#endif691+ 
Mmatmul/common/cmct/block/block_mmad_a_prefetch_b_prologue.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_BLOCK_BLOCK_MMAD_A_PREFETCH_B_PROLOGUE_H16+#pragma once
17-#define CMCT_BLOCK_BLOCK_MMAD_A_PREFETCH_B_PROLOGUE_H
18 17 
19#include "../utils/constant.h"18#include "../utils/constant.h"
20#include "../utils/gemm_type.h"19#include "../utils/gemm_type.h"
@@ -503,4 +502,4 @@ private:
503 AscendC::LocalTensor<BiasL1TensorTrait> biasL1_;502 AscendC::LocalTensor<BiasL1TensorTrait> biasL1_;
504};503};
505} // namespace Cmct::Gemm::Block504} // namespace Cmct::Gemm::Block
506-#endif505+ 
Mmatmul/common/cmct/block/block_mmad_b_prologue_mx.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_BLOCK_BLOCK_MMAD_B_PROLOGUE_MX_H16+#pragma once
17-#define CMCT_BLOCK_BLOCK_MMAD_B_PROLOGUE_MX_H
18 17 
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
20#include "../utils/gemm_type.h"19#include "../utils/gemm_type.h"
@@ -699,4 +698,4 @@ private:
699 static constexpr TEventID eventIdsFixToM_[2] = {0, 1};698 static constexpr TEventID eventIdsFixToM_[2] = {0, 1};
700};699};
701} // namespace Cmct::Gemm::Block700} // namespace Cmct::Gemm::Block
702-#endif701+ 
Mmatmul/common/cmct/block/block_mmad_builder.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MATMUL_BUILDER_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MATMUL_BUILDER_H
18 17 
19#include <type_traits>18#include <type_traits>
20 19 
@@ -169,4 +168,4 @@ public:
169} // namespace Block168} // namespace Block
170} // namespace Gemm169} // namespace Gemm
171} // namespace Cmct170} // namespace Cmct
172-#endif171+ 
Mmatmul/common/cmct/block/block_mmad_iterbatch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MMAD_ITERBATCH_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MMAD_ITERBATCH_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -540,4 +539,4 @@ private:
540} // namespace Block539} // namespace Block
541} // namespace Gemm540} // namespace Gemm
542} // namespace Cmct541} // namespace Cmct
543-#endif542+ 
Mmatmul/common/cmct/block/block_mmad_mergebatch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MMAD_MERGEBATCH_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MMAD_MERGEBATCH_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -404,4 +403,4 @@ private:
404} // namespace Block403} // namespace Block
405} // namespace Gemm404} // namespace Gemm
406} // namespace Cmct405} // namespace Cmct
407-#endif406+ 
Mmatmul/common/cmct/block/block_mmad_multi_block_bias.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad_multi_block_bias.h12 * \file block_mmad_multi_block_bias.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_MULTI_BLOCK_BIAS_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_MULTI_BLOCK_BIAS_H
17 16 
18#include "lib/matmul/matmul.h"17#include "lib/matmul/matmul.h"
19#include "lib/matmul/tiling.h"18#include "lib/matmul/tiling.h"
@@ -117,4 +116,4 @@ private:
117} // namespace Block116} // namespace Block
118} // namespace Gemm117} // namespace Gemm
119} // namespace Cmct118} // namespace Cmct
120-#endif119+ 
Mmatmul/common/cmct/block/block_mmad_multi_block_with_layout.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MMAD_MULTI_BLOCK_WITH_LAYOUT_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MMAD_MULTI_BLOCK_WITH_LAYOUT_H
18 17 
19#include "lib/matmul/matmul.h"18#include "lib/matmul/matmul.h"
20#include "lib/matmul/tiling.h"19#include "lib/matmul/tiling.h"
@@ -106,4 +105,4 @@ private:
106} // namespace Block105} // namespace Block
107} // namespace Gemm106} // namespace Gemm
108} // namespace Cmct107} // namespace Cmct
109-#endif108+ 
Mmatmul/common/cmct/block/block_mmad_mx.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_MMAD_MX_QUANT_H16+#pragma once
17-#define MATMUL_BLOCK_MMAD_MX_QUANT_H
18#include "../utils/layout_utils.h"17#include "../utils/layout_utils.h"
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
20#include "../utils/quant_batch_matmul_constant.h"19#include "../utils/quant_batch_matmul_constant.h"
@@ -851,4 +850,4 @@ private:
851} // namespace Block850} // namespace Block
852} // namespace Gemm851} // namespace Gemm
853} // namespace Cmct852} // namespace Cmct
854-#endif853+ 
Mmatmul/common/cmct/block/block_mmad_pertile.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad_pertile.h12 * \file block_mmad_pertile.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_PERTILE_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_PERTILE_H
17 16 
18#include "../policy/dispatch_policy.h"17#include "../policy/dispatch_policy.h"
19#include "../tile/tile_copy.h"18#include "../tile/tile_copy.h"
@@ -476,4 +475,4 @@ __aicore__ inline BlockMmadPertile<QBMM_BLOCK_MMAD_PERTILE_FUNC_LOCAL_PARAMS>::~
476} // namespace Block475} // namespace Block
477} // namespace Gemm476} // namespace Gemm
478} // namespace Cmct477} // namespace Cmct
479-#endif478+ 
Mmatmul/common/cmct/block/block_mmad_pertile_param.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MMAD_PERTILE_PARAM_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MMAD_PERTILE_PARAM_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -259,4 +258,3 @@ MatMulCommonParam<aTrans, bTrans>::LoadData2dParamsB(AscendC::LoadData2DParamsV2
259} // namespace Gemm258} // namespace Gemm
260} // namespace Cmct259} // namespace Cmct
261 260 
262-#endif
Mmatmul/common/cmct/block/block_mmad_pingpong_without_que.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_MMAD_PINGPONG_WITHOUT_QUE_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_MMAD_PINGPONG_WITHOUT_QUE_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
20#include "../utils/layout_utils.h"19#include "../utils/layout_utils.h"
@@ -1018,4 +1017,4 @@ private:
1018} // namespace Block1017} // namespace Block
1019} // namespace Gemm1018} // namespace Gemm
1020} // namespace Cmct1019} // namespace Cmct
1021-#endif1020+ 
Mmatmul/common/cmct/block/block_mmad_streamk.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef INCLUDE_MATMUL_BLOCK_BLOCK_MMAD_STREAMK_H16+#pragma once
17-#define INCLUDE_MATMUL_BLOCK_BLOCK_MMAD_STREAMK_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -463,4 +462,4 @@ private:
463} // namespace Block462} // namespace Block
464} // namespace Gemm463} // namespace Gemm
465} // namespace Cmct464} // namespace Cmct
466-#endif465+ 
Mmatmul/common/cmct/block/block_mmad_to_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_TO_MUL_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_TO_MUL_H
18#include "./block_mmad.h"17#include "./block_mmad.h"
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -273,4 +272,4 @@ private:
273} // namespace Block272} // namespace Block
274} // namespace Gemm273} // namespace Gemm
275} // namespace Cmct274} // namespace Cmct
276-#endif275+ 
Mmatmul/common/cmct/block/block_mmad_utils.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad_utils.h12 * \file block_mmad_utils.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_UTILS_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_UTILS_H
17 16 
18#include <type_traits>17#include <type_traits>
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
@@ -249,4 +248,4 @@ struct GetL0CAndBtType {
249} // namespace Block248} // namespace Block
250} // namespace Gemm249} // namespace Gemm
251} // namespace Cmct250} // namespace Cmct
252-#endif251+ 
Mmatmul/common/cmct/block/block_mmad_with_layout.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad_with_layout.h12 * \file block_mmad_with_layout.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_WITH_LAYOUT_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_WITH_LAYOUT_H
17 16 
18#include <type_traits>17#include <type_traits>
19#include "../utils/layout_utils.h"18#include "../utils/layout_utils.h"
@@ -157,4 +156,4 @@ private:
157} // namespace Block156} // namespace Block
158} // namespace Gemm157} // namespace Gemm
159} // namespace Cmct158} // namespace Cmct
160-#endif159+ 
Mmatmul/common/cmct/block/block_mmad_with_params.h+2-3
@@ -12,8 +12,7 @@
12 * \file block_mmad_with_params.h12 * \file block_mmad_with_params.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_BLOCK_BLOCK_MMAD_WITH_PARAMS_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_MMAD_WITH_PARAMS_H
17 16 
18#include <type_traits>17#include <type_traits>
19#include "./block_mmad.h"18#include "./block_mmad.h"
@@ -112,4 +111,4 @@ public:
112} // namespace Block111} // namespace Block
113} // namespace Gemm112} // namespace Gemm
114} // namespace Cmct113} // namespace Cmct
115-#endif114+ 
Mmatmul/common/cmct/block/block_scheduler_iterateK.h+2-3
@@ -12,8 +12,7 @@
12 * \brief12 * \brief
13 */13 */
14 14 
15-#ifndef MATMUL_BLOCK_BLOCK_SCHEDULER_ITERATEK_H15+#pragma once
16-#define MATMUL_BLOCK_BLOCK_SCHEDULER_ITERATEK_H
17 16 
18#include "./block_scheduler_utils.h"17#include "./block_scheduler_utils.h"
19#include "./block_scheduler_policy.h"18#include "./block_scheduler_policy.h"
@@ -126,4 +125,4 @@ struct BlockSchedulerSelector<ProblemShape_, L1TileShape_, L0TileShape_, Cmct::G
126} // namespace Block125} // namespace Block
127} // namespace Gemm126} // namespace Gemm
128} // namespace Cmct127} // namespace Cmct
129-#endif128+ 
Mmatmul/common/cmct/block/block_scheduler_policy.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_SCHEDULER_POLICY_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_SCHEDULER_POLICY_H
18 17 
19namespace Cmct {18namespace Cmct {
20namespace Gemm {19namespace Gemm {
@@ -37,4 +36,4 @@ struct QuantBatchMatmulV3Scheduler {
37struct BuiltInMulScheduler {};36struct BuiltInMulScheduler {};
38} // namespace Gemm37} // namespace Gemm
39} // namespace Cmct38} // namespace Cmct
40-#endif39+ 
Mmatmul/common/cmct/block/block_scheduler_qbmm.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_QBMM_BLOCK_SCHEDULER_H16+#pragma once
17-#define CMCT_QBMM_BLOCK_SCHEDULER_H
18 17 
19#include "./block_scheduler_utils.h"18#include "./block_scheduler_utils.h"
20#include "./block_scheduler_policy.h"19#include "./block_scheduler_policy.h"
@@ -322,4 +321,4 @@ struct BlockSchedulerSelector<ProblemShape_, L1TileShape_, L0TileShape_, Cmct::G
322} // namespace Block321} // namespace Block
323} // namespace Gemm322} // namespace Gemm
324} // namespace Cmct323} // namespace Cmct
325-#endif324+ 
Mmatmul/common/cmct/block/block_scheduler_swizzle_in_mn_core.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_MATMUL_BLOCK_BLOCK_SCHEDULER_SWIZZLE_IN_MN_CORE_H16+#pragma once
17-#define CMCT_INCLUDE_MATMUL_BLOCK_BLOCK_SCHEDULER_SWIZZLE_IN_MN_CORE_H
18 17 
19#include <cstdint>18#include <cstdint>
20 19 
@@ -129,4 +128,4 @@ private:
129} // namespace Block128} // namespace Block
130} // namespace Gemm129} // namespace Gemm
131} // namespace Cmct130} // namespace Cmct
132-#endif131+ 
Mmatmul/common/cmct/block/block_scheduler_tail_resplit_expanded.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef BLOCK_SCHEDULER_TAIL_RESPLIT_EXPANDED_H10+#pragma once
11-#define BLOCK_SCHEDULER_TAIL_RESPLIT_EXPANDED_H
12 11 
13#include "../utils/tuple_utils.h"12#include "../utils/tuple_utils.h"
14#include "../utils/device_utils.h"13#include "../utils/device_utils.h"
@@ -108,4 +107,4 @@ public:
108 uint64_t n2Tile;107 uint64_t n2Tile;
109};108};
110} // namespace Cmct::Gemm::Block109} // namespace Cmct::Gemm::Block
111-#endif110+ 
Mmatmul/common/cmct/block/block_scheduler_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_BLOCK_SCHEDULER_UTILS_H16+#pragma once
17-#define MATMUL_BLOCK_BLOCK_SCHEDULER_UTILS_H
18#include "../utils/common_utils.h"17#include "../utils/common_utils.h"
19#include "../utils/status_utils.h"18#include "../utils/status_utils.h"
20#include "../utils/host_utils.h"19#include "../utils/host_utils.h"
@@ -137,4 +136,4 @@ __host_aicore__ static Status DoCheckArgs(const ProblemShape_ &shape, int64_t l1
137} // namespace Block136} // namespace Block
138} // namespace Gemm137} // namespace Gemm
139} // namespace Cmct138} // namespace Cmct
140-#endif139+ 
Mmatmul/common/cmct/block/matmul_impl_traits.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_BLOCK_MATMUL_IMPL_TRAITS_H16+#pragma once
17-#define MATMUL_BLOCK_MATMUL_IMPL_TRAITS_H
18 17 
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
20#include "../utils/tuple_utils.h"19#include "../utils/tuple_utils.h"
@@ -213,4 +212,4 @@ using MatmulImplTraitsT = typename MatmulImplTraits<
213} // namespace Block212} // namespace Block
214} // namespace Gemm213} // namespace Gemm
215} // namespace Cmct214} // namespace Cmct
216-#endif215+ 
Mmatmul/common/cmct/epilogue/block_epilogue.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_BLOCK_EPILOGUE_H16+#pragma once
17-#define EPILOGUE_BLOCK_EPILOGUE_H
18#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)17#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -174,4 +173,4 @@ public:
174} // namespace Gemm173} // namespace Gemm
175} // namespace Cmct174} // namespace Cmct
176#endif // EPILOGUE_BLOCK_EPILOGUE_H175#endif // EPILOGUE_BLOCK_EPILOGUE_H
177-#endif176+ 
Mmatmul/common/cmct/epilogue/block_epilogue_cv.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_BLOCK_EPILOGUE_CV_H16+#pragma once
17-#define EPILOGUE_BLOCK_EPILOGUE_CV_H
18#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)17#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -160,4 +159,4 @@ public:
160} // namespace Gemm159} // namespace Gemm
161} // namespace Cmct160} // namespace Cmct
162#endif // EPILOGUE_BLOCK_EPILOGUE_H161#endif // EPILOGUE_BLOCK_EPILOGUE_H
163-#endif162+ 
Mmatmul/common/cmct/epilogue/block_epilogue_elementwise.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_EPILOGUE_BLOCK_EPILOGUE_ELEMENTWISE_H16+#pragma once
17-#define EPILOGUE_EPILOGUE_BLOCK_EPILOGUE_ELEMENTWISE_H
18#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)17#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -164,4 +163,4 @@ public:
164} // namespace Gemm163} // namespace Gemm
165} // namespace Cmct164} // namespace Cmct
166#endif // EPILOGUE_BLOCK_EPILOGUE_H165#endif // EPILOGUE_BLOCK_EPILOGUE_H
167-#endif166+ 
Mmatmul/common/cmct/epilogue/block_epilogue_empty.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_BLOCK_EPILOGUE_EMPTY_H16+#pragma once
17-#define EPILOGUE_BLOCK_EPILOGUE_EMPTY_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -79,4 +78,4 @@ public:
79} // namespace Block78} // namespace Block
80} // namespace Gemm79} // namespace Gemm
81} // namespace Cmct80} // namespace Cmct
82-#endif81+ 
Mmatmul/common/cmct/epilogue/block_epilogue_fixpipe.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_FIXPIPE_H16+#pragma once
17-#define CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_FIXPIPE_H
18#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)17#if defined(__NPU_ARCH__) && (__NPU_ARCH__ == 3510)
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -132,4 +131,4 @@ public:
132} // namespace Gemm131} // namespace Gemm
133} // namespace Cmct132} // namespace Cmct
134#endif // CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_FIXPIPE_H133#endif // CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_FIXPIPE_H
135-#endif134+ 
Mmatmul/common/cmct/epilogue/block_epilogue_iterbatch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_ITERBATCH_H16+#pragma once
17-#define CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_ITERBATCH_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -238,4 +237,4 @@ private:
238} // namespace Block237} // namespace Block
239} // namespace Gemm238} // namespace Gemm
240} // namespace Cmct239} // namespace Cmct
241-#endif240+ 
Mmatmul/common/cmct/epilogue/block_epilogue_pertile.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_BLOCK_EPILOGUE_PERTILE_H16+#pragma once
17-#define EPILOGUE_BLOCK_EPILOGUE_PERTILE_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -890,4 +889,4 @@ __aicore__ inline void BlockEpiloguePertile<QBMM_BLOCK_EPILOGUE_PERTILE_FUNC_LOC
890} // namespace Block889} // namespace Block
891} // namespace Gemm890} // namespace Gemm
892} // namespace Cmct891} // namespace Cmct
893-#endif // EPILOGUE_BLOCK_EPILOGUE_PERTILE_H892+ 
Mmatmul/common/cmct/epilogue/block_epilogue_streamk.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_STREAMK_H16+#pragma once
17-#define CMCT_INCLUDE_EPILOGUE_BLOCK_EPILOGUE_STREAMK_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -271,4 +270,4 @@ private:
271} // namespace Block270} // namespace Block
272} // namespace Gemm271} // namespace Gemm
273} // namespace Cmct272} // namespace Cmct
274-#endif273+ 
Mmatmul/common/cmct/epilogue/fusion/default_fusion_op.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_FUSION_DEFAULT_FUSION_OP_H16+#pragma once
17-#define EPILOGUE_FUSION_DEFAULT_FUSION_OP_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -60,4 +59,4 @@ public:
60} // namespace Block59} // namespace Block
61} // namespace Gemm60} // namespace Gemm
62} // namespace Cmct61} // namespace Cmct
63-#endif // EPILOGUE_FUSION_DEFAULT_FUSION_OP_H62+ 
Mmatmul/common/cmct/epilogue/fusion/fusion_add.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_FUSION_EPILOGUE_FUSION_ADD_H16+#pragma once
17-#define EPILOGUE_FUSION_EPILOGUE_FUSION_ADD_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -129,4 +128,4 @@ public:
129} // namespace Block128} // namespace Block
130} // namespace Gemm129} // namespace Gemm
131} // namespace Cmct130} // namespace Cmct
132-#endif // EPILOGUE_FUSION_EPILOGUE_FUSION_ADD_H131+ 
Mmatmul/common/cmct/epilogue/fusion/fusion_gelu.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_FUSION_FUSION_GELU_H16+#pragma once
17-#define EPILOGUE_FUSION_FUSION_GELU_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#include "math/erf.h"19#include "math/erf.h"
@@ -116,4 +115,4 @@ public:
116} // namespace Block115} // namespace Block
117} // namespace Gemm116} // namespace Gemm
118} // namespace Cmct117} // namespace Cmct
119-#endif // CMCT_INCLUDE_EPILOGUE_FUSION_GELU_OP_H118+ 
Mmatmul/common/cmct/epilogue/fusion/fusion_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef EPILOGUE_FUSION_FUSION_MUL_H16+#pragma once
17-#define EPILOGUE_FUSION_FUSION_MUL_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -94,4 +93,4 @@ public:
94} // namespace Block93} // namespace Block
95} // namespace Gemm94} // namespace Gemm
96} // namespace Cmct95} // namespace Cmct
97-#endif // CMCT_INCLUDE_EPILOGUE_FUSION_MUL_OP_H96+ 
Mmatmul/common/cmct/kernel/kernel_batch_matmul_to_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_BATCH_MATMUL_TO_MUL_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_BATCH_MATMUL_TO_MUL_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -246,4 +245,4 @@ public:
246} // namespace Kernel245} // namespace Kernel
247} // namespace Gemm246} // namespace Gemm
248} // namespace Cmct247} // namespace Cmct
249-#endif248+ 
Mmatmul/common/cmct/kernel/kernel_matmul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -245,4 +244,4 @@ public:
245} // namespace Kernel244} // namespace Kernel
246} // namespace Gemm245} // namespace Gemm
247} // namespace Cmct246} // namespace Cmct
248-#endif247+ 
Mmatmul/common/cmct/kernel/kernel_matmul_a_prefetch_b_antiquant.h+1-3
@@ -12,8 +12,7 @@
12 * \file kernel_matmul_a_prefetch_b_antiquant.h12 * \file kernel_matmul_a_prefetch_b_antiquant.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef KERNEL_MATMUL_A_PREFETCH_B_ANTIQUANT_H15+#pragma once
16-#define KERNEL_MATMUL_A_PREFETCH_B_ANTIQUANT_H
17 16 
18#include "../utils/integral_constant.h"17#include "../utils/integral_constant.h"
19#include "../utils/tuple_utils.h"18#include "../utils/tuple_utils.h"
@@ -215,4 +214,3 @@ private:
215};214};
216} // namespace Cmct::Gemm::Kernel215} // namespace Cmct::Gemm::Kernel
217 216 
218-#endif
Mmatmul/common/cmct/kernel/kernel_matmul_iterbatch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_ITERBATCH_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_ITERBATCH_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -320,4 +319,4 @@ public:
320} // namespace Kernel319} // namespace Kernel
321} // namespace Gemm320} // namespace Gemm
322} // namespace Cmct321} // namespace Cmct
323-#endif322+ 
Mmatmul/common/cmct/kernel/kernel_matmul_merge_batch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_MERGE_BATCH_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_MERGE_BATCH_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -230,4 +229,4 @@ public:
230} // namespace Kernel229} // namespace Kernel
231} // namespace Gemm230} // namespace Gemm
232} // namespace Cmct231} // namespace Cmct
233-#endif232+ 
Mmatmul/common/cmct/kernel/kernel_matmul_mix.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_MIX_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_MIX_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -312,4 +311,4 @@ public:
312} // namespace Kernel311} // namespace Kernel
313} // namespace Gemm312} // namespace Gemm
314} // namespace Cmct313} // namespace Cmct
315-#endif314+ 
Mmatmul/common/cmct/kernel/kernel_matmul_mix_fixpipe_opti.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_MATMUL_KERNEL_KERNEL_MATMUL_MIX_FIXPIPE_OPTI_H16+#pragma once
17-#define CMCT_INCLUDE_MATMUL_KERNEL_KERNEL_MATMUL_MIX_FIXPIPE_OPTI_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -325,4 +324,4 @@ public:
325} // namespace Kernel324} // namespace Kernel
326} // namespace Gemm325} // namespace Gemm
327} // namespace Cmct326} // namespace Cmct
328-#endif327+ 
Mmatmul/common/cmct/kernel/kernel_matmul_mix_with_weight_prologue.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_KERNEL_KERNEL_MATMUL_MIX_WITH_WEIGHT_PRELOGUE_H16+#pragma once
17-#define CMCT_KERNEL_KERNEL_MATMUL_MIX_WITH_WEIGHT_PRELOGUE_H
18#include "../utils/common_utils.h"17#include "../utils/common_utils.h"
19#include "../utils/coord_utils.h"18#include "../utils/coord_utils.h"
20#include "../utils/layout_utils.h"19#include "../utils/layout_utils.h"
@@ -150,4 +149,4 @@ private:
150} // namespace Kernel149} // namespace Kernel
151} // namespace Gemm150} // namespace Gemm
152} // namespace Cmct151} // namespace Cmct
153-#endif152+ 
Mmatmul/common/cmct/kernel/kernel_matmul_mix_without_que.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_MIX_WITHOUT_QUE_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_MIX_WITHOUT_QUE_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -271,4 +270,4 @@ public:
271} // namespace Kernel270} // namespace Kernel
272} // namespace Gemm271} // namespace Gemm
273} // namespace Cmct272} // namespace Cmct
274-#endif273+ 
Mmatmul/common/cmct/kernel/kernel_matmul_streamk.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_MATMUL_KERNEL_KERNEL_MATMUL_STREAMK_H16+#pragma once
17-#define CMCT_INCLUDE_MATMUL_KERNEL_KERNEL_MATMUL_STREAMK_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -326,4 +325,4 @@ public:
326} // namespace Kernel325} // namespace Kernel
327} // namespace Gemm326} // namespace Gemm
328} // namespace Cmct327} // namespace Cmct
329-#endif328+ 
Mmatmul/common/cmct/kernel/kernel_matmul_to_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_MN_EQUAL_ONE_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_MN_EQUAL_ONE_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -249,4 +248,4 @@ public:
249} // namespace Kernel248} // namespace Kernel
250} // namespace Gemm249} // namespace Gemm
251} // namespace Cmct250} // namespace Cmct
252-#endif251+ 
Mmatmul/common/cmct/kernel/kernel_matmul_without_que.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_MATMUL_WITHOUT_QUE_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_MATMUL_WITHOUT_QUE_H
18 17 
19#define ASCENDC_CUBE_ONLY18#define ASCENDC_CUBE_ONLY
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -293,4 +292,4 @@ public:
293} // namespace Kernel292} // namespace Kernel
294} // namespace Gemm293} // namespace Gemm
295} // namespace Cmct294} // namespace Cmct
296-#endif295+ 
Mmatmul/common/cmct/kernel/kernel_qbmm_cube.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_QBMM_CUBE_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_QBMM_CUBE_H
18#include "kernel_operator_intf.h"17#include "kernel_operator_intf.h"
19 18 
20#include "../block/block_scheduler_qbmm.h"19#include "../block/block_scheduler_qbmm.h"
@@ -326,4 +325,3 @@ __aicore__ inline void QuantMmBatchCube<QBMM_CUBE_KERNEL_FUN_TEM_PARAMS>::Proces
326} // namespace Gemm325} // namespace Gemm
327} // namespace Cmct326} // namespace Cmct
328 327 
329-#endif
Mmatmul/common/cmct/kernel/kernel_qbmm_mx.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_QBMM_MX_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_QBMM_MX_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -352,4 +351,3 @@ __aicore__ inline void QuantMmBatchMX<QBMM_MX_KERNEL_FUN_TEM_PARAMS>::ProcessSin
352} // namespace Gemm351} // namespace Gemm
353} // namespace Cmct352} // namespace Cmct
354 353 
355-#endif
Mmatmul/common/cmct/kernel/kernel_qbmm_pertile.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_KERNEL_KERNEL_QBMM_PERTILE_H16+#pragma once
17-#define MATMUL_KERNEL_KERNEL_QBMM_PERTILE_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -413,4 +412,3 @@ __aicore__ inline void QuantMmBatchPertile<QBMM_PERTILE_KERNEL_FUN_TEM_PARAMS>::
413} // namespace Gemm412} // namespace Gemm
414} // namespace Cmct413} // namespace Cmct
415 414 
416-#endif
Mmatmul/common/cmct/policy/dispatch_policy.h+2-3
@@ -12,8 +12,7 @@
12 * \file dispatch_policy.h12 * \file dispatch_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_POLICY_DISPATCH_POLICY_H15+#pragma once
16-#define MATMUL_POLICY_DISPATCH_POLICY_H
17 16 
18#include "../utils/arch.h"17#include "../utils/arch.h"
19#include "../utils/common_utils.h"18#include "../utils/common_utils.h"
@@ -330,4 +329,4 @@ struct MatmulToMul {
330 329 
331} // namespace Gemm330} // namespace Gemm
332} // namespace Cmct331} // namespace Cmct
333-#endif332+ 
Mmatmul/common/cmct/prologue/block_prologue.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_PROLOGUE_BLOCK_PROLOGUE_H16+#pragma once
17-#define CMCT_INCLUDE_PROLOGUE_BLOCK_PROLOGUE_H
18namespace Cmct::Prologue {17namespace Cmct::Prologue {
19template <class DispatchPolicy, class... Args>18template <class DispatchPolicy, class... Args>
20class BlockPrologue {19class BlockPrologue {
@@ -24,4 +23,4 @@ class BlockPrologue {
24 23 
25#include "block_prologue_b_antiquant_scmc_nd_kn.h"24#include "block_prologue_b_antiquant_scmc_nd_kn.h"
26#include "block_prologue_b_antiquant_scmc_nd_nk_nz_kn.h"25#include "block_prologue_b_antiquant_scmc_nd_nk_nz_kn.h"
27-#endif26+ 
Mmatmul/common/cmct/prologue/block_prologue_b_antiquant_scmc_nd_kn.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_BLOCK_BLOCK_PROLOGUE_B_ANTIQUANT_SCMC_ND_KN_H10+#pragma once
11-#define PROLOGUE_BLOCK_BLOCK_PROLOGUE_B_ANTIQUANT_SCMC_ND_KN_H
12#include "../tile/tile_copy_if.h"11#include "../tile/tile_copy_if.h"
13#include "../utils/arch.h"12#include "../utils/arch.h"
14#include "../utils/math_utils.h"13#include "../utils/math_utils.h"
@@ -474,4 +473,4 @@ private:
474 static constexpr QuantType ANTIQUANT_TYPE = QUANT_TYPE<decltype(LayoutScale{}.GetShape()), ElementScale>;473 static constexpr QuantType ANTIQUANT_TYPE = QUANT_TYPE<decltype(LayoutScale{}.GetShape()), ElementScale>;
475};474};
476} // namespace Cmct::Prologue475} // namespace Cmct::Prologue
477-#endif476+ 
Mmatmul/common/cmct/prologue/block_prologue_b_antiquant_scmc_nd_nk_nz_kn.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_BLOCK_BLOCK_PROLOGUE_B_ANTIQUANT_SCMC_ND_NK_NZ_KN_H10+#pragma once
11-#define PROLOGUE_BLOCK_BLOCK_PROLOGUE_B_ANTIQUANT_SCMC_ND_NK_NZ_KN_H
12#include "../tile/tile_copy_if.h"11#include "../tile/tile_copy_if.h"
13#include "../utils/arch.h"12#include "../utils/arch.h"
14#include "../utils/constant.h"13#include "../utils/constant.h"
@@ -656,4 +655,4 @@ private:
656 AscendC::LocalTensor<UbScaleAfterCastTensorTrait> ubScaleAfterCast_;655 AscendC::LocalTensor<UbScaleAfterCastTensorTrait> ubScaleAfterCast_;
657};656};
658} // namespace Cmct::Prologue657} // namespace Cmct::Prologue
659-#endif658+ 
Mmatmul/common/cmct/prologue/block_prologue_b_cast_scsc.h+1-3
@@ -12,8 +12,7 @@
12 * \file block_prologue_b_cast_scsc.h12 * \file block_prologue_b_cast_scsc.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef CMCT_INCLUDE_PROLOGUE_BLOCK_PROLOGUE_B_CAST_SCSC_H15+#pragma once
16-#define CMCT_INCLUDE_PROLOGUE_BLOCK_PROLOGUE_B_CAST_SCSC_H
17 16 
18#include "../utils/common_utils.h"17#include "../utils/common_utils.h"
19#include "../utils/integral_constant.h"18#include "../utils/integral_constant.h"
@@ -698,4 +697,3 @@ private:
698};697};
699} // namespace Cmct::Prologue698} // namespace Cmct::Prologue
700 699 
701-#endif
Mmatmul/common/cmct/prologue/constant.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_CONSTANT_H10+#pragma once
11-#define PROLOGUE_CONSTANT_H
12 11 
13#if ASC_DEVKIT_MAJOR >= 912#if ASC_DEVKIT_MAJOR >= 9
14#include "kernel_basic_intf.h"13#include "kernel_basic_intf.h"
@@ -61,4 +60,4 @@ template <typename Dst, typename Src = Dst>
61constexpr uint32_t VECTOR_REG_SIZE = detail::VectorRegSize<60constexpr uint32_t VECTOR_REG_SIZE = detail::VectorRegSize<
62 typename AscendC::Std::remove_cvref_t<Dst>, typename AscendC::Std::remove_cvref_t<Src>>::VALUE;61 typename AscendC::Std::remove_cvref_t<Dst>, typename AscendC::Std::remove_cvref_t<Src>>::VALUE;
63} // namespace Cmct::Prologue62} // namespace Cmct::Prologue
64-#endif63+ 
Mmatmul/common/cmct/prologue/dispatch_policy.h+1-3
@@ -12,8 +12,7 @@
12 * \file dispatch_policy.h12 * \file dispatch_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef CMCT_INCLUDE_PROLOGUE_DISPATCH_POLICY_H15+#pragma once
16-#define CMCT_INCLUDE_PROLOGUE_DISPATCH_POLICY_H
17 16 
18#include "../utils/constant.h"17#include "../utils/constant.h"
19 18 
@@ -62,4 +61,3 @@ struct BAntiquantScmc {
62};61};
63} // namespace Cmct::Prologue62} // namespace Cmct::Prologue
64 63 
65-#endif
Mmatmul/common/cmct/prologue/tile/antiquant_nd_kn.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_TILE_ANTIQUANT_ND_KN_H10+#pragma once
11-#define PROLOGUE_TILE_ANTIQUANT_ND_KN_H
12#include "../../utils/underscore.h"11#include "../../utils/underscore.h"
13#if ASC_DEVKIT_MAJOR >= 912#if ASC_DEVKIT_MAJOR >= 9
14#include "kernel_basic_intf.h"13#include "kernel_basic_intf.h"
@@ -387,4 +386,4 @@ struct AntiquantImpl<
387 386 
388} // namespace detail387} // namespace detail
389} // namespace Cmct::Prologue::Tile388} // namespace Cmct::Prologue::Tile
390-#endif389+ 
Mmatmul/common/cmct/prologue/tile/antiquant_nd_nk.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_TILE_ANTIQUANT_ND_NK_H10+#pragma once
11-#define PROLOGUE_TILE_ANTIQUANT_ND_NK_H
12#if ASC_DEVKIT_MAJOR >= 911#if ASC_DEVKIT_MAJOR >= 9
13#include "kernel_basic_intf.h"12#include "kernel_basic_intf.h"
14#else13#else
@@ -486,4 +485,4 @@ struct AntiquantImpl<
486 485 
487} // namespace detail486} // namespace detail
488} // namespace Cmct::Prologue::Tile487} // namespace Cmct::Prologue::Tile
489-#endif488+ 
Mmatmul/common/cmct/prologue/tile/antiquant_zn.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_TILE_ANTIQUANT_ZN_H10+#pragma once
11-#define PROLOGUE_TILE_ANTIQUANT_ZN_H
12#include "../../utils/constant.h"11#include "../../utils/constant.h"
13#include "../../utils/underscore.h"12#include "../../utils/underscore.h"
14#if ASC_DEVKIT_MAJOR >= 913#if ASC_DEVKIT_MAJOR >= 9
@@ -486,4 +485,4 @@ private:
486};485};
487} // namespace detail486} // namespace detail
488} // namespace Cmct::Prologue::Tile487} // namespace Cmct::Prologue::Tile
489-#endif488+ 
Mmatmul/common/cmct/prologue/tile/tile_antiquant.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PROLOGUE_TILE_ANTIQUANT_H10+#pragma once
11-#define PROLOGUE_TILE_ANTIQUANT_H
12 11 
13namespace Cmct::Prologue::Tile {12namespace Cmct::Prologue::Tile {
14 13 
@@ -58,4 +57,3 @@ __aicore__ inline void Antiquant(
58#include "antiquant_nd_kn.h"57#include "antiquant_nd_kn.h"
59#include "antiquant_zn.h"58#include "antiquant_zn.h"
60 59 
61-#endif
Mmatmul/common/cmct/prologue/tile/tile_cast.h+33-35
@@ -1,35 +1,33 @@
1-/**1+/**
2- 2+ 
3- * Copyright (c) 2026 Huawei Technologies Co., Ltd.3+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
4- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of4+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
5- * CANN Open Software License Agreement Version 2.0 (the "License").5+ * CANN Open Software License Agreement Version 2.0 (the "License").
6- * Please refer to the License for details. You may not use this file except in compliance with the License.6+ * Please refer to the License for details. You may not use this file except in compliance with the License.
7- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,7+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.8+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9- * See LICENSE in the root of the software repository for the full text of the License.9+ * See LICENSE in the root of the software repository for the full text of the License.
10- */10+ */
11-#ifndef PROLOGUE_TILE_CAST_H11+#pragma once
12-#define PROLOGUE_TILE_CAST_H12+ 
13- 13+namespace Cmct::Prologue::Tile {
14-namespace Cmct::Prologue::Tile {14+ 
15- 15+namespace detail {
16-namespace detail {16+template <class ArchTag, class TensorOut, class TensorIn, class Shape, typename Enable = void>
17-template <class ArchTag, class TensorOut, class TensorIn, class Shape, typename Enable = void>17+struct TileCastImpl {
18-struct TileCastImpl {18+ static_assert(AscendC::Std::always_false_v<ArchTag>, "can not find the specialization.");
19- static_assert(AscendC::Std::always_false_v<ArchTag>, "can not find the specialization.");19+ __aicore__ inline static void Run(const TensorOut& tensorOut, const TensorIn& tensorIn, const Shape& shape) =
20- __aicore__ inline static void Run(const TensorOut& tensorOut, const TensorIn& tensorIn, const Shape& shape) =20+ delete;
21- delete;21+};
22-};22+} // namespace detail
23-} // namespace detail23+ 
24- 24+template <class ArchTag, class TensorOut, class TensorIn, class Shape>
25-template <class ArchTag, class TensorOut, class TensorIn, class Shape>25+__aicore__ inline void TileCast(const TensorOut& tensorOut, const TensorIn& tensorIn, const Shape& shape)
26-__aicore__ inline void TileCast(const TensorOut& tensorOut, const TensorIn& tensorIn, const Shape& shape)26+{
27-{27+ detail::TileCastImpl<
28- detail::TileCastImpl<28+ AscendC::Std::remove_cvref_t<ArchTag>, AscendC::Std::remove_cvref_t<TensorOut>,
29- AscendC::Std::remove_cvref_t<ArchTag>, AscendC::Std::remove_cvref_t<TensorOut>,29+ AscendC::Std::remove_cvref_t<TensorIn>, AscendC::Std::remove_cvref_t<Shape> >::Run(tensorOut, tensorIn, shape);
30- AscendC::Std::remove_cvref_t<TensorIn>, AscendC::Std::remove_cvref_t<Shape> >::Run(tensorOut, tensorIn, shape);30+};
31-};31+} // namespace Cmct::Prologue::Tile
32-} // namespace Cmct::Prologue::Tile32+#include "tile_cast_b8_to_b16.h"
33-#include "tile_cast_b8_to_b16.h"33+ 
34- 
35-#endif
Mmatmul/common/cmct/prologue/tile/tile_cast_b8_to_b16.h+136-137
@@ -1,137 +1,136 @@
1-/**1+/**
2- 2+ 
3- * Copyright (c) 2026 Huawei Technologies Co., Ltd.3+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
4- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of4+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
5- * CANN Open Software License Agreement Version 2.0 (the "License").5+ * CANN Open Software License Agreement Version 2.0 (the "License").
6- * Please refer to the License for details. You may not use this file except in compliance with the License.6+ * Please refer to the License for details. You may not use this file except in compliance with the License.
7- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,7+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.8+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9- * See LICENSE in the root of the software repository for the full text of the License.9+ * See LICENSE in the root of the software repository for the full text of the License.
10- */10+ */
11-#ifndef PROLOGUE_TILE_CAST_MX_H11+#pragma once
12-#define PROLOGUE_TILE_CAST_MX_H12+#if ASC_DEVKIT_MAJOR >= 9
13-#if ASC_DEVKIT_MAJOR >= 913+#include "kernel_basic_intf.h"
14-#include "kernel_basic_intf.h"14+#else
15-#else15+#include "kernel_operator_intf.h"
16-#include "kernel_operator_intf.h"16+#endif
17-#endif17+#include "../../utils/math_utils.h"
18-#include "../../utils/math_utils.h"18+#include "../../utils/underscore.h"
19-#include "../../utils/underscore.h"19+ 
20- 20+namespace Cmct::Prologue::Tile {
21-namespace Cmct::Prologue::Tile {21+using AscendC::BLOCK_CUBE;
22-using AscendC::BLOCK_CUBE;22+using AscendC::VECTOR_REG_WIDTH;
23-using AscendC::VECTOR_REG_WIDTH;23+using Cmct::CeilAlign;
24-using Cmct::CeilAlign;24+using Cmct::CeilDiv;
25-using Cmct::CeilDiv;25+using Cmct::Gemm::Get;
26-using Cmct::Gemm::Get;26+using Gemm::Arch::DAV3510;
27-using Gemm::Arch::DAV3510;27+namespace MicroAPI = AscendC::MicroAPI;
28-namespace MicroAPI = AscendC::MicroAPI;28+namespace detail {
29-namespace detail {29+ 
30- 30+// ND NK
31-// ND NK31+template <class TensorTraitOut, class TensorTraitIn, class Shape>
32-template <class TensorTraitOut, class TensorTraitIn, class Shape>32+struct TileCastImpl<
33-struct TileCastImpl<33+ DAV3510, AscendC::LocalTensor<TensorTraitOut>, AscendC::LocalTensor<TensorTraitIn>, Shape,
34- DAV3510, AscendC::LocalTensor<TensorTraitOut>, AscendC::LocalTensor<TensorTraitIn>, Shape,34+ typename AscendC::Std::enable_if_t<
35- typename AscendC::Std::enable_if_t<35+ IsRowMajor2D<decltype(TensorTraitIn{}.GetLayout())>::value // 判断NK场景
36- IsRowMajor2D<decltype(TensorTraitIn{}.GetLayout())>::value // 判断NK场景36+ && AscendC::Std::is_same_v<AscendC::PrimT<TensorTraitIn>, AscendC::fp8_e8m0_t>>> {
37- && AscendC::Std::is_same_v<AscendC::PrimT<TensorTraitIn>, AscendC::fp8_e8m0_t>>> {37+ using DtypeOut = AscendC::PrimT<TensorTraitOut>;
38- using DtypeOut = AscendC::PrimT<TensorTraitOut>;38+ using DtypeIn = AscendC::PrimT<TensorTraitIn>;
39- using DtypeIn = AscendC::PrimT<TensorTraitIn>;39+ __aicore__ inline static void Run(
40- __aicore__ inline static void Run(40+ const AscendC::LocalTensor<TensorTraitOut>& tensorOut, const AscendC::LocalTensor<TensorTraitIn>& tensorIn,
41- const AscendC::LocalTensor<TensorTraitOut>& tensorOut, const AscendC::LocalTensor<TensorTraitIn>& tensorIn,41+ const Shape& shape)
42- const Shape& shape)42+ {
43- {43+ uint16_t ubLoopN = CeilDiv(Get<0>(shape), static_cast<uint64_t>(4));
44- uint16_t ubLoopN = CeilDiv(Get<0>(shape), static_cast<uint64_t>(4));44+ constexpr int16_t SHIFT_FOR_BF16 = 1;
45- constexpr int16_t SHIFT_FOR_BF16 = 1;45+ __ubuf__ uint8_t* antiQuantScaleBasePhyAddr = (__ubuf__ uint8_t*)tensorIn.GetPhyAddr();
46- __ubuf__ uint8_t* antiQuantScaleBasePhyAddr = (__ubuf__ uint8_t*)tensorIn.GetPhyAddr();46+ __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr0 = (__ubuf__ DtypeOut*)tensorOut.GetPhyAddr();
47- __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr0 = (__ubuf__ DtypeOut*)tensorOut.GetPhyAddr();47+ __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr1 = antiQuantScaleF16PhyAddr0 + (VECTOR_REG_SIZE<DtypeOut>);
48- __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr1 = antiQuantScaleF16PhyAddr0 + (VECTOR_REG_SIZE<DtypeOut>);48+ __VEC_SCOPE__
49- __VEC_SCOPE__49+ {
50- {50+ MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg0;
51- MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg0;51+ MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg1;
52- MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg1;52+ MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg0;
53- MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg0;53+ MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg1;
54- MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg1;54+ MicroAPI::MaskReg maskAll = MicroAPI::CreateMask<uint8_t, AscendC::MicroAPI::MaskPattern::ALL>();
55- MicroAPI::MaskReg maskAll = MicroAPI::CreateMask<uint8_t, AscendC::MicroAPI::MaskPattern::ALL>();55+ for (uint16_t ubLoopNIdx = 0; ubLoopNIdx < ubLoopN; ubLoopNIdx++) {
56- for (uint16_t ubLoopNIdx = 0; ubLoopNIdx < ubLoopN; ubLoopNIdx++) {56+ // 搬运128个E8M0的antiquantscale, 通过两倍上采样变成256个E8M0, DIST_US_B8表示搬运模式如下:
57- // 搬运128个E8M0的antiquantscale, 通过两倍上采样变成256个E8M0, DIST_US_B8表示搬运模式如下:57+ // Vn s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s125 s126 s127 s128
58- // Vn s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s125 s126 s127 s12858+ // Vd s1 s1 s2 s2 s3 s3 s4 s4 s5 ...... s125 s125 s126 s126 s127 s127 s128 s128
59- // Vd s1 s1 s2 s2 s3 s3 s4 s4 s5 ...... s125 s125 s126 s126 s127 s127 s128 s12859+ MicroAPI::LoadAlign<uint8_t, MicroAPI::LoadDist::DIST_US_B8>(
60- MicroAPI::LoadAlign<uint8_t, MicroAPI::LoadDist::DIST_US_B8>(60+ antiQuantScaleE8m0Vreg0, antiQuantScaleBasePhyAddr + ubLoopNIdx * 128);
61- antiQuantScaleE8m0Vreg0, antiQuantScaleBasePhyAddr + ubLoopNIdx * 128);61+ MicroAPI::RegTensor<uint8_t> zeroVreg;
62- MicroAPI::RegTensor<uint8_t> zeroVreg;62+ MicroAPI::Duplicate(zeroVreg, 0);
63- MicroAPI::Duplicate(zeroVreg, 0);63+ // 通过数据重排指令, 交织 antiQuantScaleE8m0Vreg0 和 zeroVreg , Interleave后变为
64- // 通过数据重排指令, 交织 antiQuantScaleE8m0Vreg0 和 zeroVreg , Interleave后变为64+ // antiQuantScaleE8m0Vreg0
65- // antiQuantScaleE8m0Vreg065+ // Vn s1 0 s2 0 s3 0 s4 0 s5 0 s6 0 s7 0 s8 0....... s127 0 s128 0
66- // Vn s1 0 s2 0 s3 0 s4 0 s5 0 s6 0 s7 0 s8 0....... s127 0 s128 066+ // antiQuantScaleE8m0Vreg1
67- // antiQuantScaleE8m0Vreg167+ // Vd s128 0 s129 0 s130 0 s131 0 s132 0 s133 0....... s255 0 s256 0
68- // Vd s128 0 s129 0 s130 0 s131 0 s132 0 s133 0....... s255 0 s256 068+ MicroAPI::Interleave(
69- MicroAPI::Interleave(69+ antiQuantScaleE8m0Vreg0, antiQuantScaleE8m0Vreg1, zeroVreg, antiQuantScaleE8m0Vreg0);
70- antiQuantScaleE8m0Vreg0, antiQuantScaleE8m0Vreg1, zeroVreg, antiQuantScaleE8m0Vreg0);70+ CastLowBitToF16(antiQuantScaleF16Vreg0, antiQuantScaleE8m0Vreg0, maskAll);
71- CastLowBitToF16(antiQuantScaleF16Vreg0, antiQuantScaleE8m0Vreg0, maskAll);71+ CastLowBitToF16(antiQuantScaleF16Vreg1, antiQuantScaleE8m0Vreg1, maskAll);
72- CastLowBitToF16(antiQuantScaleF16Vreg1, antiQuantScaleE8m0Vreg1, maskAll);72+ MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(
73- MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(73+ antiQuantScaleF16PhyAddr0 + ubLoopNIdx * AscendC::VECTOR_REG_WIDTH, antiQuantScaleF16Vreg0,
74- antiQuantScaleF16PhyAddr0 + ubLoopNIdx * AscendC::VECTOR_REG_WIDTH, antiQuantScaleF16Vreg0,74+ maskAll);
75- maskAll);75+ MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(
76- MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(76+ antiQuantScaleF16PhyAddr1 + ubLoopNIdx * AscendC::VECTOR_REG_WIDTH, antiQuantScaleF16Vreg1,
77- antiQuantScaleF16PhyAddr1 + ubLoopNIdx * AscendC::VECTOR_REG_WIDTH, antiQuantScaleF16Vreg1,77+ maskAll);
78- maskAll);78+ }
79- }79+ }
80- }80+ }
81- }81+};
82-};82+ 
83- 83+// ND/NZ KN
84-// ND/NZ KN84+template <class TensorTraitOut, class TensorTraitIn, class Shape>
85-template <class TensorTraitOut, class TensorTraitIn, class Shape>85+struct TileCastImpl<
86-struct TileCastImpl<86+ DAV3510, AscendC::LocalTensor<TensorTraitOut>, AscendC::LocalTensor<TensorTraitIn>, Shape,
87- DAV3510, AscendC::LocalTensor<TensorTraitOut>, AscendC::LocalTensor<TensorTraitIn>, Shape,87+ typename AscendC::Std::enable_if_t<
88- typename AscendC::Std::enable_if_t<88+ IsColumnMajor2D<decltype(TensorTraitIn{}.GetLayout())>::value // 判断KN场景
89- IsColumnMajor2D<decltype(TensorTraitIn{}.GetLayout())>::value // 判断KN场景89+ && AscendC::Std::is_same_v<AscendC::PrimT<TensorTraitIn>, AscendC::fp8_e8m0_t>>> {
90- && AscendC::Std::is_same_v<AscendC::PrimT<TensorTraitIn>, AscendC::fp8_e8m0_t>>> {90+ using DtypeOut = AscendC::PrimT<TensorTraitOut>;
91- using DtypeOut = AscendC::PrimT<TensorTraitOut>;91+ using DtypeIn = AscendC::PrimT<TensorTraitIn>;
92- using DtypeIn = AscendC::PrimT<TensorTraitIn>;92+ __aicore__ inline static void Run(
93- __aicore__ inline static void Run(93+ const AscendC::LocalTensor<TensorTraitOut>& tensorOut, const AscendC::LocalTensor<TensorTraitIn>& tensorIn,
94- const AscendC::LocalTensor<TensorTraitOut>& tensorOut, const AscendC::LocalTensor<TensorTraitIn>& tensorIn,94+ const Shape& shape)
95- const Shape& shape)95+ {
96- {96+ uint16_t ubLoopK = static_cast<uint16_t>(Get<1>(shape));
97- uint16_t ubLoopK = static_cast<uint16_t>(Get<1>(shape));97+ constexpr int16_t SHIFT_FOR_BF16 = 1;
98- constexpr int16_t SHIFT_FOR_BF16 = 1;98+ __ubuf__ uint8_t* antiQuantScaleBasePhyAddr = (__ubuf__ uint8_t*)tensorIn.GetPhyAddr();
99- __ubuf__ uint8_t* antiQuantScaleBasePhyAddr = (__ubuf__ uint8_t*)tensorIn.GetPhyAddr();99+ __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr0 = (__ubuf__ DtypeOut*)tensorOut.GetPhyAddr();
100- __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr0 = (__ubuf__ DtypeOut*)tensorOut.GetPhyAddr();100+ __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr1 = antiQuantScaleF16PhyAddr0 + (AscendC::VECTOR_REG_WIDTH >> 1);
101- __ubuf__ DtypeOut* antiQuantScaleF16PhyAddr1 = antiQuantScaleF16PhyAddr0 + (AscendC::VECTOR_REG_WIDTH >> 1);101+ __VEC_SCOPE__
102- __VEC_SCOPE__102+ {
103- {103+ // KN mte2搬运的antiquantscale的标准大小为(4,256), 按照一行的粒度处理
104- // KN mte2搬运的antiquantscale的标准大小为(4,256), 按照一行的粒度处理104+ MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg0;
105- MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg0;105+ MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg1;
106- MicroAPI::RegTensor<uint8_t> antiQuantScaleE8m0Vreg1;106+ MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg0;
107- MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg0;107+ MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg1;
108- MicroAPI::RegTensor<DtypeOut> antiQuantScaleF16Vreg1;108+ MicroAPI::MaskReg maskAll = MicroAPI::CreateMask<uint8_t, AscendC::MicroAPI::MaskPattern::ALL>();
109- MicroAPI::MaskReg maskAll = MicroAPI::CreateMask<uint8_t, AscendC::MicroAPI::MaskPattern::ALL>();109+ for (uint16_t ubLoopKIdx = 0; ubLoopKIdx < ubLoopK; ubLoopKIdx++) {
110- for (uint16_t ubLoopKIdx = 0; ubLoopKIdx < ubLoopK; ubLoopKIdx++) {110+ // 搬运256个E8M0的antiquantscale, DIST_NORM表示搬运模式如下:
111- // 搬运256个E8M0的antiquantscale, DIST_NORM表示搬运模式如下:111+ // Vn s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s254 s255 s256
112- // Vn s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s254 s255 s256112+ // Vd s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s254 s255 s256
113- // Vd s1 s2 s3 s4 s5 s6 s7 s8 s9 ...... s254 s255 s256113+ MicroAPI::LoadAlign<uint8_t, MicroAPI::LoadDist::DIST_NORM>(
114- MicroAPI::LoadAlign<uint8_t, MicroAPI::LoadDist::DIST_NORM>(114+ antiQuantScaleE8m0Vreg0, antiQuantScaleBasePhyAddr + ubLoopKIdx * VECTOR_REG_WIDTH);
115- antiQuantScaleE8m0Vreg0, antiQuantScaleBasePhyAddr + ubLoopKIdx * VECTOR_REG_WIDTH);115+ MicroAPI::RegTensor<uint8_t> zeroVreg;
116- MicroAPI::RegTensor<uint8_t> zeroVreg;116+ MicroAPI::Duplicate(zeroVreg, 0);
117- MicroAPI::Duplicate(zeroVreg, 0);117+ // 通过数据重排指令, 交织 antiQuantScaleE8m0Vreg0 和 zeroVreg , Interleave后变为
118- // 通过数据重排指令, 交织 antiQuantScaleE8m0Vreg0 和 zeroVreg , Interleave后变为118+ // antiQuantScaleE8m0Vreg0
119- // antiQuantScaleE8m0Vreg0119+ // Vn s1 0 s2 0 s3 0 s4 0 s5 0 s6 0 s7 0 s8 0....... s127 0 s128 0
120- // Vn s1 0 s2 0 s3 0 s4 0 s5 0 s6 0 s7 0 s8 0....... s127 0 s128 0120+ // antiQuantScaleE8m0Vreg1
121- // antiQuantScaleE8m0Vreg1121+ // Vd s128 0 s129 0 s130 0 s131 0 s132 0 s133 0....... s255 0 s256 0
122- // Vd s128 0 s129 0 s130 0 s131 0 s132 0 s133 0....... s255 0 s256 0122+ MicroAPI::Interleave(
123- MicroAPI::Interleave(123+ antiQuantScaleE8m0Vreg0, antiQuantScaleE8m0Vreg1, zeroVreg, antiQuantScaleE8m0Vreg0);
124- antiQuantScaleE8m0Vreg0, antiQuantScaleE8m0Vreg1, zeroVreg, antiQuantScaleE8m0Vreg0);124+ CastLowBitToF16(antiQuantScaleF16Vreg0, antiQuantScaleE8m0Vreg0, maskAll);
125- CastLowBitToF16(antiQuantScaleF16Vreg0, antiQuantScaleE8m0Vreg0, maskAll);125+ CastLowBitToF16(antiQuantScaleF16Vreg1, antiQuantScaleE8m0Vreg1, maskAll);
126- CastLowBitToF16(antiQuantScaleF16Vreg1, antiQuantScaleE8m0Vreg1, maskAll);126+ MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(
127- MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(127+ antiQuantScaleF16PhyAddr0 + ubLoopKIdx * VECTOR_REG_WIDTH, antiQuantScaleF16Vreg0, maskAll);
128- antiQuantScaleF16PhyAddr0 + ubLoopKIdx * VECTOR_REG_WIDTH, antiQuantScaleF16Vreg0, maskAll);128+ MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(
129- MicroAPI::StoreAlign<DtypeOut, MicroAPI::StoreDist::DIST_NORM_B16>(129+ antiQuantScaleF16PhyAddr1 + ubLoopKIdx * VECTOR_REG_WIDTH, antiQuantScaleF16Vreg1, maskAll);
130- antiQuantScaleF16PhyAddr1 + ubLoopKIdx * VECTOR_REG_WIDTH, antiQuantScaleF16Vreg1, maskAll);130+ }
131- }131+ }
132- }132+ }
133- }133+};
134-};134+} // namespace detail
135-} // namespace detail135+} // namespace Cmct::Prologue::Tile
136-} // namespace Cmct::Prologue::Tile136+ 
137-#endif
Mmatmul/common/cmct/tile/copy_gm_to_ub.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef TILE_COPY_GM_TO_UB_H10+#pragma once
11-#define TILE_COPY_GM_TO_UB_H
12 11 
13#include "../utils/constant.h"12#include "../utils/constant.h"
14#include "../utils/arch.h"13#include "../utils/arch.h"
@@ -129,4 +128,4 @@ struct CopyIfImpl<
129};128};
130} // namespace detail129} // namespace detail
131} // namespace Cmct::Gemm::Tile130} // namespace Cmct::Gemm::Tile
132-#endif // TILE_COPY_GM_TO_UB_H131+ 
Mmatmul/common/cmct/tile/copy_out/copy_out_split_m_with_params.h+2-3
@@ -12,8 +12,7 @@
12 * \file copy_out_split_m_with_params.h12 * \file copy_out_split_m_with_params.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_TILE_COPY_OUT_COPY_OUT_SPLIT_M_WITH_PARAMS_H15+#pragma once
16-#define MATMUL_TILE_COPY_OUT_COPY_OUT_SPLIT_M_WITH_PARAMS_H
17 16 
18#include "../tile_copy_policy.h"17#include "../tile_copy_policy.h"
19#include "../../utils/tensor_utils.h"18#include "../../utils/tensor_utils.h"
@@ -238,4 +237,4 @@ public:
238} // namespace Tile237} // namespace Tile
239} // namespace Gemm238} // namespace Gemm
240} // namespace Cmct239} // namespace Cmct
241-#endif240+ 
Mmatmul/common/cmct/tile/copy_ub_to_l1.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef TILE_COPY_UB_TO_L1_H10+#pragma once
11-#define TILE_COPY_UB_TO_L1_H
12#include "../utils/constant.h"11#include "../utils/constant.h"
13 12 
14namespace Cmct::Gemm::Tile {13namespace Cmct::Gemm::Tile {
@@ -95,4 +94,4 @@ struct CopyIfImpl<
95};94};
96} // namespace detail95} // namespace detail
97} // namespace Cmct::Gemm::Tile96} // namespace Cmct::Gemm::Tile
98-#endif // TILE_COPY_UB_TO_L1_H97+ 
Mmatmul/common/cmct/tile/tile_copy.h+2-3
@@ -12,8 +12,7 @@
12 * \file tile_copy.h12 * \file tile_copy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_TILE_TILE_COPY_H15+#pragma once
16-#define MATMUL_TILE_TILE_COPY_H
17 16 
18#include "copy_out/copy_out_split_m_with_params.h"17#include "copy_out/copy_out_split_m_with_params.h"
19 18 
@@ -291,4 +290,4 @@ inline constexpr bool HasCopyCo1ToOutV = HasCopyCo1ToOut<TileCopy>::value;
291} // namespace Tile290} // namespace Tile
292} // namespace Gemm291} // namespace Gemm
293} // namespace Cmct292} // namespace Cmct
294-#endif293+ 
Mmatmul/common/cmct/tile/tile_copy_if.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef TILE_TILE_COPY_IF_H10+#pragma once
11-#define TILE_TILE_COPY_IF_H
12 11 
13#if ASC_DEVKIT_MAJOR >= 912#if ASC_DEVKIT_MAJOR >= 9
14#include "kernel_basic_intf.h"13#include "kernel_basic_intf.h"
@@ -60,4 +59,4 @@ __aicore__ inline void CopyIf(const DstTensor& dstTensor, const SrcTensor& srcTe
60 59 
61#include "copy_gm_to_ub.h"60#include "copy_gm_to_ub.h"
62#include "copy_ub_to_l1.h"61#include "copy_ub_to_l1.h"
63-#endif62+ 
Mmatmul/common/cmct/tile/tile_copy_policy.h+2-3
@@ -12,8 +12,7 @@
12 * \file tile_copy_policy.h12 * \file tile_copy_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_TILE_TILE_COPY_POLICY_H15+#pragma once
16-#define MATMUL_TILE_TILE_COPY_POLICY_H
17 16 
18#include "../utils/arch.h"17#include "../utils/arch.h"
19 18 
@@ -49,4 +48,4 @@ struct Copy {};
49} // namespace Tile48} // namespace Tile
50} // namespace Gemm49} // namespace Gemm
51} // namespace Cmct50} // namespace Cmct
52-#endif51+ 
Mmatmul/common/cmct/utils/arch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_ARCH_H16+#pragma once
17-#define UTILS_ARCH_H
18 17 
19namespace Cmct {18namespace Cmct {
20namespace Gemm {19namespace Gemm {
@@ -36,4 +35,4 @@ constexpr static int64_t L0C_SIZE = 128 * 1024;
36constexpr static int64_t L1_SIZE = 512 * 1024;35constexpr static int64_t L1_SIZE = 512 * 1024;
37} // namespace Gemm36} // namespace Gemm
38} // namespace Cmct37} // namespace Cmct
39-#endif38+ 
Mmatmul/common/cmct/utils/common_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_COMMON_UTILS_H16+#pragma once
17-#define UTILS_COMMON_UTILS_H
18 17 
19#include "integral_constant.h"18#include "integral_constant.h"
20#if ASC_DEVKIT_MAJOR >= 919#if ASC_DEVKIT_MAJOR >= 9
@@ -182,4 +181,4 @@ template <class Stride>
182struct is_2d_nz_c0_32 : is_2d_nz_c0_32_impl<typename AscendC::Std::remove_cvref_t<Stride>> {};181struct is_2d_nz_c0_32 : is_2d_nz_c0_32_impl<typename AscendC::Std::remove_cvref_t<Stride>> {};
183} // namespace Gemm182} // namespace Gemm
184} // namespace Cmct183} // namespace Cmct
185-#endif184+ 
Mmatmul/common/cmct/utils/constant.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef UTILS_CONSTANT_H10+#pragma once
11-#define UTILS_CONSTANT_H
12 11 
13#include "common_utils.h"12#include "common_utils.h"
14#include "integral_constant.h"13#include "integral_constant.h"
@@ -201,4 +200,4 @@ constexpr uint64_t BLK_ELEM = 32 / sizeof(T);
201template <typename T>200template <typename T>
202inline constexpr uint32_t C0 = 32 / sizeof(T);201inline constexpr uint32_t C0 = 32 / sizeof(T);
203} // namespace Cmct::Gemm202} // namespace Cmct::Gemm
204-#endif203+ 
Mmatmul/common/cmct/utils/coord_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_COORD_UTILS_H16+#pragma once
17-#define UTILS_COORD_UTILS_H
18 17 
19#include "common_utils.h"18#include "common_utils.h"
20#include "quant_batch_matmul_constant.h"19#include "quant_batch_matmul_constant.h"
@@ -408,4 +407,4 @@ public:
408};407};
409} // namespace Gemm408} // namespace Gemm
410} // namespace Cmct409} // namespace Cmct
411-#endif410+ 
Mmatmul/common/cmct/utils/device_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_DEVICE_UTILS_H16+#pragma once
17-#define UTILS_DEVICE_UTILS_H
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
20#else19#else
@@ -40,4 +39,4 @@ __aicore__ inline int64_t AlignBlock(const int64_t& t)
40 39 
41} // namespace Gemm40} // namespace Gemm
42} // namespace Cmct41} // namespace Cmct
43-#endif42+ 
Mmatmul/common/cmct/utils/fill_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_FILL_UTILS_H16+#pragma once
17-#define UTILS_FILL_UTILS_H
18#include "common_utils.h"17#include "common_utils.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -73,4 +72,4 @@ __aicore__ inline void InitOutputWithZero(AscendC::GlobalTensor<T> yInitGlobal,
73#endif72#endif
74} // namespace Gemm73} // namespace Gemm
75} // namespace Cmct74} // namespace Cmct
76-#endif75+ 
Mmatmul/common/cmct/utils/gemm_type.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_UTILS_GEMM_TYPE_H16+#pragma once
17-#define CMCT_INCLUDE_UTILS_GEMM_TYPE_H
18 17 
19#include "kernel_operator_block_sync_intf.h"18#include "kernel_operator_block_sync_intf.h"
20 19 
@@ -27,4 +26,3 @@ struct GemmType {
27};26};
28} // namespace Cmct::Gemm27} // namespace Cmct::Gemm
29 28 
30-#endif
Mmatmul/common/cmct/utils/host_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_HOST_UTILS_H16+#pragma once
17-#define UTILS_HOST_UTILS_H
18#ifndef __NPU_ARCH__17#ifndef __NPU_ARCH__
19#include "tiling/platform/platform_ascendc.h"18#include "tiling/platform/platform_ascendc.h"
20 19 
@@ -45,4 +44,4 @@ static size_t GetSysWorkspaceSize()
45} // namespace Gemm44} // namespace Gemm
46} // namespace Cmct45} // namespace Cmct
47#endif46#endif
48-#endif47+ 
Mmatmul/common/cmct/utils/integral_constant.h+2-3
@@ -12,8 +12,7 @@
12 * \file integral_constant.h12 * \file integral_constant.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef UTILS_INTEGRAL_CONSTANT_H15+#pragma once
16-#define UTILS_INTEGRAL_CONSTANT_H
17#if ASC_DEVKIT_MAJOR >= 916#if ASC_DEVKIT_MAJOR >= 9
18#include "kernel_basic_intf.h"17#include "kernel_basic_intf.h"
19#else18#else
@@ -195,4 +194,4 @@ __host_aicore__ inline constexpr Int<(t <= u)> operator<=(Int<t>, Int<u>)
195}194}
196} // namespace Gemm195} // namespace Gemm
197} // namespace Cmct196} // namespace Cmct
198-#endif197+ 
Mmatmul/common/cmct/utils/layout_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_LAYOUT_UTILS_H16+#pragma once
17-#define UTILS_LAYOUT_UTILS_H
18 17 
19// dependency of matmul_utils.h18// dependency of matmul_utils.h
20#include "matmul/tiling.h"19#include "matmul/tiling.h"
@@ -243,4 +242,4 @@ __aicore__ constexpr inline decltype(auto) MakeLayoutByFormat(int row, int col)
243}242}
244} // namespace Gemm243} // namespace Gemm
245} // namespace Cmct244} // namespace Cmct
246-#endif245+ 
Mmatmul/common/cmct/utils/math_utils.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef UTILS_MATH_UTILS_H10+#pragma once
11-#define UTILS_MATH_UTILS_H
12#include "device_utils.h"11#include "device_utils.h"
13#if ASC_DEVKIT_MAJOR >= 912#if ASC_DEVKIT_MAJOR >= 9
14#include "kernel_basic_intf.h"13#include "kernel_basic_intf.h"
@@ -97,4 +96,4 @@ __aicore__ inline Int ElemToByte(AscendC::Std::integral_constant<Int, Count>)
97 return Count * sizeof(Dtype);96 return Count * sizeof(Dtype);
98}97}
99} // namespace Cmct98} // namespace Cmct
100-#endif99+ 
Mmatmul/common/cmct/utils/matmul_layout_type.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_MATMUL_LAYOUT_TYPE_H16+#pragma once
17-#define UTILS_MATMUL_LAYOUT_TYPE_H
18 17 
19#include "./integral_constant.h"18#include "./integral_constant.h"
20#include "./layout_utils.h"19#include "./layout_utils.h"
@@ -49,4 +48,4 @@ using ToMatmulTypeT = typename ToMatmulType<LayoutT>::Type;
49 48 
50} // namespace Gemm49} // namespace Gemm
51} // namespace Cmct50} // namespace Cmct
52-#endif51+ 
Mmatmul/common/cmct/utils/quant_batch_matmul_constant.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_constant.h12 * \file quant_batch_matmul_constant.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef UTILS_QUANT_BATCH_MATMUL_CONSTANT_H15+#pragma once
16-#define UTILS_QUANT_BATCH_MATMUL_CONSTANT_H
17namespace Cmct {16namespace Cmct {
18namespace Gemm {17namespace Gemm {
19namespace QuantBatchMatmul {18namespace QuantBatchMatmul {
@@ -73,4 +72,4 @@ enum class QuantMode : uint32_t {
73} // namespace QuantBatchMatmul72} // namespace QuantBatchMatmul
74} // namespace Gemm73} // namespace Gemm
75} // namespace Cmct74} // namespace Cmct
76-#endif75+ 
Mmatmul/common/cmct/utils/status_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_STATUS_UTILS_H16+#pragma once
17-#define UTILS_STATUS_UTILS_H
18 17 
19namespace Cmct {18namespace Cmct {
20namespace Gemm {19namespace Gemm {
@@ -92,4 +91,4 @@ constexpr const char* GetStatusString(Status status)
92 91 
93} // namespace Gemm92} // namespace Gemm
94} // namespace Cmct93} // namespace Cmct
95-#endif94+ 
Mmatmul/common/cmct/utils/tensor_traits.h+2-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef UTILS_TENSOR_TRAITS_H10+#pragma once
11-#define UTILS_TENSOR_TRAITS_H
12#if ASC_DEVKIT_MAJOR >= 911#if ASC_DEVKIT_MAJOR >= 9
13#include "kernel_basic_intf.h"12#include "kernel_basic_intf.h"
14#else13#else
@@ -66,4 +65,4 @@ struct TensorTraitL1<false, T, TPos> {
66 AscendC::Stride<Cmct::Gemm::_16, Cmct::Gemm::_256>, AscendC::Stride<Cmct::Gemm::_1, uint64_t>>>>;65 AscendC::Stride<Cmct::Gemm::_16, Cmct::Gemm::_256>, AscendC::Stride<Cmct::Gemm::_1, uint64_t>>>>;
67};66};
68} // namespace Cmct::Gemm67} // namespace Cmct::Gemm
69-#endif68+ 
Mmatmul/common/cmct/utils/tensor_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef UTILS_TENSOR_UTILS_H16+#pragma once
17-#define UTILS_TENSOR_UTILS_H
18#include "common_utils.h"17#include "common_utils.h"
19#include "integral_constant.h"18#include "integral_constant.h"
20#include "kernel_operator_list_tensor_intf.h"19#include "kernel_operator_list_tensor_intf.h"
@@ -310,4 +309,4 @@ __aicore__ inline constexpr bool PosIsL0C()
310 309 
311} // namespace Gemm310} // namespace Gemm
312} // namespace Cmct311} // namespace Cmct
313-#endif312+ 
Mmatmul/common/cmct/utils/tuple_utils.h+2-3
@@ -12,8 +12,7 @@
12 * \file tuple_utils.h12 * \file tuple_utils.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef UTILS_TUPLE_UTILS_H15+#pragma once
16-#define UTILS_TUPLE_UTILS_H
17 16 
18#include "lib/std/tuple.h"17#include "lib/std/tuple.h"
19#include "./integral_constant.h"18#include "./integral_constant.h"
@@ -42,4 +41,4 @@ __aicore__ constexpr inline decltype(auto) GetIntegralConstant()
42}41}
43} // namespace Gemm42} // namespace Gemm
44} // namespace Cmct43} // namespace Cmct
45-#endif44+ 
Mmatmul/common/cmct/utils/underscore.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_INCLUDE_UTILS_UNDERSCORE_H16+#pragma once
17-#define CMCT_INCLUDE_UTILS_UNDERSCORE_H
18 17 
19#include "integral_constant.h"18#include "integral_constant.h"
20 19 
@@ -24,4 +23,4 @@ struct Underscore : _0 {};
24static constexpr Underscore _;23static constexpr Underscore _;
25} // namespace Gemm24} // namespace Gemm
26} // namespace Cmct25} // namespace Cmct
27-#endif26+ 
Mmatmul/common/op_host/math_util.h+1-3
@@ -12,8 +12,7 @@
12 * \file math_util.h12 * \file math_util.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_COMMON_MATH_UTIL_H_15+#pragma once
16-#define MATMUL_COMMON_MATH_UTIL_H_
17 16 
18#include "util/math_util.h"17#include "util/math_util.h"
19 18 
@@ -67,4 +66,3 @@ static T CeilDiv(T num1, T num2)
67}66}
68}67}
69 68 
70-#endif
Mmatmul/common/op_host/matmul_common_infershape.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MATMUL_COMMON_INFERSHAPE_H16+#pragma once
17-#define MATMUL_COMMON_INFERSHAPE_H
18 17 
19#include "runtime/infer_shape_context.h"18#include "runtime/infer_shape_context.h"
20#include "register/op_impl_registry.h"19#include "register/op_impl_registry.h"
@@ -31,4 +30,3 @@ bool CheckIsUnknownDimNum(const gert::Shape& shape);
31} // namespace NN30} // namespace NN
32} // namespace Ops31} // namespace Ops
33 32 
34-#endif
Mmatmul/common/op_host/op_api/batch_matmul.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_BATCHMATMUL_OP_H_10+#pragma once
11-#define PTA_NPU_OP_API_INC_LEVEL0_OP_BATCHMATMUL_OP_H_
12 11 
13#include "opdev/op_executor.h"12#include "opdev/op_executor.h"
14 13 
@@ -38,4 +37,3 @@ const aclTensor* BatchMatMulNzFp162Fp32(
38 const bool adjX2, const bool offsetX, const int64_t opImplModeEnum, aclOpExecutor* executor);37 const bool adjX2, const bool offsetX, const int64_t opImplModeEnum, aclOpExecutor* executor);
39} // namespace l0op38} // namespace l0op
40 39 
41-#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_BATCHMATMUL_OP_H_
Mmatmul/common/op_host/op_api/batch_matmul_util.h+1-3
@@ -8,8 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef OP_API_SRC_LEVEL2_BATCH_MATMUL_UTIL_H_11+#pragma once
12-#define OP_API_SRC_LEVEL2_BATCH_MATMUL_UTIL_H_
13 12 
14#include "aclnn/aclnn_base.h"13#include "aclnn/aclnn_base.h"
15#include "opdev/common_types.h"14#include "opdev/common_types.h"
@@ -60,4 +59,3 @@ const aclTensor* ExecFusedmmOp(
60} // namespace Ops59} // namespace Ops
61} // namespace NN60} // namespace NN
62 61 
63-#endif // OP_API_SRC_LEVEL2_BATCH_MATMUL_UTIL_H_
Mmatmul/common/op_host/op_api/cube_util.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef MATMUL_COMMON_OP_API_CUBE_UTIL_H_10+#pragma once
11-#define MATMUL_COMMON_OP_API_CUBE_UTIL_H_
12 11 
13#include "aclnn/aclnn_base.h"12#include "aclnn/aclnn_base.h"
14#include "op_api/op_api_def.h"13#include "op_api/op_api_def.h"
@@ -66,4 +65,3 @@ bool CheckUnSupportDtype(const aclTensor *input, const aclTensor *weight);
66} // namespace NN65} // namespace NN
67} // namespace Ops66} // namespace Ops
68 67 
69-#endif
Mmatmul/common/op_host/op_api/fusedmatmul.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_FUSEDMATMUL_OP_H_10+#pragma once
11-#define PTA_NPU_OP_API_INC_LEVEL0_OP_FUSEDMATMUL_OP_H_
12 11 
13#include "opdev/op_executor.h"12#include "opdev/op_executor.h"
14 13 
@@ -23,4 +22,3 @@ const aclTensor* FusedMatMul16Cast32(
23 22 
24} // namespace l0op23} // namespace l0op
25 24 
26-#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_FUSEDMATMUL_OP_H_
Mmatmul/common/op_host/op_api/matmul.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_OP_H_10+#pragma once
11-#define PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_OP_H_
12 11 
13#include "opdev/op_executor.h"12#include "opdev/op_executor.h"
14 13 
@@ -77,4 +76,3 @@ const aclTensor* GemmV3NdWithAlphaBeta(const aclTensor* x1,
77 76 
78} // namespace l0op77} // namespace l0op
79 78 
80-#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_OP_H_
Mmatmul/common/op_host/op_api/matmul_util.h+1-3
@@ -7,8 +7,7 @@
7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10-#ifndef OP_API_SRC_LEVEL2_MATMUL_UTIL_H_10+#pragma once
11-#define OP_API_SRC_LEVEL2_MATMUL_UTIL_H_
12 11 
13#include "aclnn/aclnn_base.h"12#include "aclnn/aclnn_base.h"
14#include "opdev/common_types.h"13#include "opdev/common_types.h"
@@ -394,4 +393,3 @@ std::shared_ptr<NpuArchMatMulRuleBase> BuildRule();
394} // namespace NN393} // namespace NN
395} // namespace Ops394} // namespace Ops
396 395 
397-#endif // OP_API_SRC_LEVEL2_MATMUL_UTIL_H_
Mmatmul/common/op_host/op_api/matmul_v2tov3.h+2-3
@@ -8,8 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9*/9*/
10 10 
11-#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_11+#pragma once
12-#define PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_
13 12 
14#include "opdev/common_types.h"13#include "opdev/common_types.h"
15 14 
@@ -46,4 +45,4 @@ using l0op::MmCheckHitV3Shape;
46} // namespace NN45} // namespace NN
47} // namespace Ops46} // namespace Ops
48#endif47#endif
49-#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_48+ 
Mmatmul/common/op_host/op_tiling/debug_tiling.h+1-3
@@ -12,8 +12,7 @@
12 * \file compile_info.h12 * \file compile_info.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef OPS_MATMUL_COMPILE_INFO_H_15+#pragma once
16-#define OPS_MATMUL_COMPILE_INFO_H_
17 16 
18#include "exe_graph/runtime/tiling_context.h"17#include "exe_graph/runtime/tiling_context.h"
19 18 
@@ -24,4 +23,3 @@ std::string DebugTilingData(gert::TilingContext *context);
24} // namespace NN23} // namespace NN
25} // namespace Ops24} // namespace Ops
26 25 
27-#endif // OPS_MATMUL_COMPILE_INFO_H_
Mmatmul/common/op_host/op_tiling/hash.h+2-3
@@ -12,8 +12,7 @@
12 * \file hash.h12 * \file hash.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_HASH_H_15+#pragma once
16-#define OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_HASH_H_
17 16 
18#include <cstdint>17#include <cstdint>
19 18 
@@ -23,4 +22,4 @@ constexpr uint32_t kHashSeed = 271828;
23uint32_t MurmurHash(const void *src, uint32_t len, uint32_t seed = kHashSeed);22uint32_t MurmurHash(const void *src, uint32_t len, uint32_t seed = kHashSeed);
24} // namespace NN23} // namespace NN
25} // namespace Ops24} // namespace Ops
26-#endif // OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_HASH_H_25+ 
Mmatmul/common/op_host/op_tiling/tiling_cache.h+2-3
@@ -12,8 +12,7 @@
12 * \file tiling_cache.h12 * \file tiling_cache.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_TILING_CACHE_H_15+#pragma once
16-#define OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_TILING_CACHE_H_
17 16 
18#include <map>17#include <map>
19#include <shared_mutex>18#include <shared_mutex>
@@ -77,4 +76,4 @@ class TilingCache {
77};76};
78} // namespace NN77} // namespace NN
79} // namespace Ops78} // namespace Ops
80-#endif // OPS_BUILT_IN_OP_TILING_CUBE_ALGORITHM_HASH_TILING_CACHE_H_79+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_basic_block.h+2-3
@@ -12,8 +12,7 @@
12 * \file dual_level_quant_batch_matmul_basic_block.h12 * \file dual_level_quant_batch_matmul_basic_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_H15+#pragma once
16-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -234,4 +233,4 @@ __aicore__ inline void DualLevelQuantMatmulBasicBlock<LOCAL_TEMPLATE_FUNC_PARAMS
234}233}
235 234 
236} // namespace DualLevelQuantBatchMatmul::Arch35235} // namespace DualLevelQuantBatchMatmul::Arch35
237-#endif // DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_H236+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_basic_block_controller.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_CONTROLLER_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_CONTROLLER_H
18 17 
19#include "../dual_level_quant_batch_matmul_tiling_data.h"18#include "../dual_level_quant_batch_matmul_tiling_data.h"
20#include "dual_level_quant_batch_matmul_basic_block.h"19#include "dual_level_quant_batch_matmul_basic_block.h"
@@ -97,4 +96,4 @@ __aicore__ inline void DualLevelQuantBatchMatmulBasicBlockController<LOCAL_TEMPL
97}96}
98 97 
99} // namespace DualLevelQuantBatchMatmul::Arch3598} // namespace DualLevelQuantBatchMatmul::Arch35
100-#endif // DUAL_LEVEL_QUANT_BATCH_MATMUL_BASIC_BLOCK_CONTROLLER_H99+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_block.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_BLOCK_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_BLOCK_H
18#include "../dual_level_quant_batch_matmul_tiling_data.h"17#include "../dual_level_quant_batch_matmul_tiling_data.h"
19#include "op_kernel/math_util.h"18#include "op_kernel/math_util.h"
20#include "tool_arch35.h"19#include "tool_arch35.h"
@@ -241,4 +240,4 @@ __aicore__ inline void DualLevelQuantBatchMatmulBaseBlock::CalcGMOffset()
241}240}
242 241 
243} // namespace DualLevelQuantBatchMatmul::Arch35242} // namespace DualLevelQuantBatchMatmul::Arch35
244-#endif // DUAL_LEVEL_QUANT_BATCH_MATMUL_BLOCK_H243+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_cube_compute.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_CUBE_COMPUTE_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_CUBE_COMPUTE_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -294,4 +293,4 @@ __aicore__ inline void DLQBMM_CUBE_COMPUTE_CLASS::EndSync()
294}293}
295 294 
296} // namespace DualLevelQuantBatchMatmul::Arch35295} // namespace DualLevelQuantBatchMatmul::Arch35
297-#endif296+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_cube_compute_tools.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_CUBE_COMPUTE_TOOLS_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_CUBE_COMPUTE_TOOLS_H
18 17 
19#include "kernel_cube_intf.h"18#include "kernel_cube_intf.h"
20#include "op_kernel/math_util.h"19#include "op_kernel/math_util.h"
@@ -202,4 +201,4 @@ __aicore__ inline void FixL0CToDst(
202}201}
203 202 
204} // namespace DualLevelQuantBatchMatmul::Arch35203} // namespace DualLevelQuantBatchMatmul::Arch35
205-#endif204+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_vec_compute.h+1-3
@@ -12,8 +12,7 @@
12 * \file dual_level_quant_batch_matmul_vec_compute.h12 * \file dual_level_quant_batch_matmul_vec_compute.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_VEC_COMPUTE_H15+#pragma once
16-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_VEC_COMPUTE_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -360,4 +359,3 @@ __aicore__ inline void DLQBMM_VEC_COMPUTE_CLASS::SetAndWaitMte2ToV()
360 359 
361} // namespace DualLevelQuantBatchMatmul::Arch35360} // namespace DualLevelQuantBatchMatmul::Arch35
362 361 
363-#endif // DUAL_LEVEL_QUANT_BATCH_MATMUL_VEC_COMPUTE_H
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/dual_level_quant_batch_matmul_vf.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_VF_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_VF_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -158,4 +157,4 @@ __simd_vf__ inline void MulAdd(
158}157}
159 158 
160} // namespace DualLevelQuantBatchMatmul::Arch35159} // namespace DualLevelQuantBatchMatmul::Arch35
161-#endif // DUAL_LEVEL_QUANT_BATCH_MATMUL_VF_H160+ 
Mmatmul/dual_level_quant_batch_matmul/op_kernel/arch35/tool_arch35.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef DUAL_LEVEL_QUANT_BATCH_MATMUL_TOOL_ARCH35_H16+#pragma once
17-#define DUAL_LEVEL_QUANT_BATCH_MATMUL_TOOL_ARCH35_H
18 17 
19#include <limits>18#include <limits>
20 19 
@@ -103,4 +102,4 @@ __aicore__ inline T Min(T a, T b)
103}102}
104 103 
105} // namespace DualLevelQuantBatchMatmul::Arch35104} // namespace DualLevelQuantBatchMatmul::Arch35
106-#endif105+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_asw_basic_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_asw_basic_tiling.h12 * \file fused_matmul_asw_basic_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_ASW_BASIC_TILING_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_ASW_BASIC_TILING_H__
17 16 
18#include "mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"17#include "mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h"
19 18 
@@ -35,4 +34,4 @@ protected:
35};34};
36} // namespace fused_matmul35} // namespace fused_matmul
37} // namespace optiling36} // namespace optiling
38-#endif // __OP_HOST_FUSED_MATMUL_ASW_BASIC_TILING_H__37+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_basic_streamk_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_basic_streamk_tiling.h12 * \file fused_matmul_basic_streamk_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_BASIC_STREAMK_TILING_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_BASIC_STREAMK_TILING_H__
17 16 
18#include "mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_streamk_tiling.h"17#include "mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_streamk_tiling.h"
19 18 
@@ -33,4 +32,4 @@ protected:
33};32};
34} // namespace fused_matmul33} // namespace fused_matmul
35} // namespace optiling34} // namespace optiling
36-#endif // __OP_HOST_FUSED_MATMUL_ASW_BASIC_TILING_H__35+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_builtin_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_builtin_tiling.h12 * \file fused_matmul_builtin_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_H__
17 16 
18#include "matmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_tiling_advanced.h"17#include "matmul/batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_tiling_advanced.h"
19#include "platform/platform_ascendc.h"18#include "platform/platform_ascendc.h"
@@ -44,4 +43,4 @@ private:
44};43};
45} // namespace fused_matmul44} // namespace fused_matmul
46} // namespace optiling45} // namespace optiling
47-#endif // __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_H__46+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_builtin_tiling_strategy.h+1-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_builtin_tiling_strategy.h12 * \file fused_matmul_builtin_tiling_strategy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_STRATEGY_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_STRATEGY_H__
17 16 
18#include <map>17#include <map>
19#include <vector>18#include <vector>
@@ -48,4 +47,3 @@ inline std::vector<int32_t> GetFusedMatMulPriorities(NpuArch npuArch)
48} // namespace fused_matmul47} // namespace fused_matmul
49} // namespace optiling48} // namespace optiling
50 49 
51-#endif // __OP_HOST_FUSED_MATMUL_BUILTIN_TILING_STRATEGY_H__
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_common.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_common.h12 * \file fused_matmul_common.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_COMMON_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_COMMON_H__
17#include <map>16#include <map>
18#include <set>17#include <set>
19#include "matmul/fused_mat_mul/op_kernel/arch35/fused_mat_mul_tilingkey.h"18#include "matmul/fused_mat_mul/op_kernel/arch35/fused_mat_mul_tilingkey.h"
@@ -64,4 +63,4 @@ const std::map<std::string, FusedOpType> FUSED_OP_TYPE_MAP = {
64const std::set<std::string> FusedOpTypeSupportStreamK = {"", "relu", "16cast32"};63const std::set<std::string> FusedOpTypeSupportStreamK = {"", "relu", "16cast32"};
65 64 
66} // namespace optiling65} // namespace optiling
67-#endif // __OP_HOST_FUSED_MATMUL_COMMON_H__66+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_iterbatch_basic_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_FUSED_MATMUL_ITERBATCH_BASIC_TILING_H__16+#pragma once
17-#define __OP_HOST_FUSED_MATMUL_ITERBATCH_BASIC_TILING_H__
18 17 
19#include "batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_iterbatch_basicapi_tiling.h"18#include "batch_mat_mul_v3/op_host/op_tiling/arch35/batch_matmul_v3_iterbatch_basicapi_tiling.h"
20 19 
@@ -36,4 +35,4 @@ protected:
36};35};
37} // namespace fused_matmul36} // namespace fused_matmul
38} // namespace optiling37} // namespace optiling
39-#endif // __OP_HOST_FUSED_MATMUL_ITERBATCH_BASIC_TILING_H__38+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_simplifiedkey.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_FUSED_MATMUL_SIMPILIFIEDKEY_H__16+#pragma once
17-#define __OP_HOST_FUSED_MATMUL_SIMPILIFIEDKEY_H__
18 17 
19#include "log/log.h"18#include "log/log.h"
20#include "error_util.h"19#include "error_util.h"
@@ -92,4 +91,4 @@ inline ge::graphStatus GenSimplifiedKey(gert::TilingContext* context, ge::char_t
92}91}
93} // namespace fused_matmul92} // namespace fused_matmul
94} // namespace optiling93} // namespace optiling
95-#endif // __OP_HOST_FUSED_MATMUL_SIMPILIFIEDKEY_H__94+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_tiling.h12 * \file fused_matmul_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_TILING_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_TILING_H__
17 16 
18#include <nlohmann/json.hpp>17#include <nlohmann/json.hpp>
19 18 
@@ -48,4 +47,4 @@ private:
48};47};
49} // namespace fused_matmul48} // namespace fused_matmul
50} // namespace optiling49} // namespace optiling
51-#endif // __OP_HOST_FUSED_MATMUL_TILING_H__50+ 
Mmatmul/fused_mat_mul/op_host/op_tiling/arch35/fused_matmul_tiling_key.h+1-3
@@ -12,8 +12,7 @@
12 * \file fused_matmul_tiling_key.h12 * \file fused_matmul_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_FUSED_MATMUL_TILING_KEY_H__15+#pragma once
16-#define __OP_HOST_FUSED_MATMUL_TILING_KEY_H__
17 16 
18#include <sstream>17#include <sstream>
19#include "op_host/tiling_key.h"18#include "op_host/tiling_key.h"
@@ -39,4 +38,3 @@ protected:
39} // namespace fused_matmul38} // namespace fused_matmul
40} // namespace optiling39} // namespace optiling
41 40 
42-#endif // __OP_HOST_FUSED_MATMUL_TILING_KEY_H__
Mmatmul/fused_mat_mul/op_kernel/arch35/fused_mat_mul_tiling_data.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_mat_mul_tiling_data.h12 * \file fused_mat_mul_tiling_data.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_FUSED_MAT_MUL_TILING_DATA_H__15+#pragma once
16-#define __OP_KERNEL_FUSED_MAT_MUL_TILING_DATA_H__
17 16 
18#ifndef __CCE_AICORE__17#ifndef __CCE_AICORE__
19#include <cstdint>18#include <cstdint>
@@ -27,4 +26,4 @@ struct FusedMatMulTilingData {
27 uint32_t hasBias = 0;26 uint32_t hasBias = 0;
28};27};
29#pragma pack(pop)28#pragma pack(pop)
30-#endif // __OP_KERNEL_FUSED_MAT_MUL_TILING_DATA_H__29+ 
Mmatmul/fused_mat_mul/op_kernel/arch35/fused_mat_mul_tiling_key_public.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_mat_mul_tiling_key_public.h12 * \file fused_mat_mul_tiling_key_public.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef FUSED_MAT_MUL_TILING_KEY_PUBLIC_H15+#pragma once
16-#define FUSED_MAT_MUL_TILING_KEY_PUBLIC_H
17#if defined(__CCE_AICORE__)16#if defined(__CCE_AICORE__)
18#include "../../mat_mul_v3/arch35/mat_mul_v3_tiling_key_public.h"17#include "../../mat_mul_v3/arch35/mat_mul_v3_tiling_key_public.h"
19#else18#else
@@ -35,4 +34,4 @@
35 34 
36#define MAT_MUL_FOR_BATCH 035#define MAT_MUL_FOR_BATCH 0
37#define MAT_MUL_ITER_BATCH_SINGLE_BIAS 136#define MAT_MUL_ITER_BATCH_SINGLE_BIAS 1
38-#endif37+ 
Mmatmul/fused_mat_mul/op_kernel/arch35/fused_mat_mul_tilingkey.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef FUSED_MAT_MUL_TILINGKEY_H16+#pragma once
17-#define FUSED_MAT_MUL_TILINGKEY_H
18 17 
19#include "ascendc/host_api/tiling/template_argument.h"18#include "ascendc/host_api/tiling/template_argument.h"
20#include "fused_mat_mul_tiling_key_public.h"19#include "fused_mat_mul_tiling_key_public.h"
@@ -139,4 +138,4 @@ ASCENDC_TPL_SEL(
139 ASCENDC_TPL_UINT_SEL(OPTYPE, ASCENDC_TPL_UI_LIST, F_OPTYPE_RELU)),138 ASCENDC_TPL_UINT_SEL(OPTYPE, ASCENDC_TPL_UI_LIST, F_OPTYPE_RELU)),
140#endif139#endif
141);140);
142-#endif // FUSED_MAT_MUL_TILINGKEY_H141+ 
Mmatmul/fused_quant_mat_mul/op_host/op_tiling/arch35/fused_quant_matmul_asw_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_quant_matmul_asw_tiling.h12 * \file fused_quant_matmul_asw_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef FUSED_QUANT_MATMUL_ASW_TILING_H15+#pragma once
16-#define FUSED_QUANT_MATMUL_ASW_TILING_H
17 16 
18 17 
19#include "../fused_quant_matmul_common.h"18#include "../fused_quant_matmul_common.h"
@@ -58,4 +57,4 @@ protected:
58 uint64_t fusedOpType_ = 0UL;57 uint64_t fusedOpType_ = 0UL;
59};58};
60} // namespace optiling59} // namespace optiling
61-#endif // FUSED_QUANT_MATMUL_ASW_TILING_H60+ 
Mmatmul/fused_quant_mat_mul/op_host/op_tiling/arch35/fused_quant_matmul_checker.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_quant_matmul_checker.h12 * \file fused_quant_matmul_checker.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef FUSED_QUANT_MATMUL_CHECKER_H15+#pragma once
16-#define FUSED_QUANT_MATMUL_CHECKER_H
17 16 
18#include "register/tilingdata_base.h"17#include "register/tilingdata_base.h"
19#include "tiling/tiling_api.h"18#include "tiling/tiling_api.h"
@@ -48,4 +47,4 @@ protected:
48 const gert::StorageShape *offsetShape, const std::vector<int64_t> &dimValueOfMKN) const;47 const gert::StorageShape *offsetShape, const std::vector<int64_t> &dimValueOfMKN) const;
49};48};
50} // namespace optiling49} // namespace optiling
51-#endif // FUSED_QUANT_MATMUL_CHECKER_H50+ 
Mmatmul/fused_quant_mat_mul/op_host/op_tiling/arch35/fused_quant_matmul_swiglu_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_quant_matmul_swiglu_tiling.h12 * \file fused_quant_matmul_swiglu_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef FUSED_QUANT_MATMUL_SWIGLU_H15+#pragma once
16-#define FUSED_QUANT_MATMUL_SWIGLU_H
17#include "fused_quant_matmul_asw_tiling.h"16#include "fused_quant_matmul_asw_tiling.h"
18 17 
19namespace optiling {18namespace optiling {
@@ -73,4 +72,4 @@ protected:
73 ge::graphStatus PostTiling() override;72 ge::graphStatus PostTiling() override;
74};73};
75}74}
76-#endif // FUSED_QUANT_MATMUL_SWIGLU_H75+ 
Mmatmul/fused_quant_mat_mul/op_kernel/arch35/fused_quant_mat_mul_tiling_data.h+1-4
@@ -12,8 +12,7 @@
12 * \file fused_quant_mat_mul_tiling_data.h12 * \file fused_quant_mat_mul_tiling_data.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_FUSED_QUANT_MAT_MUL_TILING_DATA_H__15+#pragma once
16-#define __OP_KERNEL_FUSED_QUANT_MAT_MUL_TILING_DATA_H__
17#include "kernel_tiling/kernel_tiling.h"16#include "kernel_tiling/kernel_tiling.h"
18 17 
19#ifndef __CCE_AICORE__18#ifndef __CCE_AICORE__
@@ -43,5 +42,3 @@ struct FusedQuantMatmulSwigluTilingData {
43};42};
44#pragma pack(pop)43#pragma pack(pop)
45 44 
46- 
47-#endif // __OP_KERNEL_FUSED_QUANT_MAT_MUL_TILING_DATA_H__
Mmatmul/fused_quant_mat_mul/op_kernel/arch35/fused_quant_mat_mul_tilingkey.h+2-3
@@ -12,8 +12,7 @@
12 * \file fused_quant_mat_mul_tilingkey.h12 * \file fused_quant_mat_mul_tilingkey.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef FUSED_QUANT_MAT_MUL_TILINGKEY_H15+#pragma once
16-#define FUSED_QUANT_MAT_MUL_TILINGKEY_H
17 16 
18#include "ascendc/host_api/tiling/template_argument.h"17#include "ascendc/host_api/tiling/template_argument.h"
19 18 
@@ -60,4 +59,4 @@ ASCENDC_TPL_SEL(ASCENDC_TPL_ARGS_SEL(
60 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOBL1_WITH_MMAPI),59 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOBL1_WITH_MMAPI),
61 ASCENDC_TPL_UINT_SEL(OPTYPE, ASCENDC_TPL_UI_LIST, F_OPTYPE_NONE, F_OPTYPE_RELU, F_OPTYPE_SWIGLU)), );60 ASCENDC_TPL_UINT_SEL(OPTYPE, ASCENDC_TPL_UI_LIST, F_OPTYPE_NONE, F_OPTYPE_RELU, F_OPTYPE_SWIGLU)), );
62} // namespace FusedQuantMatMulTilingKey61} // namespace FusedQuantMatMulTilingKey
63-#endif62+ 
Mmatmul/gemm_v3/op_host/op_tiling/arch35/gemmv3_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file gemmv3_tiling.h12 * \file gemmv3_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_GEMMV3_TILING_H__15+#pragma once
16-#define __OP_HOST_GEMMV3_TILING_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"
19namespace optiling {18namespace optiling {
@@ -40,4 +39,4 @@ protected:
40};39};
41} // namespace gemmv340} // namespace gemmv3
42} // namespace optiling41} // namespace optiling
43-#endif // __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_H__42+ 
Mmatmul/gemm_v3/op_host/op_tiling/arch35/gemmv3_tiling_key.h+1-3
@@ -13,8 +13,7 @@
13 * \file gemmv3_tiling_key.h13 * \file gemmv3_tiling_key.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_GEMM_V3_TILING_KEY_H__16+#pragma once
17-#define __OP_HOST_GEMM_V3_TILING_KEY_H__
18 17 
19#include <sstream>18#include <sstream>
20#include "op_host/tiling_key.h"19#include "op_host/tiling_key.h"
@@ -29,4 +28,3 @@ public:
29} // namespace matmul_v3_advanced28} // namespace matmul_v3_advanced
30} // namespace optiling29} // namespace optiling
31 30 
32-#endif // __OP_HOST_GEMM_V3_TILING_KEY_H__
Mmatmul/gemm_v3/op_host/op_tiling/arch35/gemmv3_tiling_strategy.h+1-3
@@ -12,8 +12,7 @@
12 * \file gemmv3_tiling_strategy.h12 * \file gemmv3_tiling_strategy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_GEMMV3_TILING_STRATEGY_H__15+#pragma once
16-#define __OP_HOST_GEMMV3_TILING_STRATEGY_H__
17 16 
18#include <map>17#include <map>
19#include <vector>18#include <vector>
@@ -43,4 +42,3 @@ inline std::vector<int32_t> GetGemmV3Priorities(NpuArch npuArch)
43} // namespace gemmv342} // namespace gemmv3
44} // namespace optiling43} // namespace optiling
45 44 
46-#endif // __OP_HOST_GEMMV3_TILING_STRATEGY_H__
Mmatmul/gemm_v3/op_kernel/arch35/gemm_v3_tiling_key.h+2-3
@@ -13,8 +13,7 @@
13 * \file gemm_v3_tiling_key.h13 * \file gemm_v3_tiling_key.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_KERNEL_GEMM_V3_TILING_KEY_H__16+#pragma once
17-#define __OP_KERNEL_GEMM_V3_TILING_KEY_H__
18 17 
19#include "ascendc/host_api/tiling/template_argument.h"18#include "ascendc/host_api/tiling/template_argument.h"
20 19 
@@ -72,4 +71,4 @@ ASCENDC_TPL_SEL(
72 ASCENDC_TPL_UINT_SEL(FULL_LOAD, ASCENDC_TPL_UI_LIST, MAT_MUL_NO_FULL_LOAD),71 ASCENDC_TPL_UINT_SEL(FULL_LOAD, ASCENDC_TPL_UI_LIST, MAT_MUL_NO_FULL_LOAD),
73 ASCENDC_TPL_UINT_SEL(L0C2OUT_MODEL, ASCENDC_TPL_UI_LIST, MAT_MUL_ON_THE_FLY))72 ASCENDC_TPL_UINT_SEL(L0C2OUT_MODEL, ASCENDC_TPL_UI_LIST, MAT_MUL_ON_THE_FLY))
74); // __OP_KERNEL_GEMM_V3_TILING_KEY_H__73); // __OP_KERNEL_GEMM_V3_TILING_KEY_H__
75-#endif74+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_base_tiling.h+1-3
@@ -12,8 +12,7 @@
12 * \file matmul_base_tiling.h12 * \file matmul_base_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_MATMUL_BASE_TILING_H__15+#pragma once
16-#define __OP_HOST_MATMUL_BASE_TILING_H__
17 16 
18#include "exe_graph/runtime/tiling_context.h"17#include "exe_graph/runtime/tiling_context.h"
19#include "log/log.h"18#include "log/log.h"
@@ -92,4 +91,3 @@ protected:
92};91};
93} // namespace optiling92} // namespace optiling
94 93 
95-#endif // __OP_HOST_MATMUL_BASE_TILING_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_tiling_cfg.h+1-3
@@ -12,8 +12,7 @@
12 * \file matmul_tiling_cfg.h12 * \file matmul_tiling_cfg.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_MATMUL_TILING_CFG_H__15+#pragma once
16-#define __OP_HOST_MATMUL_TILING_CFG_H__
17 16 
18#include <cstdint>17#include <cstdint>
19#include <cstddef>18#include <cstddef>
@@ -51,4 +50,3 @@ public:
51};50};
52} // namespace optiling51} // namespace optiling
53 52 
54-#endif // __OP_HOST_MATMUL_TILING_CFG_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_tiling_registry.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_MATMUL_TILING_REGISTRY_H__16+#pragma once
17-#define __OP_HOST_MATMUL_TILING_REGISTRY_H__
18 17 
19#include <map>18#include <map>
20#include <string>19#include <string>
@@ -188,4 +187,3 @@ private:
188 MMRegister(#opType).tiling<className>(static_cast<int32_t>(priority), NpuArch::npuArch)187 MMRegister(#opType).tiling<className>(static_cast<int32_t>(priority), NpuArch::npuArch)
189} // namespace optiling188} // namespace optiling
190 189 
191-#endif // __OP_HOST_MATMUL_TILING_REGISTRY_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_asw_loadbalance_table.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_asw_loadbalance_table.h13 * \file matmul_v3_asw_loadbalance_table.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_ASW_LOADBALANCE_TABLE_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_ASW_LOADBALANCE_TABLE_H__
18 17 
19#include <vector>18#include <vector>
20#include <cstdint>19#include <cstdint>
@@ -89,4 +88,4 @@ const std::vector<std::tuple<uint64_t, uint64_t, uint64_t, double, double>> BLOC
89};88};
90} // namespace matmul_v3_advanced89} // namespace matmul_v3_advanced
91} // namespace optiling90} // namespace optiling
92-#endif // __OP_HOST_MATMUL_V3_ASW_LOADBALANCE_TABLE_H__91+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_asw_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file matmul_v3_asw_tiling.h12 * \file matmul_v3_asw_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_MATMUL_V3_ASW_TILING_H__15+#pragma once
16-#define __OP_HOST_MATMUL_V3_ASW_TILING_H__
17 16 
18#include "matmul_v3_base_tiling_advanced.h"17#include "matmul_v3_base_tiling_advanced.h"
19 18 
@@ -68,4 +67,4 @@ private:
68};67};
69} // namespace matmul_v3_advanced68} // namespace matmul_v3_advanced
70} // namespace optiling69} // namespace optiling
71-#endif // __OP_HOST_MATMUL_V3_ASW_TILING_H__70+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_base_tiling_advanced.h13 * \file matmul_v3_base_tiling_advanced.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_BASE_TILING_ADVANCED_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_BASE_TILING_ADVANCED_H__
18 17 
19#include "matmul/common/op_host/math_util.h"18#include "matmul/common/op_host/math_util.h"
20#include "matmul_base_tiling.h"19#include "matmul_base_tiling.h"
@@ -485,4 +484,4 @@ private:
485};484};
486} // namespace matmul_v3485} // namespace matmul_v3
487}486}
488-#endif // __OP_HOST_MATMUL_V3_BASE_TILING_ADVANCED_H__487+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_aswt_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_basic_aswt_tiling.h13 * \file matmul_v3_basic_aswt_tiling.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_FULL_LOAD_TILING_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_FULL_LOAD_TILING_H__
18 17 
19#include "matmul_v3_asw_tiling.h"18#include "matmul_v3_asw_tiling.h"
20#include "matmul_v3_common_advanced.h"19#include "matmul_v3_common_advanced.h"
@@ -56,4 +55,4 @@ private:
56};55};
57} // namespace matmul_v356} // namespace matmul_v3
58} // namespace optiling57} // namespace optiling
59-#endif // __OP_HOST_MATMUL_V3_FULL_LOAD_TILING_H__58+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_basic_streamk_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_basic_streamk_tiling.h13 * \file matmul_v3_basic_streamk_tiling.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_BASIC_STREAMK_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_BASIC_STREAMK_H__
18 17 
19#include "matmul_v3_base_tiling_advanced.h"18#include "matmul_v3_base_tiling_advanced.h"
20 19 
@@ -51,4 +50,4 @@ private:
51};50};
52} // namespace matmul_v351} // namespace matmul_v3
53} // namespace optiling52} // namespace optiling
54-#endif // __OP_HOST_MATMUL_V3_BASIC_STREAM_K_H__53+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_common_advanced.h13 * \file matmul_v3_common_advanced.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_COMMON_ADVANCED_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_COMMON_ADVANCED_H__
18 17 
19#include <cstdint>18#include <cstdint>
20#include "graph/types.h"19#include "graph/types.h"
@@ -175,4 +174,4 @@ struct MatMulV3RunInfo {
175};174};
176}175}
177}176}
178-#endif // __OP_HOST_MATMUL_V3_COMMON_ADVANCED_H__177+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_compile_info_advanced.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_compile_info_advanced.h13 * \file matmul_v3_compile_info_advanced.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_COMPILE_INFO_ADVANCED_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_COMPILE_INFO_ADVANCED_H__
18 17 
19#include "platform/platform_infos_def.h"18#include "platform/platform_infos_def.h"
20#include "tiling/platform/platform_ascendc.h"19#include "tiling/platform/platform_ascendc.h"
@@ -76,4 +75,4 @@ inline ge::graphStatus InitCompileInfo(gert::TilingParseContext *context)
76}75}
77}76}
78} // namespace optiling::matmul_v377} // namespace optiling::matmul_v3
79-#endif // __OP_HOST_MATMUL_V3_COMPILE_INFO_ADVANCED_H__78+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_k_equal_zero_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_k_equal_zero_tiling.h13 * \file matmul_v3_k_equal_zero_tiling.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_K_EQUAL_ZERO_TILING_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_K_EQUAL_ZERO_TILING_H__
18 17 
19#include "matmul_v3_base_tiling_advanced.h"18#include "matmul_v3_base_tiling_advanced.h"
20 19 
@@ -39,4 +38,4 @@ protected:
39};38};
40} // namespace matmul_v339} // namespace matmul_v3
41} // namespace optiling40} // namespace optiling
42-#endif // __OP_HOST_MATMUL_V3_K_EQUAL_ZERO_H__41+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_tiling_advanced.h13 * \file matmul_v3_tiling_advanced.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_ADVANCED_TILING_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_ADVANCED_TILING_H__
18 17 
19#include "runtime/tiling_context.h"18#include "runtime/tiling_context.h"
20#include "matmul_v3_common_advanced.h"19#include "matmul_v3_common_advanced.h"
@@ -52,4 +51,4 @@ protected:
52};51};
53}52}
54}53}
55-#endif // __OP_HOST_MATMUL_V3_ADVANCED_TILING_H__54+ 
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_data.h+1-3
@@ -13,12 +13,10 @@
13 * \file matmul_v3_tiling_data.h13 * \file matmul_v3_tiling_data.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_TILING_DATA_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_TILING_DATA_H__
18 17 
19#include "register/tilingdata_base.h"18#include "register/tilingdata_base.h"
20#include "tiling/tiling_api.h"19#include "tiling/tiling_api.h"
21 20 
22#include "../../../op_kernel/arch35/mat_mul_tiling_data.h"21#include "../../../op_kernel/arch35/mat_mul_tiling_data.h"
23 22 
24-#endif // __OP_HOST_MATMUL_V3_TILING_DATA_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_helper.h+1-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_tiling_helper.h13 * \file matmul_v3_tiling_helper.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_TILING_HELPER_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_TILING_HELPER_H__
18 17 
19#include "matmul_v3_common_advanced.h"18#include "matmul_v3_common_advanced.h"
20#include "matmul_v3_compile_info_advanced.h"19#include "matmul_v3_compile_info_advanced.h"
@@ -44,4 +43,3 @@ public:
44}43}
45}44}
46 45 
47-#endif // __OP_HOST_MATMUL_V3_TILING_HELPER_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_key.h+1-3
@@ -12,8 +12,7 @@
12 * \file matmul_v3_tiling_key.h12 * \file matmul_v3_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef OP_HOST_MATMUL_V3_TILING_KEY_H15+#pragma once
16-#define OP_HOST_MATMUL_V3_TILING_KEY_H
17 16 
18#include <sstream>17#include <sstream>
19#include "../../../op_kernel/arch35/mat_mul_v3_tiling_key_public.h"18#include "../../../op_kernel/arch35/mat_mul_v3_tiling_key_public.h"
@@ -120,4 +119,3 @@ protected:
120} // namespace matmul_v3_advanced119} // namespace matmul_v3_advanced
121} // namespace optiling120} // namespace optiling
122 121 
123-#endif // OP_HOST_MATMUL_V3_TILING_KEY_H
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_strategy.h+1-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_tiling_strategy.h13 * \file matmul_v3_tiling_strategy.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_STRATEGY_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_STRATEGY_H__
18 17 
19#include <map>18#include <map>
20#include <vector>19#include <vector>
@@ -50,4 +49,3 @@ inline std::vector<int32_t> GetMatMulV3Priorities(NpuArch npuArch)
50}49}
51}50}
52 51 
53-#endif // __OP_HOST_MATMUL_V3_STRATEGY_H__
Mmatmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_to_mul_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \file matmul_v3_to_mul_tiling.h13 * \file matmul_v3_to_mul_tiling.h
14 * \brief14 * \brief
15 */15 */
16-#ifndef __OP_HOST_MATMUL_V3_TO_MUL_TILING_H__16+#pragma once
17-#define __OP_HOST_MATMUL_V3_TO_MUL_TILING_H__
18 17 
19#include "matmul_v3_base_tiling_advanced.h"18#include "matmul_v3_base_tiling_advanced.h"
20 19 
@@ -42,4 +41,4 @@ private:
42};41};
43} // namespace matmul_v342} // namespace matmul_v3
44} // namespace optiling43} // namespace optiling
45-#endif // __OP_HOST_MATMUL_V3_TO_MUL_TILING_H__44+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/block_scheduler_aswt.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_BLOCK_SCHEDULER_ASWT_BUILTIN_H16+#pragma once
17-#define CMCT_BLOCK_SCHEDULER_ASWT_BUILTIN_H
18 17 
19#include "cmct/block/block_scheduler_policy.h"18#include "cmct/block/block_scheduler_policy.h"
20#include "cmct/block/block_scheduler_utils.h"19#include "cmct/block/block_scheduler_utils.h"
@@ -462,4 +461,4 @@ struct BlockSchedulerSelector<
462} // namespace Block461} // namespace Block
463} // namespace Gemm462} // namespace Gemm
464} // namespace Cmct463} // namespace Cmct
465-#endif464+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/block_scheduler_mul.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_BLOCK_SCHEDULER_MUL_BUILTIN_H16+#pragma once
17-#define CMCT_BLOCK_SCHEDULER_MUL_BUILTIN_H
18 17 
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
20#include "cmct/block/block_scheduler_policy.h"19#include "cmct/block/block_scheduler_policy.h"
@@ -109,4 +108,4 @@ using SchedulerOp = BlockSchedulerMulBuiltIn<ProblemShape_, L1TileShape_, L0Tile
109} // namespace Block108} // namespace Block
110} // namespace Gemm109} // namespace Gemm
111} // namespace Cmct110} // namespace Cmct
112-#endif111+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/block_scheduler_streamk.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef CMCT_BLOCK_SCHEDULER_STREAMK_BUILTIN_H16+#pragma once
17-#define CMCT_BLOCK_SCHEDULER_STREAMK_BUILTIN_H
18 17 
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
20#include "cmct/block/block_scheduler_policy.h"19#include "cmct/block/block_scheduler_policy.h"
@@ -209,4 +208,4 @@ using SchedulerOp = BlockSchedulerStreamKBuiltIn<ProblemShape_, L1TileShape_, L0
209} // namespace Block208} // namespace Block
210} // namespace Gemm209} // namespace Gemm
211} // namespace Cmct210} // namespace Cmct
212-#endif211+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_asw_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_asw_block.h12 * \file mat_mul_asw_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MMV3_MATMUL_ASW_BLOCK_H15+#pragma once
16-#define MMV3_MATMUL_ASW_BLOCK_H
17 16 
18#include "../mat_mul_v3_common.h"17#include "../mat_mul_v3_common.h"
19#include "mat_mul_tiling_data.h"18#include "mat_mul_tiling_data.h"
@@ -306,4 +305,3 @@ __aicore__ inline void MatmulAswBlock::CalcSplitKGMOffset(uint64_t splitKIndex)
306 305 
307} // namespace MatmulV3Advanced306} // namespace MatmulV3Advanced
308 307 
309-#endif // MMV3_MATMUL_ASW_BLOCK_H
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_asw_kernel.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_asw_kernel.h12 * \file mat_mul_asw_kernel.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MMV3_MATMUL_ASW_KERNEL_H15+#pragma once
16-#define MMV3_MATMUL_ASW_KERNEL_H
17 16 
18#include "mat_mul_asw_block.h"17#include "mat_mul_asw_block.h"
19 18 
@@ -145,4 +144,3 @@ __aicore__ inline void MatmulAswKernel<A_TYPE, B_TYPE, C_TYPE, BIAS_TYPE, BLOCK_
145 144 
146} // namespace MatmulV3Advanced145} // namespace MatmulV3Advanced
147 146 
148-#endif // MMV3_MATMUL_ASW_KERNEL_H
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_fixpipe_opti.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_fixpipe_opti.h12 * \file mat_mul_fixpipe_opti.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_MATMUL_V3_FIXPIPE_OPTI_H__15+#pragma once
16-#define __OP_KERNEL_MATMUL_V3_FIXPIPE_OPTI_H__
17 16 
18#include "mat_mul_asw_block.h"17#include "mat_mul_asw_block.h"
19#include "mm_extension_interface/mm_custom_mm_policy.h"18#include "mm_extension_interface/mm_custom_mm_policy.h"
@@ -270,4 +269,3 @@ __aicore__ inline void MatmulFixpipeOptiDualDstKernel<A_TYPE, B_TYPE, C_TYPE, BI
270 269 
271} // namespace MatmulV3Advanced270} // namespace MatmulV3Advanced
272 271 
273-#endif
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_fixpipe_opti_basic_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_fixpipe_basic_cmct.h12 * \file mat_mul_fixpipe_basic_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MAT_MUL_FIXPIPE_BASIC_CMCT_H15+#pragma once
16-#define MAT_MUL_FIXPIPE_BASIC_CMCT_H
17 16 
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -78,4 +77,4 @@ __aicore__ inline void MatMulFixpipeOptiActKernel(
78 mm(params);77 mm(params);
79}78}
80}79}
81-#endif80+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_full_load.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_full_load.h12 * \file mat_mul_full_load.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MMV3_MATMUL_FULL_LOAD_H15+#pragma once
16-#define MMV3_MATMUL_FULL_LOAD_H
17 16 
18#include "mat_mul_asw_block.h"17#include "mat_mul_asw_block.h"
19#include "mat_mul_v3_full_load_kernel_helper.h"18#include "mat_mul_v3_full_load_kernel_helper.h"
@@ -272,4 +271,3 @@ __aicore__ inline void MatmulAswKernelABL1FullLoad<A_TYPE, B_TYPE, C_TYPE, BIAS_
272 271 
273} // namespace MatmulV3Advanced272} // namespace MatmulV3Advanced
274 273 
275-#endif // MMV3_MATMUL_FULL_LOAD_H
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_input_k_eq_zero_clear_output.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_input_k_eq_zero_clear_output.h12 * \file mat_mul_input_k_eq_zero_clear_output.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MAT_MUL_INPUT_K_EQ_ZERO_CLEAR_OUTPUT_H15+#pragma once
16-#define MAT_MUL_INPUT_K_EQ_ZERO_CLEAR_OUTPUT_H
17 16 
18#ifndef DTYPE_Y17#ifndef DTYPE_Y
19#define DTYPE_Y half18#define DTYPE_Y half
@@ -64,4 +63,4 @@ __aicore__ inline void MatMulInputKEqZeroClearOutput(GM_ADDR biasGM, GM_ADDR cGM
64 AscendC::InitOutput<DTYPE_Y>(outputGM[coreIdx * everyAivDataCount], static_cast<uint64_t>(copyDataAmount), (DTYPE_Y)0);63 AscendC::InitOutput<DTYPE_Y>(outputGM[coreIdx * everyAivDataCount], static_cast<uint64_t>(copyDataAmount), (DTYPE_Y)0);
65}64}
66}65}
67-#endif66+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_mix_basic_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_mix_basic_cmct.h12 * \file mat_mul_mix_basic_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef OP_KERNEL_MATMUL_MIX_BASIC_CMCT_H15+#pragma once
16-#define OP_KERNEL_MATMUL_MIX_BASIC_CMCT_H
17 16 
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -92,4 +91,4 @@ __aicore__ inline void MatMulMixWithoutQueActKernel(GM_ADDR aGM, GM_ADDR bGM, GM
92 mm(params);91 mm(params);
93}92}
94}93}
95-#endif // OP_KERNEL_MATMUL_MIX_BASIC_CMCT_H94+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_pingpong_basic_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_pingpong_basic_cmct.h12 * \file mat_mul_pingpong_basic_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MAT_MUL_PINGPONG_BASIC_CMCT_H15+#pragma once
16-#define MAT_MUL_PINGPONG_BASIC_CMCT_H
17 16 
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -72,4 +71,4 @@ __aicore__ inline void MatMulActKernel(GM_ADDR aGM, GM_ADDR bGM, GM_ADDR biasGM,
72 mm(params);71 mm(params);
73}72}
74}73}
75-#endif74+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_stream_k_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_stream_k_block.h12 * \file mat_mul_stream_k_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MMV3_MATMUL_STREAM_K_BLOCK_H15+#pragma once
16-#define MMV3_MATMUL_STREAM_K_BLOCK_H
17 16 
18#include "mat_mul_asw_block.h"17#include "mat_mul_asw_block.h"
19 18 
@@ -267,4 +266,3 @@ __aicore__ inline void MatmulStreamKBlock::UpdateAivParams(uint64_t index, uint6
267}266}
268} // namespace MatmulV3Advanced267} // namespace MatmulV3Advanced
269 268 
270-#endif // MMV3_MATMUL_STREAM_K_BLOCK_H
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_stream_k_kernel.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_stream_k_kernel.h12 * \file mat_mul_stream_k_kernel.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MMV3_MATMUL_STREAM_K_KERNEL_H15+#pragma once
16-#define MMV3_MATMUL_STREAM_K_KERNEL_H
17#ifndef DTYPE_Y16#ifndef DTYPE_Y
18#define DTYPE_Y half17#define DTYPE_Y half
19#endif18#endif
@@ -291,4 +290,3 @@ __aicore__ inline void MatmulStreamKKernel
291}290}
292} // namespace MatmulV3Advanced291} // namespace MatmulV3Advanced
293 292 
294-#endif // MMV3_MATMUL_STREAM_K_KERNEL_H
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_streamk_basic_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_streamk_basic_cmct.h12 * \file mat_mul_streamk_basic_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MAT_MUL_STREAMK_BASIC_CMCT_H15+#pragma once
16-#define MAT_MUL_STREAMK_BASIC_CMCT_H
17 16 
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -75,4 +74,4 @@ __aicore__ inline void MatMulStreamKActKernel(GM_ADDR aGM, GM_ADDR bGM, GM_ADDR
75 MatmulKernel mm;74 MatmulKernel mm;
76 mm(params);75 mm(params);
77}76}
78-#endif77+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_tiling_data.h+1-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_tiling_data.h12 * \file mat_mul_tiling_data.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_MATMUL_TILING_DATA_H__15+#pragma once
16-#define __OP_KERNEL_MATMUL_TILING_DATA_H__
17 16 
18#include "kernel_tiling/kernel_tiling.h"17#include "kernel_tiling/kernel_tiling.h"
19 18 
@@ -198,4 +197,3 @@ struct MatMulToMulBasicTilingData{
198};197};
199#pragma pack(pop)198#pragma pack(pop)
200 199 
201-#endif // __OP_KERNEL_MATMUL_TILING_DATA_H__
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_to_mul_cmct.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MAT_MUL_TO_MUL_CMCT_H16+#pragma once
17-#define MAT_MUL_TO_MUL_CMCT_H
18 17 
19#include "cmct/block/block_scheduler_policy.h"18#include "cmct/block/block_scheduler_policy.h"
20#include "cmct/block/block_scheduler_utils.h"19#include "cmct/block/block_scheduler_utils.h"
@@ -73,4 +72,4 @@ __aicore__ inline void MatMulToMulActKernel(
73 mm(params);72 mm(params);
74}73}
75}74}
76-#endif75+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_v3_full_load_kernel_helper.h+2-3
@@ -12,8 +12,7 @@
12 * \file mat_mul_v3_full_load_kernel_helper.h12 * \file mat_mul_v3_full_load_kernel_helper.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_MAT_MUL_V3_FULL_LOAD_KERNEL_HELPER_H__15+#pragma once
16-#define __OP_KERNEL_MAT_MUL_V3_FULL_LOAD_KERNEL_HELPER_H__
17 16 
18#include "../mat_mul_v3_common.h"17#include "../mat_mul_v3_common.h"
19 18 
@@ -226,4 +225,4 @@ __aicore__ inline void AswBL1FullLoadKernelMainLoop(MatmulImpl<A_TYPE, B_TYPE, C
226}225}
227 226 
228} // namespace MatmulV3Advanced227} // namespace MatmulV3Advanced
229-#endif // __OP_KERNEL_MAT_MUL_V3_FULL_LOAD_KERNEL_HELPER_H__228+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mat_mul_v3_tiling_key_public.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef MAT_MUL_TILING_KEY_PUBLIC_H16+#pragma once
17-#define MAT_MUL_TILING_KEY_PUBLIC_H
18 17 
19#define MAT_MUL_BASIC_LEVEL 1 // 数据类型定义18#define MAT_MUL_BASIC_LEVEL 1 // 数据类型定义
20#define MAT_MUL_HIGH_LEVEL 019#define MAT_MUL_HIGH_LEVEL 0
@@ -89,4 +88,4 @@ enum class MatMulV3L0C2Out : std::uint8_t
89 ND_FIXPIPE_1_1 = MAT_MUL_1V1_ND_ALIG_FIXPIPE,88 ND_FIXPIPE_1_1 = MAT_MUL_1V1_ND_ALIG_FIXPIPE,
90 ND_FIXPIPE_1_2 = MAT_MUL_1V2_ND_ALIG_FIXPIPE89 ND_FIXPIPE_1_2 = MAT_MUL_1V2_ND_ALIG_FIXPIPE
91};90};
92-#endif91+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mm_extension_interface/mm_copy_cube_out.h+2-3
@@ -12,8 +12,7 @@
12 * \file mm_copy_cube_out.h12 * \file mm_copy_cube_out.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MM_COPY_CUBE_OUT_H15+#pragma once
16-#define MM_COPY_CUBE_OUT_H
17#include "lib/matmul_intf.h"16#include "lib/matmul_intf.h"
18 17 
19namespace MatmulCommon {18namespace MatmulCommon {
@@ -219,4 +218,4 @@ private:
219};218};
220 219 
221} // namespace MatmulCommon220} // namespace MatmulCommon
222-#endif // MM_COPY_CUBE_OUT_H221+ 
Mmatmul/mat_mul_v3/op_kernel/arch35/mm_extension_interface/mm_custom_mm_policy.h+2-3
@@ -12,8 +12,7 @@
12 * \file mm_custom_mm_policy.h12 * \file mm_custom_mm_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MM_CUSTOM_MM_POLICY_H15+#pragma once
16-#define MM_CUSTOM_MM_POLICY_H
17 16 
18#include "lib/matmul_intf.h"17#include "lib/matmul_intf.h"
19#include "mm_copy_cube_out.h"18#include "mm_copy_cube_out.h"
@@ -26,4 +25,4 @@ public:
26 using CopyCubeOut = MMCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;25 using CopyCubeOut = MMCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;
27};26};
28} // namespace MatmulCommon27} // namespace MatmulCommon
29-#endif // MM_CUSTOM_MM_POLICY_H28+ 
Mmatmul/quant_batch_matmul_inplace_add/op_kernel/arch35/qbmmia_mx_basic_api_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file qbmmia_mx_basic_api_cmct.h12 * \file qbmmia_mx_basic_api_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMMIA_MX_BAISC_API_CMCT_H15+#pragma once
16-#define QBMMIA_MX_BAISC_API_CMCT_H
17#include "cmct/block/block_mmad_mx.h"16#include "cmct/block/block_mmad_mx.h"
18#include "cmct/block/block_scheduler_policy.h"17#include "cmct/block/block_scheduler_policy.h"
19#include "cmct/block/block_scheduler_utils.h"18#include "cmct/block/block_scheduler_utils.h"
@@ -87,4 +86,4 @@ __aicore__ inline void QbmmiaMxBasicApiKernel(
87 MatmulKernel qbmm;86 MatmulKernel qbmm;
88 qbmm(params);87 qbmm(params);
89}88}
90-#endif89+ 
Mmatmul/quant_batch_matmul_inplace_add/op_kernel/arch35/quant_batch_matmul_inplace_add_tiling_data.h+2-3
@@ -11,8 +11,7 @@
11 * \file quant_matmul_inplace_add_tiling_data.h11 * \file quant_matmul_inplace_add_tiling_data.h
12 * \brief12 * \brief
13 */13 */
14-#ifndef QUANT_BATCH_MATMUL_INPLACE_ADD_TILING_DATA_H14+#pragma once
15-#define QUANT_BATCH_MATMUL_INPLACE_ADD_TILING_DATA_H
16#include "kernel_tiling/kernel_tiling.h"15#include "kernel_tiling/kernel_tiling.h"
17 16 
18#ifndef __CCE_AICORE__17#ifndef __CCE_AICORE__
@@ -86,4 +85,4 @@ struct QuantBatchMatmulInplaceAddTilingData {
86};85};
87#pragma pack(pop)86#pragma pack(pop)
88} // namespace QMMIA87} // namespace QMMIA
89-#endif // QUANT_BATCH_MATMUL_INPLACE_ADD_TILING_DATA_H88+ 
Mmatmul/quant_batch_matmul_inplace_add/op_kernel/arch35/quant_batch_matmul_inplace_add_tiling_key.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_inplace_add_tiling_key.h12 * \file quant_batch_matmul_inplace_add_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMMIA_ARCH35_TILING_KEY_H15+#pragma once
16-#define QBMMIA_ARCH35_TILING_KEY_H
17 16 
18#include "ascendc/host_api/tiling/template_argument.h"17#include "ascendc/host_api/tiling/template_argument.h"
19 18 
@@ -36,4 +35,4 @@ ASCENDC_TPL_SEL(ASCENDC_TPL_ARGS_SEL(
36 KERNELTYPE, ASCENDC_TPL_UI_LIST, TPL_NO_VEC_EPILOGUE_WITH_MMAPI,35 KERNELTYPE, ASCENDC_TPL_UI_LIST, TPL_NO_VEC_EPILOGUE_WITH_MMAPI,
37 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOAL1_WITH_MMAPI)));36 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOAL1_WITH_MMAPI)));
38} // namespace QuantBatchMatmulInplaceAddArch35TilingKey37} // namespace QuantBatchMatmulInplaceAddArch35TilingKey
39-#endif38+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_basic_api_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file adaptive_sliding_window_basic_api_tiling.h12 * \file adaptive_sliding_window_basic_api_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef ADAPTIVE_SLIDING_WINDOW_BASIC_API_TILING_H15+#pragma once
16-#define ADAPTIVE_SLIDING_WINDOW_BASIC_API_TILING_H
17#include "util/math_util.h"16#include "util/math_util.h"
18#include "../quant_batch_matmul_v3_tiling_base.h"17#include "../quant_batch_matmul_v3_tiling_base.h"
19#include "adaptive_sliding_window_tiling.h"18#include "adaptive_sliding_window_tiling.h"
@@ -57,4 +56,4 @@ protected:
57 DequantBmm::QuantBatchMatmulV3BasicAPITilingData &tilingData_;56 DequantBmm::QuantBatchMatmulV3BasicAPITilingData &tilingData_;
58};57};
59}58}
60-#endif // ADAPTIVE_SLIDING_WINDOW_BASIC_API_TILING_H59+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file adaptive_sliding_window_tiling.h12 * \file adaptive_sliding_window_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef ADAPTIVE_SLIDING_WINDOW_TILING_H15+#pragma once
16-#define ADAPTIVE_SLIDING_WINDOW_TILING_H
17#include "util/math_util.h"16#include "util/math_util.h"
18#include "../quant_batch_matmul_v3_tiling_base.h"17#include "../quant_batch_matmul_v3_tiling_base.h"
19#include "quant_batch_matmul_v3_tiling_util.h"18#include "quant_batch_matmul_v3_tiling_util.h"
@@ -147,4 +146,4 @@ protected:
147 uint64_t bCacheLine);146 uint64_t bCacheLine);
148};147};
149} // namespace optiling148} // namespace optiling
150-#endif // ADAPTIVE_SLIDING_WINDOW_TILING_H149+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_checker.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_checker.h12 * \file quant_batch_matmul_v3_checker.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V3_CHECKER_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V3_CHECKER_H
17#include "quant_batch_matmul_v3_checker_base.h"16#include "quant_batch_matmul_v3_checker_base.h"
18 17 
19namespace optiling {18namespace optiling {
@@ -71,4 +70,4 @@ protected:
71 bool CheckABDtypesSame() const;70 bool CheckABDtypesSame() const;
72};71};
73} // namespace optiling72} // namespace optiling
74-#endif // QUANT_BATCH_MATMUL_V3_CHECKER_H73+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_checker_base.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_checker_base.h12 * \file quant_batch_matmul_v3_checker_base.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V3_CHECKER_BASE_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V3_CHECKER_BASE_H
17#include "../quant_batch_matmul_v3_tiling_base.h"16#include "../quant_batch_matmul_v3_tiling_base.h"
18#include <cstdint>17#include <cstdint>
19#include <vector>18#include <vector>
@@ -81,4 +80,4 @@ protected:
81 }80 }
82};81};
83} // namespace optiling82} // namespace optiling
84-#endif // QUANT_BATCH_MATMUL_V3_CHECKER_BASE_H83+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_checker_for_mmads8s4.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_checker_for_mmads8s4.h12 * \file quant_batch_matmul_v3_checker_for_mmads8s4.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V3_CHECKER_FOR_MMADS8S4_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V3_CHECKER_FOR_MMADS8S4_H
17#include "quant_batch_matmul_v3_checker_base.h"16#include "quant_batch_matmul_v3_checker_base.h"
18#include <cstdint>17#include <cstdint>
19#include <vector>18#include <vector>
@@ -49,4 +48,4 @@ protected:
49 virtual bool ExtraInputCheck() const;48 virtual bool ExtraInputCheck() const;
50};49};
51} // namespace optiling50} // namespace optiling
52-#endif // QUANT_BATCH_MATMUL_V3_CHECKER_FOR_MMADS8S4_H51+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_iterbatch_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_iterbatch_tiling.h12 * \file quant_batch_matmul_v3_iterbatch_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V3_ITERBATCH_TILING_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V3_ITERBATCH_TILING_H
17#include "util/math_util.h"16#include "util/math_util.h"
18#include "../quant_batch_matmul_v3_tiling_base.h"17#include "../quant_batch_matmul_v3_tiling_base.h"
19#include "quant_batch_matmul_v3_tiling_util.h"18#include "quant_batch_matmul_v3_tiling_util.h"
@@ -62,4 +61,4 @@ private:
62 void Reset();61 void Reset();
63};62};
64}63}
65-#endif // QUANT_BATCH_MATMUL_V3_ITERBATCH_TILING_H64+ 
Mmatmul/quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_tiling_util.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_tiling_util.h12 * \file quant_batch_matmul_v3_tiling_util.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V3_TILING_UTIL_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V3_TILING_UTIL_H
17 16 
18#include "../quant_batch_matmul_v3_tiling_base.h"17#include "../quant_batch_matmul_v3_tiling_base.h"
19#include "../../../op_kernel/arch35/quant_batch_matmul_v3_tiling_data.h"18#include "../../../op_kernel/arch35/quant_batch_matmul_v3_tiling_data.h"
@@ -72,4 +71,4 @@ public:
72 static uint64_t GetBiasMode(const QuantBatchMatmulInfo &inputParams);71 static uint64_t GetBiasMode(const QuantBatchMatmulInfo &inputParams);
73};72};
74} // namespace optiling73} // namespace optiling
75-#endif74+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/mm_extension_interface/qbmm_copy_cube_out.h+2-3
@@ -12,8 +12,7 @@
12 * \file qbmm_copy_cube_out.h12 * \file qbmm_copy_cube_out.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_COPY_CUBE_OUT_H15+#pragma once
16-#define QBMM_COPY_CUBE_OUT_H
17#include "lib/matmul_intf.h"16#include "lib/matmul_intf.h"
18 17 
19namespace AscendC {18namespace AscendC {
@@ -219,4 +218,4 @@ namespace AscendC {
219 };218 };
220 219 
221 } // namespace AscendC220 } // namespace AscendC
222-#endif // QBMM_COPY_CUBE_OUT_H221+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/mm_extension_interface/qbmm_custom_mm_policy.h+2-3
@@ -12,8 +12,7 @@
12 * \file qbmm_custom_mm_policy.h12 * \file qbmm_custom_mm_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_CUSTOM_MM_POLICY_H15+#pragma once
16-#define QBMM_CUSTOM_MM_POLICY_H
17 16 
18#include "lib/matmul_intf.h"17#include "lib/matmul_intf.h"
19#include "qbmm_copy_cube_out.h"18#include "qbmm_copy_cube_out.h"
@@ -26,4 +25,4 @@ public:
26 using CopyCubeOut = QBmmCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;25 using CopyCubeOut = QBmmCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;
27};26};
28} // namespace AscendC27} // namespace AscendC
29-#endif // QBMM_CUSTOM_MM_POLICY_H28+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_api_utils.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_api_utils.h12 * \file qbmm_api_utils.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_API_UTILS_H15+#pragma once
16-#define QBMM_API_UTILS_H
17 16 
18#include "../quant_batch_matmul_v3_base.h"17#include "../quant_batch_matmul_v3_base.h"
19#include "qbmm_asw_block.h"18#include "qbmm_asw_block.h"
@@ -257,4 +256,3 @@ __aicore__ inline void ProcessWithBatch(QuantBmmAswBlock& block, T& object)
257 256 
258} // namespace QuantBatchMatmulV3257} // namespace QuantBatchMatmulV3
259 258 
260-#endif // QBMM_API_UTILS_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_asw_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_asw_block.h12 * \file qbmm_asw_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_ASW_BLOCK_H15+#pragma once
16-#define QBMM_ASW_BLOCK_H
17 16 
18#include "quant_batch_matmul_v3_tiling_data.h"17#include "quant_batch_matmul_v3_tiling_data.h"
19#include "../quant_batch_matmul_v3_base.h"18#include "../quant_batch_matmul_v3_base.h"
@@ -519,4 +518,3 @@ __aicore__ inline void QuantBmmAswBlock::UpdatePerBlockMmParam()
519}518}
520} // namespace QuantBatchMatmulV3519} // namespace QuantBatchMatmulV3
521 520 
522-#endif // QBMM_ASW_BLOCK_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_basic_api_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file qbmm_cube_basic_api_cmct.h12 * \file qbmm_cube_basic_api_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_CUBE_BAISC_API_CMCT_H15+#pragma once
16-#define QBMM_CUBE_BAISC_API_CMCT_H
17#include "cmct/block/block_scheduler_policy.h"16#include "cmct/block/block_scheduler_policy.h"
18#include "cmct/block/block_scheduler_utils.h"17#include "cmct/block/block_scheduler_utils.h"
19#include "cmct/epilogue/block_epilogue_empty.h"18#include "cmct/epilogue/block_epilogue_empty.h"
@@ -95,4 +94,4 @@ __aicore__ inline void QbmmCubeBasicApiKernel(
95 MatmulKernel qbmm;94 MatmulKernel qbmm;
96 qbmm(params);95 qbmm(params);
97}96}
98-#endif97+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_on_the_fly.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QBMM_CUBE_ON_THE_FLY_H16+#pragma once
17-#define QBMM_CUBE_ON_THE_FLY_H
18 17 
19#include "../quant_batch_matmul_v3_base.h"18#include "../quant_batch_matmul_v3_base.h"
20#include "qbmm_api_utils.h"19#include "qbmm_api_utils.h"
@@ -304,4 +303,4 @@ __aicore__ inline void MatMulASWKernel<LOCAL_TEMPLATE_FUNC_PARAMS>::SetMMParaAnd
304 mm_.GetTensorC(cGlobal_[block_.offset_.offsetC]);303 mm_.GetTensorC(cGlobal_[block_.offset_.offsetC]);
305}304}
306}305}
307-#endif // QBMM_CUBE_ON_THE_FLY_H306+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_on_the_fly_abl1_full_load.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_cube_on_the_fly_abl1_full_load.h12 * \file qbmm_cube_on_the_fly_abl1_full_load.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_CUBE_ON_THE_FLY_ABL1_FULL_LOAD_H15+#pragma once
16-#define QBMM_CUBE_ON_THE_FLY_ABL1_FULL_LOAD_H
17 16 
18#include "../quant_batch_matmul_v3_base.h"17#include "../quant_batch_matmul_v3_base.h"
19#include "qbmm_api_utils.h"18#include "qbmm_api_utils.h"
@@ -209,4 +208,3 @@ __aicore__ inline void MatmulAswKernelABL1FullLoad<LOCAL_TEMPLATE_FUNC_PARAMS>::
209 208 
210} // namespace QuantBatchMatmulV3209} // namespace QuantBatchMatmulV3
211 210 
212-#endif // QBMM_CUBE_ON_THE_FLY_ABL1_FULL_LOAD_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_on_the_fly_al1_full_load.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_cube_on_the_fly_al1_full_load.h12 * \file qbmm_cube_on_the_fly_al1_full_load.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_CUBE_ON_THE_FLY_AL1_FULL_LOAD_H15+#pragma once
16-#define QBMM_CUBE_ON_THE_FLY_AL1_FULL_LOAD_H
17 16 
18#include "qbmm_cube_on_the_fly.h"17#include "qbmm_cube_on_the_fly.h"
19#include "qbmm_asw_block.h"18#include "qbmm_asw_block.h"
@@ -258,4 +257,3 @@ __aicore__ inline void MatmulAswKernelAL1FullLoad<LOCAL_TEMPLATE_FUNC_PARAMS>::P
258 257 
259} // namespace QuantBatchMatmulV3258} // namespace QuantBatchMatmulV3
260 259 
261-#endif // QBMM_CUBE_ON_THE_FLY_AL1_FULL_LOAD_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_on_the_fly_bl1_full_load.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_cube_on_the_fly_bl1_full_load.h12 * \file qbmm_cube_on_the_fly_bl1_full_load.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_CUBE_ON_THE_FLY_BL1_FULL_LOAD_H15+#pragma once
16-#define QBMM_CUBE_ON_THE_FLY_BL1_FULL_LOAD_H
17 16 
18#include "../quant_batch_matmul_v3_base.h"17#include "../quant_batch_matmul_v3_base.h"
19#include "qbmm_api_utils.h"18#include "qbmm_api_utils.h"
@@ -164,4 +163,3 @@ __aicore__ inline void MatmulAswKernelBL1FullLoad<LOCAL_TEMPLATE_FUNC_PARAMS>::P
164}163}
165} // namespace QuantBatchMatmulV3164} // namespace QuantBatchMatmulV3
166 165 
167-#endif // QBMM_CUBE_ON_THE_FLY_BL1_FULL_LOAD_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_cube_on_the_fly_iterbatch.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QBMM_CUBE_ON_THE_FLY_ITERBATCH_H16+#pragma once
17-#define QBMM_CUBE_ON_THE_FLY_ITERBATCH_H
18 17 
19#include "../quant_batch_matmul_v3_base.h"18#include "../quant_batch_matmul_v3_base.h"
20#include "qbmm_iterbatch_block.h"19#include "qbmm_iterbatch_block.h"
@@ -173,4 +172,4 @@ __aicore__ inline void QbmmIterBatchKernel<LOCAL_TEMPLATE_FUNC_PARAMS_V2>::Proce
173 }172 }
174}173}
175} // namespace QuantBatchMatmulV3174} // namespace QuantBatchMatmulV3
176-#endif // QBMM_CUBE_ON_THE_FLY_ITERBATCH_H175+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_int4_to_int8_preprocess.h+177-179
@@ -1,179 +1,177 @@
1-/**1+/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
9- */9+ */
10- 10+ 
11-/*!11+/*!
12- * \file qbmm_int4_to_int8_preprocess.h12+ * \file qbmm_int4_to_int8_preprocess.h
13- * \brief Preprocess class for converting int4 inputs (x1, x2) to int8 before matrix multiplication.13+ * \brief Preprocess class for converting int4 inputs (x1, x2) to int8 before matrix multiplication.
14- * Core splitting: cores are split between x1 and x2 by m:n ratio.14+ * Core splitting: cores are split between x1 and x2 by m:n ratio.
15- * Each core processes ONLY x1 or x2.15+ * Each core processes ONLY x1 or x2.
16- * Pipeline: CopyIn -> Compute (int4->half->int8) -> CopyOut16+ * Pipeline: CopyIn -> Compute (int4->half->int8) -> CopyOut
17- */17+ */
18- 18+ 
19-#ifndef QBMM_INT4_TO_INT8_PREPROCESS_H19+#pragma once
20-#define QBMM_INT4_TO_INT8_PREPROCESS_H20+ 
21- 21+#include "../quant_batch_matmul_v3_base.h"
22-#include "../quant_batch_matmul_v3_base.h"22+#include "quant_batch_matmul_v3_tiling_data.h"
23-#include "quant_batch_matmul_v3_tiling_data.h"23+ 
24- 24+using namespace AscendC;
25-using namespace AscendC;25+ 
26- 26+namespace {
27-namespace {27+constexpr uint64_t ALIGN_SIZE_128 = 128u;
28-constexpr uint64_t ALIGN_SIZE_128 = 128u;28+constexpr uint64_t TILE_ELEMS_16K = 16 * 1024u;
29-constexpr uint64_t TILE_ELEMS_16K = 16 * 1024u;29+constexpr uint32_t ELEM_ALIGN_64 = 64u;
30-constexpr uint32_t ELEM_ALIGN_64 = 64u;30+constexpr uint64_t NUM_2 = 2u;
31-constexpr uint64_t NUM_2 = 2u;31+}
32-}32+ 
33- 33+class QbmmInt4ToInt8Preprocess {
34-class QbmmInt4ToInt8Preprocess {34+public:
35-public:35+ __aicore__ inline QbmmInt4ToInt8Preprocess() {}
36- __aicore__ inline QbmmInt4ToInt8Preprocess() {}36+ 
37- 37+ __aicore__ inline void Init(GM_ADDR x1In, GM_ADDR x2In, GM_ADDR workspace,
38- __aicore__ inline void Init(GM_ADDR x1In, GM_ADDR x2In, GM_ADDR workspace,38+ TPipe& pipe, uint64_t m, uint64_t n,
39- TPipe& pipe, uint64_t m, uint64_t n,39+ uint64_t k, uint64_t batchC);
40- uint64_t k, uint64_t batchC);40+ __aicore__ inline void Process();
41- __aicore__ inline void Process();41+ 
42- 42+private:
43-private:43+ __aicore__ inline void CopyIn(uint32_t progress, uint32_t currentNum);
44- __aicore__ inline void CopyIn(uint32_t progress, uint32_t currentNum);44+ __aicore__ inline void Compute(uint32_t currentNum);
45- __aicore__ inline void Compute(uint32_t currentNum);45+ __aicore__ inline void CopyOut(uint32_t progress, uint32_t currentNum);
46- __aicore__ inline void CopyOut(uint32_t progress, uint32_t currentNum);46+ 
47- 47+private:
48-private:48+ // Queues
49- // Queues49+ TQue<QuePosition::VECIN, BUFFER_NUM> inQueueInt4_;
50- TQue<QuePosition::VECIN, BUFFER_NUM> inQueueInt4_;50+ TQue<QuePosition::VECCALC, BUFFER_NUM> computeQueueHalf_;
51- TQue<QuePosition::VECCALC, BUFFER_NUM> computeQueueHalf_;51+ TQue<QuePosition::VECOUT, BUFFER_NUM> outQueueInt8_;
52- TQue<QuePosition::VECOUT, BUFFER_NUM> outQueueInt8_;52+ 
53- 53+ GlobalTensor<int8_t> srcInt4Global_;
54- GlobalTensor<int8_t> srcInt4Global_;54+ GlobalTensor<int8_t> dstInt8Global_;
55- GlobalTensor<int8_t> dstInt8Global_;55+ 
56- 56+ GM_ADDR x1Out_;
57- GM_ADDR x1Out_;57+ GM_ADDR x2Out_;
58- GM_ADDR x2Out_;58+ 
59- 59+ bool isX1Core_;
60- bool isX1Core_;60+ uint64_t blockLength_ = 0;
61- uint64_t blockLength_ = 0;61+ uint32_t ubLength_ = 0;
62- uint32_t ubLength_ = 0;62+};
63-};63+ 
64- 64+__aicore__ inline void QbmmInt4ToInt8Preprocess::Init(GM_ADDR x1In, GM_ADDR x2In, GM_ADDR workspace,
65-__aicore__ inline void QbmmInt4ToInt8Preprocess::Init(GM_ADDR x1In, GM_ADDR x2In, GM_ADDR workspace,65+ TPipe& pipe, uint64_t m, uint64_t n, uint64_t k,
66- TPipe& pipe, uint64_t m, uint64_t n, uint64_t k,66+ uint64_t batchC)
67- uint64_t batchC)67+{
68-{68+ uint64_t x1TotalElems = batchC * m * k;
69- uint64_t x1TotalElems = batchC * m * k;69+ uint64_t x2TotalElems = k * n;
70- uint64_t x2TotalElems = k * n;70+ 
71- 71+ x1Out_ = workspace;
72- x1Out_ = workspace;72+ x2Out_ = workspace + DequantBmm::Align(x1TotalElems * sizeof(int8_t), ALIGN_SIZE_128);
73- x2Out_ = workspace + DequantBmm::Align(x1TotalElems * sizeof(int8_t), ALIGN_SIZE_128);73+ 
74- 74+ // ---- core assignment by m:n ratio ----
75- // ---- core assignment by m:n ratio ----75+ uint64_t totalCores = GetBlockNum();
76- uint64_t totalCores = GetBlockNum();76+ if ASCEND_IS_AIV {
77- if ASCEND_IS_AIV {77+ totalCores = totalCores * NUM_2;
78- totalCores = totalCores * NUM_2;78+ }
79- }79+ uint64_t coresForX1 = (totalCores * batchC * m + (batchC * m + n) / NUM_2) / (batchC * m + n);
80- uint64_t coresForX1 = (totalCores * batchC * m + (batchC * m + n) / NUM_2) / (batchC * m + n);80+ if (coresForX1 < 1) coresForX1 = 1;
81- if (coresForX1 < 1) coresForX1 = 1;81+ if (coresForX1 >= totalCores) coresForX1 = totalCores - 1;
82- if (coresForX1 >= totalCores) coresForX1 = totalCores - 1;82+ uint64_t coresForX2 = totalCores - coresForX1;
83- uint64_t coresForX2 = totalCores - coresForX1;83+ 
84- 84+ uint64_t coreIdx = GetBlockIdx();
85- uint64_t coreIdx = GetBlockIdx();85+ if (coreIdx >= totalCores) {
86- if (coreIdx >= totalCores) {86+ return;
87- return;87+ }
88- }88+ isX1Core_ = (coreIdx < coresForX1);
89- isX1Core_ = (coreIdx < coresForX1);89+ 
90- 90+ // ---- compute this core's element range ----
91- // ---- compute this core's element range ----91+ uint64_t totalElems = isX1Core_ ? x1TotalElems : x2TotalElems;
92- uint64_t totalElems = isX1Core_ ? x1TotalElems : x2TotalElems;92+ uint64_t groupCores = isX1Core_ ? coresForX1 : coresForX2;
93- uint64_t groupCores = isX1Core_ ? coresForX1 : coresForX2;93+ uint64_t localId = isX1Core_ ? coreIdx : coreIdx - coresForX1;
94- uint64_t localId = isX1Core_ ? coreIdx : coreIdx - coresForX1;94+ 
95- 95+ uint64_t totalBlocks = DequantBmm::Align(totalElems, static_cast<uint64_t>(ELEM_ALIGN_64));
96- uint64_t totalBlocks = DequantBmm::Align(totalElems, static_cast<uint64_t>(ELEM_ALIGN_64));96+ uint64_t numChunks = totalBlocks / ELEM_ALIGN_64;
97- uint64_t numChunks = totalBlocks / ELEM_ALIGN_64;97+ uint64_t baseChunks = numChunks / groupCores;
98- uint64_t baseChunks = numChunks / groupCores;98+ uint64_t remainChunks = numChunks % groupCores;
99- uint64_t remainChunks = numChunks % groupCores;99+ 
100- 100+ uint64_t chunkStart = localId * baseChunks + DequantBmm::Min(localId, remainChunks);
101- uint64_t chunkStart = localId * baseChunks + DequantBmm::Min(localId, remainChunks);101+ uint64_t chunkEnd = chunkStart + baseChunks + (localId < remainChunks ? 1u : 0u);
102- uint64_t chunkEnd = chunkStart + baseChunks + (localId < remainChunks ? 1u : 0u);102+ 
103- 103+ uint64_t elemStart = chunkStart * ELEM_ALIGN_64;
104- uint64_t elemStart = chunkStart * ELEM_ALIGN_64;104+ uint64_t elemEnd = chunkEnd * ELEM_ALIGN_64;
105- uint64_t elemEnd = chunkEnd * ELEM_ALIGN_64;105+ 
106- 106+ blockLength_ = elemEnd - elemStart;
107- blockLength_ = elemEnd - elemStart;107+ 
108- 108+ uint64_t tileSize = DequantBmm::Min(blockLength_, TILE_ELEMS_16K);
109- uint64_t tileSize = DequantBmm::Min(blockLength_, TILE_ELEMS_16K);109+ uint64_t alignUb = DequantBmm::Align(tileSize, static_cast<uint64_t>(ELEM_ALIGN_64));
110- uint64_t alignUb = DequantBmm::Align(tileSize, static_cast<uint64_t>(ELEM_ALIGN_64));110+ ubLength_ = DequantBmm::Max(ELEM_ALIGN_64, static_cast<uint32_t>(alignUb));
111- ubLength_ = DequantBmm::Max(ELEM_ALIGN_64, static_cast<uint32_t>(alignUb));111+ 
112- 112+ // ---- bind global buffers to this core's slice ----
113- // ---- bind global buffers to this core's slice ----113+ if (isX1Core_) {
114- if (isX1Core_) {114+ srcInt4Global_.SetGlobalBuffer((__gm__ int8_t*)x1In + elemStart / NUM_2, blockLength_ / NUM_2);
115- srcInt4Global_.SetGlobalBuffer((__gm__ int8_t*)x1In + elemStart / NUM_2, blockLength_ / NUM_2);115+ dstInt8Global_.SetGlobalBuffer((__gm__ int8_t*)x1Out_ + elemStart, blockLength_);
116- dstInt8Global_.SetGlobalBuffer((__gm__ int8_t*)x1Out_ + elemStart, blockLength_);116+ } else {
117- } else {117+ srcInt4Global_.SetGlobalBuffer((__gm__ int8_t*)x2In + elemStart / NUM_2, blockLength_ / NUM_2);
118- srcInt4Global_.SetGlobalBuffer((__gm__ int8_t*)x2In + elemStart / NUM_2, blockLength_ / NUM_2);118+ dstInt8Global_.SetGlobalBuffer((__gm__ int8_t*)x2Out_ + elemStart, blockLength_);
119- dstInt8Global_.SetGlobalBuffer((__gm__ int8_t*)x2Out_ + elemStart, blockLength_);119+ }
120- }120+ 
121- 121+ // ---- init queues ----
122- // ---- init queues ----122+ pipe.InitBuffer(inQueueInt4_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) / NUM_2);
123- pipe.InitBuffer(inQueueInt4_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) / NUM_2);123+ pipe.InitBuffer(computeQueueHalf_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) * sizeof(half));
124- pipe.InitBuffer(computeQueueHalf_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) * sizeof(half));124+ pipe.InitBuffer(outQueueInt8_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) * sizeof(int8_t));
125- pipe.InitBuffer(outQueueInt8_, BUFFER_NUM, static_cast<uint32_t>(ubLength_) * sizeof(int8_t));125+}
126-}126+ 
127- 127+__aicore__ inline void QbmmInt4ToInt8Preprocess::Process()
128-__aicore__ inline void QbmmInt4ToInt8Preprocess::Process()128+{
129-{129+ if (blockLength_ == 0) return;
130- if (blockLength_ == 0) return;130+ 
131- 131+ uint64_t loopCount = DequantBmm::CeilDiv(blockLength_, static_cast<uint64_t>(ubLength_));
132- uint64_t loopCount = DequantBmm::CeilDiv(blockLength_, static_cast<uint64_t>(ubLength_));132+ for (uint32_t i = 0; i < loopCount; i++) {
133- for (uint32_t i = 0; i < loopCount; i++) {133+ uint64_t remaining = blockLength_ - ubLength_ * i;
134- uint64_t remaining = blockLength_ - ubLength_ * i;134+ uint32_t currentNum = DequantBmm::Min(static_cast<uint32_t>(remaining), ubLength_);
135- uint32_t currentNum = DequantBmm::Min(static_cast<uint32_t>(remaining), ubLength_);135+ 
136- 136+ currentNum = DequantBmm::FloorAlign(currentNum, ELEM_ALIGN_64);
137- currentNum = DequantBmm::FloorAlign(currentNum, ELEM_ALIGN_64);137+ if (currentNum == 0) break;
138- if (currentNum == 0) break;138+ 
139- 139+ CopyIn(i, currentNum);
140- CopyIn(i, currentNum);140+ Compute(currentNum);
141- Compute(currentNum);141+ CopyOut(i, currentNum);
142- CopyOut(i, currentNum);142+ }
143- }143+}
144-}144+ 
145- 145+__aicore__ inline void QbmmInt4ToInt8Preprocess::CopyIn(uint32_t progress, uint32_t currentNum)
146-__aicore__ inline void QbmmInt4ToInt8Preprocess::CopyIn(uint32_t progress, uint32_t currentNum)146+{
147-{147+ LocalTensor<int8_t> int4Local = inQueueInt4_.AllocTensor<int8_t>();
148- LocalTensor<int8_t> int4Local = inQueueInt4_.AllocTensor<int8_t>();148+ DataCopy(int4Local, srcInt4Global_[progress * ubLength_ / NUM_2], static_cast<uint32_t>(currentNum) / NUM_2);
149- DataCopy(int4Local, srcInt4Global_[progress * ubLength_ / NUM_2], static_cast<uint32_t>(currentNum) / NUM_2);149+ inQueueInt4_.EnQue<int8_t>(int4Local);
150- inQueueInt4_.EnQue<int8_t>(int4Local);150+}
151-}151+ 
152- 152+__aicore__ inline void QbmmInt4ToInt8Preprocess::Compute(uint32_t currentNum)
153-__aicore__ inline void QbmmInt4ToInt8Preprocess::Compute(uint32_t currentNum)153+{
154-{154+ LocalTensor<int8_t> int4Local = inQueueInt4_.DeQue<int8_t>();
155- LocalTensor<int8_t> int4Local = inQueueInt4_.DeQue<int8_t>();155+ LocalTensor<int4b_t> int4View = int4Local.ReinterpretCast<int4b_t>();
156- LocalTensor<int4b_t> int4View = int4Local.ReinterpretCast<int4b_t>();156+ 
157- 157+ // ---- int4 -> half ----
158- // ---- int4 -> half ----158+ LocalTensor<half> halfLocal = computeQueueHalf_.AllocTensor<half>();
159- LocalTensor<half> halfLocal = computeQueueHalf_.AllocTensor<half>();159+ Cast<half, int4b_t>(halfLocal, int4View, RoundMode::CAST_NONE, static_cast<uint32_t>(currentNum));
160- Cast<half, int4b_t>(halfLocal, int4View, RoundMode::CAST_NONE, static_cast<uint32_t>(currentNum));160+ inQueueInt4_.FreeTensor(int4Local);
161- inQueueInt4_.FreeTensor(int4Local);161+ computeQueueHalf_.EnQue<half>(halfLocal);
162- computeQueueHalf_.EnQue<half>(halfLocal);162+ 
163- 163+ // ---- half -> int8 ----
164- // ---- half -> int8 ----164+ LocalTensor<half> halfSrc = computeQueueHalf_.DeQue<half>();
165- LocalTensor<half> halfSrc = computeQueueHalf_.DeQue<half>();165+ LocalTensor<int8_t> int8Local = outQueueInt8_.AllocTensor<int8_t>();
166- LocalTensor<int8_t> int8Local = outQueueInt8_.AllocTensor<int8_t>();166+ Cast<int8_t, half>(int8Local, halfSrc, RoundMode::CAST_ROUND, static_cast<uint32_t>(currentNum));
167- Cast<int8_t, half>(int8Local, halfSrc, RoundMode::CAST_ROUND, static_cast<uint32_t>(currentNum));167+ computeQueueHalf_.FreeTensor(halfSrc);
168- computeQueueHalf_.FreeTensor(halfSrc);168+ outQueueInt8_.EnQue<int8_t>(int8Local);
169- outQueueInt8_.EnQue<int8_t>(int8Local);169+}
170-}170+ 
171- 171+__aicore__ inline void QbmmInt4ToInt8Preprocess::CopyOut(uint32_t progress, uint32_t currentNum)
172-__aicore__ inline void QbmmInt4ToInt8Preprocess::CopyOut(uint32_t progress, uint32_t currentNum)172+{
173-{173+ LocalTensor<int8_t> int8Local = outQueueInt8_.DeQue<int8_t>();
174- LocalTensor<int8_t> int8Local = outQueueInt8_.DeQue<int8_t>();174+ DataCopy(dstInt8Global_[progress * ubLength_], int8Local, static_cast<uint32_t>(currentNum * sizeof(int8_t)));
175- DataCopy(dstInt8Global_[progress * ubLength_], int8Local, static_cast<uint32_t>(currentNum * sizeof(int8_t)));175+ outQueueInt8_.FreeTensor(int8Local);
176- outQueueInt8_.FreeTensor(int8Local);176+}
177-}177+ 
178- 
179-#endif // QBMM_INT4_TO_INT8_PREPROCESS_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_iterbatch_block.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QBMM_ITERBATCH_BLOCK_H16+#pragma once
17-#define QBMM_ITERBATCH_BLOCK_H
18 17 
19#include "../quant_batch_matmul_v3_base.h"18#include "../quant_batch_matmul_v3_base.h"
20#include "quant_batch_matmul_v3_tiling_data.h"19#include "quant_batch_matmul_v3_tiling_data.h"
@@ -251,4 +250,3 @@ __aicore__ inline void QbmmMultiBatchBaseBlock::CalcGMOffset()
251}250}
252} // namespace QuantBatchMatmulV3251} // namespace QuantBatchMatmulV3
253 252 
254-#endif // QBMM_ITERBATCH_BLOCK_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_mix_online_dynamic.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_mix_online_dynamic.h12 * \file qbmm_mix_online_dynamic.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_MIX_ONLINE_DYNAMIC_H15+#pragma once
16-#define QBMM_MIX_ONLINE_DYNAMIC_H
17 16 
18#include "../../inc/platform.h"17#include "../../inc/platform.h"
19#include "mm_extension_interface/qbmm_custom_mm_policy.h"18#include "mm_extension_interface/qbmm_custom_mm_policy.h"
@@ -707,4 +706,3 @@ __aicore__ inline void QuantBmmPertokenRegbaseKernel<LOCAL_TEMPLATE_FUNC_MIX_PAR
707 706 
708} // namespace QuantBatchMatmulV3707} // namespace QuantBatchMatmulV3
709 708 
710-#endif // QBMM_MIX_ONLINE_DYNAMIC_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_mix_online_dynamic_al1_full_load.h+1-3
@@ -12,8 +12,7 @@
12 * \file qbmm_mix_online_dynamic_al1_full_load.h12 * \file qbmm_mix_online_dynamic_al1_full_load.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_MIX_ONLINE_DYNAMIC_AL1_FULL_LOAD_H15+#pragma once
16-#define QBMM_MIX_ONLINE_DYNAMIC_AL1_FULL_LOAD_H
17 16 
18#include "qbmm_mix_online_dynamic.h"17#include "qbmm_mix_online_dynamic.h"
19#include "qbmm_api_utils.h"18#include "qbmm_api_utils.h"
@@ -211,4 +210,3 @@ __aicore__ inline void QuantBmmPertokenAL1FullLoad<LOCAL_TEMPLATE_FUNC_MIX_PARAM
211 210 
212} // namespace QuantBatchMatmulV3211} // namespace QuantBatchMatmulV3
213 212 
214-#endif // QBMM_MIX_ONLINE_DYNAMIC_AL1_FULL_LOAD_H
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_mix_perblock.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QBMM_MIX_PERBLOCK_H16+#pragma once
17-#define QBMM_MIX_PERBLOCK_H
18 17 
19#include "qbmm_api_utils.h"18#include "qbmm_api_utils.h"
20#include "qbmm_perblock_api_utils.h"19#include "qbmm_perblock_api_utils.h"
@@ -92,4 +91,4 @@ MatMulPerBlockASW<x1Type, x2Type, biasType, yType, formatX1, formatX2, formatY,
92 }91 }
93}92}
94} // namespace QuantBatchMatmulV393} // namespace QuantBatchMatmulV3
95-#endif // QBMM_MIX_PERBLOCK_H94+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_mix_pertile_cmct.h+2-3
@@ -8,8 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef QBMM_MIX_PERTILE_CMCT_H11+#pragma once
12-#define QBMM_MIX_PERTILE_CMCT_H
13 12 
14#include "cmct/epilogue/block_epilogue_pertile.h"13#include "cmct/epilogue/block_epilogue_pertile.h"
15#include "cmct/block/block_mmad_pertile.h"14#include "cmct/block/block_mmad_pertile.h"
@@ -94,4 +93,4 @@ __aicore__ inline void QbmmCmctPertileKernel(
94 QbmmKernel qbmm;93 QbmmKernel qbmm;
95 qbmm(params);94 qbmm(params);
96}95}
97-#endif96+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_mx_basic_api_cmct.h+2-3
@@ -12,8 +12,7 @@
12 * \file qbmm_mx_basic_api_cmct.h12 * \file qbmm_mx_basic_api_cmct.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMM_MX_BAISC_API_CMCT_H15+#pragma once
16-#define QBMM_MX_BAISC_API_CMCT_H
17#include "cmct/block/block_scheduler_policy.h"16#include "cmct/block/block_scheduler_policy.h"
18#include "cmct/block/block_scheduler_utils.h"17#include "cmct/block/block_scheduler_utils.h"
19#include "cmct/epilogue/block_epilogue_empty.h"18#include "cmct/epilogue/block_epilogue_empty.h"
@@ -87,4 +86,4 @@ __aicore__ inline void QbmmMxBasicApiKernel(
87 MatmulKernel qbmm;86 MatmulKernel qbmm;
88 qbmm(params);87 qbmm(params);
89}88}
90-#endif89+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_perblock_api_param_utils.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16- #ifndef QBMM_PERBLOCK_API_PARAM_UTILS_H16+ #pragma once
17- #define QBMM_PERBLOCK_API_PARAM_UTILS_H
18 17 
19 #include "qbmm_asw_block.h"18 #include "qbmm_asw_block.h"
20 #include "../quant_batch_matmul_v3_base.h"19 #include "../quant_batch_matmul_v3_base.h"
@@ -239,4 +238,4 @@
239 }238 }
240 }239 }
241 } // namespace QuantBatchMatmulV3240 } // namespace QuantBatchMatmulV3
242- #endif // QBMM_PERBLOCK_API_PARAM_UTILS_H241+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/qbmm_perblock_api_utils.h+2-3
@@ -12,8 +12,7 @@
12 * \brief12 * \brief
13 */13 */
14 14 
15-#ifndef QBMM_PERBLOCK_API_UTILS_H15+#pragma once
16-#define QBMM_PERBLOCK_API_UTILS_H
17 16 
18#include "qbmm_asw_block.h"17#include "qbmm_asw_block.h"
19#include "../quant_batch_matmul_v3_base.h"18#include "../quant_batch_matmul_v3_base.h"
@@ -783,4 +782,4 @@ __aicore__ inline void MatMulPerBlock<MATMUL_PERBLOCK_FUNC_PARAMS>::AicEnd()
783}782}
784 783 
785} // namespace QuantBatchMatmulV3784} // namespace QuantBatchMatmulV3
786-#endif // QBMM_PERBLOCK_API_UTILS_H785+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/quant_batch_matmul_v3_apt_tiling_key.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v3_apt_tiling_key.h12 * \file quant_batch_matmul_v3_apt_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QBMMV3_ARCH35_TILING_KEY_H15+#pragma once
16-#define QBMMV3_ARCH35_TILING_KEY_H
17 16 
18#include "ascendc/host_api/tiling/template_argument.h"17#include "ascendc/host_api/tiling/template_argument.h"
19 18 
@@ -119,4 +118,4 @@ ASCENDC_TPL_SEL(
119 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOAL1_WITH_MMAPI))118 TPL_NO_VEC_EPILOGUE_CUSTOM_GMTOAL1_WITH_MMAPI))
120);119);
121} // namespace QuantBatchMatmulV3_Arch35_TilingKey120} // namespace QuantBatchMatmulV3_Arch35_TilingKey
122-#endif121+ 
Mmatmul/quant_batch_matmul_v3/op_kernel/arch35/quant_batch_matmul_v3_tiling_data.h+2-3
@@ -11,8 +11,7 @@
11 * \file quant_batch_matmul_v3_tiling_data.h11 * \file quant_batch_matmul_v3_tiling_data.h
12 * \brief12 * \brief
13 */13 */
14-#ifndef QUANT_BATCH_MATMUL_V3_TILING_DATA_H14+#pragma once
15-#define QUANT_BATCH_MATMUL_V3_TILING_DATA_H
16#include "kernel_tiling/kernel_tiling.h"15#include "kernel_tiling/kernel_tiling.h"
17 16 
18#ifndef __CCE_AICORE__17#ifndef __CCE_AICORE__
@@ -145,4 +144,4 @@ struct QuantBatchMatmulV3BasicAPITilingData {
145};144};
146#pragma pack(pop)145#pragma pack(pop)
147} // namespace DequantBmm146} // namespace DequantBmm
148-#endif // QUANT_BATCH_MATMUL_V3_TILING_DATA_H147+ 
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/adaptive_sliding_window_basic_api_v4_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file adaptive_sliding_window_basic_api_v4_tiling.h12 * \file adaptive_sliding_window_basic_api_v4_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef ADAPTIVE_SLIDING_WINDOW_BASIC_API_V4_TILING_H15+#pragma once
16-#define ADAPTIVE_SLIDING_WINDOW_BASIC_API_V4_TILING_H
17#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_basic_api_tiling.h"16#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_basic_api_tiling.h"
18#include "../quant_batch_matmul_v4_compile_info.h"17#include "../quant_batch_matmul_v4_compile_info.h"
19 18 
@@ -82,4 +81,4 @@ protected:
82 std::unique_ptr<QuantBatchMatmulV4CompileInfo> compileInfoPtr_;81 std::unique_ptr<QuantBatchMatmulV4CompileInfo> compileInfoPtr_;
83};82};
84} // namespace optiling83} // namespace optiling
85-#endif // ADAPTIVE_SLIDING_WINDOW_BASIC_API_V4_TILING_H84+ 
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/quant_batch_matmul_v4_asw_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v4_asw_tiling.h12 * \file quant_batch_matmul_v4_asw_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V4_ASW_TILING_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V4_ASW_TILING_H
17#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_tiling.h"16#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/adaptive_sliding_window_tiling.h"
18#include "../quant_batch_matmul_v4_compile_info.h"17#include "../quant_batch_matmul_v4_compile_info.h"
19 18 
@@ -87,4 +86,4 @@ protected:
87 std::unique_ptr<QuantBatchMatmulV4CompileInfo> compileInfoPtr_;86 std::unique_ptr<QuantBatchMatmulV4CompileInfo> compileInfoPtr_;
88};87};
89} // namespace optiling88} // namespace optiling
90-#endif // QUANT_BATCH_MATMUL_V4_ASW_TILING_H89+ 
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/quant_batch_matmul_v4_basic_block_tiling.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_BASIC_BLOCK_TILING_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_BASIC_BLOCK_TILING_H
18 17 
19#include <algorithm>18#include <algorithm>
20#include <limits>19#include <limits>
@@ -336,4 +335,3 @@ protected:
336} // namespace matmul_v4335} // namespace matmul_v4
337} // namespace optiling336} // namespace optiling
338 337 
339-#endif // QUANT_BATCH_MATMUL_V4_BASIC_BLOCK_TILING_H
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/quant_batch_matmul_v4_checker_for_mmads8s4.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v4_checker_for_mmads8s4.h12 * \file quant_batch_matmul_v4_checker_for_mmads8s4.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V4_CHECKER_FOR_MMADS8S4_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V4_CHECKER_FOR_MMADS8S4_H
17#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_checker_for_mmads8s4.h"16#include "../../../../quant_batch_matmul_v3/op_host/op_tiling/arch35/quant_batch_matmul_v3_checker_for_mmads8s4.h"
18 17 
19namespace optiling {18namespace optiling {
@@ -74,4 +73,4 @@ protected:
74 bool CheckOffset(const gert::StorageShape* offsetShape) const override;73 bool CheckOffset(const gert::StorageShape* offsetShape) const override;
75};74};
76} // namespace optiling75} // namespace optiling
77-#endif // QUANT_BATCH_MATMUL_V4_CHECKER_FOR_MMADS8S4_H76+ 
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/quant_batch_matmul_v4_pergroup_arch35_tiling.h+1-3
@@ -12,8 +12,7 @@
12 * \brief12 * \brief
13 */13 */
14 14 
15-#ifndef QUANT_BATCH_MATMUL_V4_PERGROUP_ARCH35_TILING_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V4_PERGROUP_ARCH35_TILING_H
17 16 
18#include "../quant_batch_matmul_v4_pergroup_tiling.h"17#include "../quant_batch_matmul_v4_pergroup_tiling.h"
19#include "quant_batch_matmul_v4_tiling.h"18#include "quant_batch_matmul_v4_tiling.h"
@@ -66,4 +65,3 @@ private:
66};65};
67} // namespace optiling66} // namespace optiling
68 67 
69-#endif // QUANT_BATCH_MATMUL_V4_PERGROUP_ARCH35_TILING_H
Mmatmul/quant_batch_matmul_v4/op_host/op_tiling/arch35/quant_batch_matmul_v4_tiling.h+2-3
@@ -14,8 +14,7 @@
14 * \brief14 * \brief
15 */15 */
16 16 
17-#ifndef QUANT_BATCH_MATMUL_V4_TILING_H17+#pragma once
18-#define QUANT_BATCH_MATMUL_V4_TILING_H
19 18 
20#include <cstdint>19#include <cstdint>
21#include <vector>20#include <vector>
@@ -289,4 +288,4 @@ protected:
289 QuantBatchMatmulV4BasicBlockTiling tilingSolver_;288 QuantBatchMatmulV4BasicBlockTiling tilingSolver_;
290};289};
291} // namespace optiling290} // namespace optiling
292-#endif // QUANT_BATCH_MATMUL_V4_TILING_H291+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/cmct/block/block_mmad_mx_weight_from_ub.h+2-3
@@ -12,8 +12,7 @@
12 * \brief12 * \brief
13 */13 */
14 14 
15-#ifndef QUANT_BATCH_MATMUL_V4_CMCT_BLOCK_BLOCK_MMAD_MX_WEIGHT_FROM_UB_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V4_CMCT_BLOCK_BLOCK_MMAD_MX_WEIGHT_FROM_UB_H
17 16 
18#include "cmct/block/block_mmad.h"17#include "cmct/block/block_mmad.h"
19#include "../../quant_batch_matmul_v4_tiling_data_apt.h"18#include "../../quant_batch_matmul_v4_tiling_data_apt.h"
@@ -62,4 +61,4 @@ public:
62};61};
63} // namespace Block62} // namespace Block
64} // namespace QuantBatchMatmulV463} // namespace QuantBatchMatmulV4
65-#endif64+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/cmct/block/block_scheduler_swizzle_in_mn_core_nn.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_BLOCK_BLOCK_SCHEDULER_SWIZZLE_IN_MN_CORE_NN_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_BLOCK_BLOCK_SCHEDULER_SWIZZLE_IN_MN_CORE_NN_H
18#include "cmct/block/block_scheduler_swizzle_in_mn_core.h"17#include "cmct/block/block_scheduler_swizzle_in_mn_core.h"
19#include "../../quant_batch_matmul_v4_tiling_data_apt.h"18#include "../../quant_batch_matmul_v4_tiling_data_apt.h"
20/*19/*
@@ -63,4 +62,4 @@ public:
63};62};
64} // namespace Block63} // namespace Block
65} // namespace QuantBatchMatmulV464} // namespace QuantBatchMatmulV4
66-#endif65+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/cmct/kernel/kernel_matmul_mix_with_weight_prologue_nn.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_KERNEL_KERNEL_MATMUL_MIX_WITH_WEIGHT_PROLOGUE_NN_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_KERNEL_KERNEL_MATMUL_MIX_WITH_WEIGHT_PROLOGUE_NN_H
18 17 
19#include "cmct/kernel/kernel_matmul_mix_with_weight_prologue.h"18#include "cmct/kernel/kernel_matmul_mix_with_weight_prologue.h"
20#include "../../quant_batch_matmul_v4_tiling_data_apt.h"19#include "../../quant_batch_matmul_v4_tiling_data_apt.h"
@@ -46,4 +45,4 @@ public:
46};45};
47} // namespace Kernel46} // namespace Kernel
48} // namespace QuantBatchMatmulV447} // namespace QuantBatchMatmulV4
49-#endif48+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/cmct/prologue/block_prologue_b_cast_scsc_nn.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_PROLOGUE_BLOCK_PROLOGUE_B_CAST_SCSC_NN_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_PROLOGUE_BLOCK_PROLOGUE_B_CAST_SCSC_NN_H
18#include "cmct/prologue/block_prologue_b_cast_scsc.h"17#include "cmct/prologue/block_prologue_b_cast_scsc.h"
19#include "../../quant_batch_matmul_v4_tiling_data_apt.h"18#include "../../quant_batch_matmul_v4_tiling_data_apt.h"
20 19 
@@ -55,4 +54,3 @@ public:
55} // namespace Prologue54} // namespace Prologue
56} // namespace QuantBatchMatmulV455} // namespace QuantBatchMatmulV4
57 56 
58-#endif
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/cmct_convertor.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_CONVERTOR_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_ARCH35_CMCT_CONVERTOR_H
18#include "cmct/block/block_mmad_mx_weight_from_ub.h"17#include "cmct/block/block_mmad_mx_weight_from_ub.h"
19#include "cmct/block/block_scheduler_swizzle_in_mn_core_nn.h"18#include "cmct/block/block_scheduler_swizzle_in_mn_core_nn.h"
20#include "cmct/kernel/kernel_matmul_mix_with_weight_prologue_nn.h"19#include "cmct/kernel/kernel_matmul_mix_with_weight_prologue_nn.h"
@@ -168,4 +167,3 @@ __aicore__ inline void InvokeKernel(
168#define KERNEL_PARAMS \167#define KERNEL_PARAMS \
169 x1, x2, bias, x1_scale, x2_scale, y_scale, x1_offset, x2_offset, y_offset, x2_table, y, workspace, tiling168 x1, x2, bias, x1_scale, x2_scale, y_scale, x1_offset, x2_offset, y_offset, x2_table, y, workspace, tiling
170 169 
171-#endif
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/matmul_custom_impl.h+2-3
@@ -12,8 +12,7 @@
12 * \file matmul_custom_impl.h12 * \file matmul_custom_impl.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef MATMUL_CUSTOM_IMPL_H15+#pragma once
16-#define MATMUL_CUSTOM_IMPL_H
17 16 
18#include "tool.h"17#include "tool.h"
19 18 
@@ -353,4 +352,4 @@ __aicore__ inline void MatmulCustomImpl<xType, wType, biasType, yType, scaleType
353}352}
354 353 
355} // namespace QuantBatchMatmulV4354} // namespace QuantBatchMatmulV4
356-#endif // MATMUL_CUSTOM_IMPL_H355+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_constant.h+2-3
@@ -12,8 +12,7 @@
12 * \file quant_batch_matmul_v4_constant.h12 * \file quant_batch_matmul_v4_constant.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef QUANT_BATCH_MATMUL_V4_CONSTANT_H15+#pragma once
16-#define QUANT_BATCH_MATMUL_V4_CONSTANT_H
17namespace QuantBatchMatmulV4 {16namespace QuantBatchMatmulV4 {
18enum class QuantType : uint32_t {17enum class QuantType : uint32_t {
19 NONE = 0,18 NONE = 0,
@@ -49,4 +48,4 @@ constexpr uint32_t SHIFT_RIGHT_SIZE = 0x4;
49constexpr uint32_t E2M1_AND_MASK = 0x9C;48constexpr uint32_t E2M1_AND_MASK = 0x9C;
50constexpr uint32_t PERGROUP_NZ_MASK_REG = 32;49constexpr uint32_t PERGROUP_NZ_MASK_REG = 32;
51} // namespace QuantBatchMatmulV450} // namespace QuantBatchMatmulV4
52-#endif // QUANT_BATCH_MATMUL_V4_CONSTANT_H51+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_perchannel.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_PERCHANNEL_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_PERCHANNEL_H
18 17 
19#include "quant_batch_matmul_v4_reg_base_common.h"18#include "quant_batch_matmul_v4_reg_base_common.h"
20#include "quant_batch_matmul_v4_tiling_data_apt.h"19#include "quant_batch_matmul_v4_tiling_data_apt.h"
@@ -347,4 +346,4 @@ QuantBatchMatmulV4PerChannelKernel<xType, wType, biasType, yType, aTrans, bTrans
347 }346 }
348}347}
349} // namespace QuantBatchMatmulV4348} // namespace QuantBatchMatmulV4
350-#endif // QUANT_BATCH_MATMUL_V4_PERCHANNEL_H349+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_pertoken_pergroup.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_PERTOKEN_PERGROUP_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_PERTOKEN_PERGROUP_H
18 17 
19#include "../quant_batch_matmul_v4_common.h"18#include "../quant_batch_matmul_v4_common.h"
20 19 
@@ -561,4 +560,4 @@ private:
561};560};
562 561 
563} // namespace AscendC562} // namespace AscendC
564-#endif563+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_reg_base_common.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_REG_BASE_COMMON_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_REG_BASE_COMMON_H
18 17 
19#include "lib/matmul_intf.h"18#include "lib/matmul_intf.h"
20#include "quant_batch_matmul_v4_constant.h"19#include "quant_batch_matmul_v4_constant.h"
@@ -1636,4 +1635,3 @@ QuantBatchMatmulV4RegBaseCommonKernel<xType, wType, biasType, yType, aTrans, bTr
1636}1635}
1637} // namespace QuantBatchMatmulV41636} // namespace QuantBatchMatmulV4
1638 1637 
1639-#endif // QUANT_BATCH_MATMUL_V4_REG_BASE_COMMON_H
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_tiling_data_apt.h+1-4
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef QUANT_BATCH_MATMUL_V4_TILING_DATA_APT_H16+#pragma once
17-#define QUANT_BATCH_MATMUL_V4_TILING_DATA_APT_H
18#include "kernel_tiling/kernel_tiling.h" // TCubeTiling结构体通过C++语法定义17#include "kernel_tiling/kernel_tiling.h" // TCubeTiling结构体通过C++语法定义
19 18 
20#ifndef __CCE_AICORE__19#ifndef __CCE_AICORE__
@@ -174,6 +173,4 @@ struct QuantBatchMatmulV4TilingDataParams {
174};173};
175#pragma pack(pop)174#pragma pack(pop)
176} // namespace qbmmv4_tiling175} // namespace qbmmv4_tiling
177-#endif // QUANT_BATCH_MATMUL_V4_TILING_DATA_APT_H
178- 
179 176 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_tiling_key.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef ARCH35_QUANT_BATCH_MATMUL_V4_TILING_KEY_H16+#pragma once
17-#define ARCH35_QUANT_BATCH_MATMUL_V4_TILING_KEY_H
18 17 
19#include "ascendc/host_api/tiling/template_argument.h"18#include "ascendc/host_api/tiling/template_argument.h"
20 19 
@@ -104,4 +103,4 @@ ASCENDC_TPL_SEL(
104 ASCENDC_TPL_UINT_SEL(KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_UI_LIST, QBMMV4_LUT_ASW, QBMMV4_LUT_AL1FULL), ),103 ASCENDC_TPL_UINT_SEL(KERNEL_TEMPLATE_TYPE, ASCENDC_TPL_UI_LIST, QBMMV4_LUT_ASW, QBMMV4_LUT_AL1FULL), ),
105#endif104#endif
106);105);
107-#endif // ARCH35_QUANT_BATCH_MATMUL_V4_TILING_KEY_H106+ 
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/quant_batch_matmul_v4_vf.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16- #ifndef QUANT_BATCH_MATMUL_V4_VF_H16+ #pragma once
17- #define QUANT_BATCH_MATMUL_V4_VF_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -250,4 +249,3 @@
250 249 
251 } // namespace QuantBatchMatmulV4250 } // namespace QuantBatchMatmulV4
252 251 
253- #endif // QUANT_BATCH_MATMUL_V4_VF_H
Mmatmul/quant_batch_matmul_v4/op_kernel/arch35/tool.h+2-3
@@ -12,8 +12,7 @@
12 * \file tool.h12 * \file tool.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TOOL_H15+#pragma once
16-#define TOOL_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -239,4 +238,4 @@ public:
239 };238 };
240};239};
241}240}
242-#endif241+ 
Mmatmul/sparse_tensor_dense_mat_mul/op_kernel/arch35/sparse_tensor_dense_mat_mul_b16.h+1-3
@@ -12,8 +12,7 @@
12 * \file sparse_tensor_dense_mat_mul_b16.h12 * \file sparse_tensor_dense_mat_mul_b16.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef SPARSE_TENSOR_DENSE_MAT_MUL_B16_H15+#pragma once
16-#define SPARSE_TENSOR_DENSE_MAT_MUL_B16_H
17 16 
18#include "sparse_tensor_dense_mat_mul_base.h"17#include "sparse_tensor_dense_mat_mul_base.h"
19#include "../inc/platform.h"18#include "../inc/platform.h"
@@ -212,4 +211,3 @@ __aicore__ inline void SparseTensorDenseMatMulB16<T_IDX, T_VAL, T_SUM, ADJ_A, AD
212 211 
213} // namespace SparseTensorDenseMatMul212} // namespace SparseTensorDenseMatMul
214 213 
215-#endif // SPARSE_TENSOR_DENSE_MAT_MUL_B16_H
Mmatmul/sparse_tensor_dense_mat_mul/op_kernel/arch35/sparse_tensor_dense_mat_mul_b32.h+1-3
@@ -12,8 +12,7 @@
12 * \file sparse_tensor_dense_mat_mul_b32.h12 * \file sparse_tensor_dense_mat_mul_b32.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef SPARSE_TENSOR_DENSE_MAT_MUL_B32_H15+#pragma once
16-#define SPARSE_TENSOR_DENSE_MAT_MUL_B32_H
17 16 
18#include "sparse_tensor_dense_mat_mul_base.h"17#include "sparse_tensor_dense_mat_mul_base.h"
19 18 
@@ -128,4 +127,3 @@ __aicore__ inline void SparseTensorDenseMatMulB32<T_IDX, T_VAL, ADJ_A, ADJ_B>::P
128 127 
129} // namespace SparseTensorDenseMatMul128} // namespace SparseTensorDenseMatMul
130 129 
131-#endif // SPARSE_TENSOR_DENSE_MAT_MUL_B32_H
Mmatmul/sparse_tensor_dense_mat_mul/op_kernel/arch35/sparse_tensor_dense_mat_mul_base.h+1-3
@@ -12,8 +12,7 @@
12 * \file sparse_tensor_dense_mat_mul_base.h12 * \file sparse_tensor_dense_mat_mul_base.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef SPARSE_TENSOR_DENSE_MAT_MUL_BASE_H15+#pragma once
16-#define SPARSE_TENSOR_DENSE_MAT_MUL_BASE_H
17 16 
18#include "kernel_operator.h"17#include "kernel_operator.h"
19#include "kernel_tiling/kernel_tiling.h"18#include "kernel_tiling/kernel_tiling.h"
@@ -27,4 +26,3 @@ constexpr int32_t INDICES_DIM_1 = 2;
27 26 
28} // namespace SparseTensorDenseMatMul27} // namespace SparseTensorDenseMatMul
29 28 
30-#endif // SPARSE_TENSOR_DENSE_MAT_MUL_BASE_H
Mmatmul/sparse_tensor_dense_mat_mul/op_kernel/arch35/sparse_tensor_dense_mat_mul_tiling_def.h+1-3
@@ -13,8 +13,7 @@
13 * \brief TilingData def for op SparseTensorDenseMatMul13 * \brief TilingData def for op SparseTensorDenseMatMul
14 */14 */
15 15 
16-#ifndef __SPARSE_TENSOR_DENSE_MAT_MUL_TILING_DEF_H__16+#pragma once
17-#define __SPARSE_TENSOR_DENSE_MAT_MUL_TILING_DEF_H__
18 17 
19// 所有模板共用同一套TilingData18// 所有模板共用同一套TilingData
20struct SparseTensorDenseMatMulTilingData {19struct SparseTensorDenseMatMulTilingData {
@@ -50,4 +49,3 @@ struct SparseTensorDenseMatMulTilingData {
50 int64_t outTailCoreUbLoopTimes; // 尾核,要多少次循环49 int64_t outTailCoreUbLoopTimes; // 尾核,要多少次循环
51};50};
52 51 
53-#endif //__SPARSE_TENSOR_DENSE_MAT_MUL_TILING_DEF_H__
Mmatmul/sparse_tensor_dense_mat_mul/op_kernel/arch35/sparse_tensor_dense_mat_mul_zeroing.h+1-3
@@ -12,8 +12,7 @@
12 * \file sparse_tensor_dense_mat_mul_zeroing.h12 * \file sparse_tensor_dense_mat_mul_zeroing.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef SPARSE_TENSOR_DENSE_MAT_MUL_ZEROING_H15+#pragma once
16-#define SPARSE_TENSOR_DENSE_MAT_MUL_ZEROING_H
17 16 
18#include "sparse_tensor_dense_mat_mul_base.h"17#include "sparse_tensor_dense_mat_mul_base.h"
19 18 
@@ -50,4 +49,3 @@ __aicore__ inline void SparseTensorDenseMatMulZeroing<T_VAL>::InitAndProcessZero
50 49 
51} // namespace SparseTensorDenseMatMul50} // namespace SparseTensorDenseMatMul
52 51 
53-#endif // SPARSE_TENSOR_DENSE_MAT_MUL_ZEROING_H
Mmatmul/transpose_batch_mat_mul/op_host/op_tiling/arch35/transpose_batch_mat_mul_asw_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_V3_ASW_TILING_H__16+#pragma once
17-#define __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_V3_ASW_TILING_H__
18 17 
19#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
20#include "transpose_batch_mat_mul_tiling_key.h"19#include "transpose_batch_mat_mul_tiling_key.h"
@@ -57,4 +56,4 @@ private:
57};56};
58}57}
59}58}
60-#endif // __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_V3_ASW_TILING_H__59+ 
Mmatmul/transpose_batch_mat_mul/op_host/op_tiling/arch35/transpose_batch_mat_mul_common.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_common.h12 * \file transpose_batch_mat_mul_common.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_COMMON_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_COMMON_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"
19 18 
@@ -34,4 +33,4 @@ constexpr size_t ATTR_NUM = 5;
34constexpr int64_t UNKNOWN_DIM_NUM = -2;33constexpr int64_t UNKNOWN_DIM_NUM = -2;
35}34}
36} // namespace35} // namespace
37-#endif // __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_COMMON_H__36+ 
Mmatmul/transpose_batch_mat_mul/op_host/op_tiling/arch35/transpose_batch_mat_mul_tiling_advanced.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_tiling_advanced.h12 * \file transpose_batch_mat_mul_tiling_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_ADVANCED_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_ADVANCED_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"
19namespace optiling {18namespace optiling {
@@ -41,4 +40,4 @@ protected:
41};40};
42}41}
43}42}
44-#endif // __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_ADVANCED_H__43+ 
Mmatmul/transpose_batch_mat_mul/op_host/op_tiling/arch35/transpose_batch_mat_mul_tiling_key.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __OP_HOST_TBMM_TILING_KEY_H__16+#pragma once
17-#define __OP_HOST_TBMM_TILING_KEY_H__
18 17 
19#include <sstream>18#include <sstream>
20#include "op_host/tiling_key.h"19#include "op_host/tiling_key.h"
@@ -36,4 +35,4 @@ private:
36};35};
37} // namespace transpose_batch_mat_mul_advanced36} // namespace transpose_batch_mat_mul_advanced
38} // namespace optiling37} // namespace optiling
39-#endif // __OP_HOST_TBMM_TILING_KEY_H__38+ 
Mmatmul/transpose_batch_mat_mul/op_host/op_tiling/arch35/transpose_batch_mat_mul_tiling_strategy.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_tiling_strategy.h12 * \file transpose_batch_mat_mul_tiling_strategy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_STRATEGY_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_STRATEGY_H__
17 16 
18#include <map>17#include <map>
19#include <vector>18#include <vector>
@@ -43,4 +42,3 @@ inline std::vector<int32_t> GetTransposeBatchMatMulPriorities(NpuArch NpuArch)
43}42}
44}43}
45 44 
46-#endif // __OP_HOST_TRANSPOSE_BATCH_MAT_MUL_TILING_STRATEGY_H__
Mmatmul/transpose_batch_mat_mul/op_kernel/arch35/transpose_batch_mat_mul_asw_block_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_asw_block_advanced.h12 * \file transpose_batch_mat_mul_asw_block_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TRANSPOSE_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H15+#pragma once
16-#define TRANSPOSE_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -216,4 +215,3 @@ __aicore__ inline void TransposeBatchMatMulAswBlock::CalcGMOffset()
216 215 
217} // namespace TransposeBatchMatMulAdvanced216} // namespace TransposeBatchMatMulAdvanced
218 217 
219-#endif // TRANSPOSE_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H
Mmatmul/transpose_batch_mat_mul/op_kernel/arch35/transpose_batch_mat_mul_asw_kernel_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_asw_kernel_advanced.h12 * \file transpose_batch_mat_mul_asw_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TRANSPOSE_BATCH_MAT_MUL_ASW_KERNEL_ADVANCED_H15+#pragma once
16-#define TRANSPOSE_BATCH_MAT_MUL_ASW_KERNEL_ADVANCED_H
17 16 
18#include "transpose_batch_mat_mul_asw_block_advanced.h"17#include "transpose_batch_mat_mul_asw_block_advanced.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -187,4 +186,3 @@ TransposeBatchMatMulAswKernel<A_TYPE, B_TYPE, C_TYPE, BIAS_TYPE, MODE, BLOCK_TYP
187 186 
188} // namespace TransposeBatchMatMulAdvanced187} // namespace TransposeBatchMatMulAdvanced
189 188 
190-#endif // TRANSPOSE_BATCH_MAT_MUL_ASW_KERNEL_ADVANCED_H
Mmatmul/transpose_batch_mat_mul/op_kernel/arch35/transpose_batch_mat_mul_tiling_key.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_batch_mat_mul_tiling_key.h12 * \file transpose_batch_mat_mul_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_TBMM_TILING_KEY_H__15+#pragma once
16-#define __OP_KERNEL_TBMM_TILING_KEY_H__
17 16 
18#include "ascendc/host_api/tiling/template_argument.h"17#include "ascendc/host_api/tiling/template_argument.h"
19#include "transpose_batch_mat_mul_tiling_key_public.h"18#include "transpose_batch_mat_mul_tiling_key_public.h"
@@ -69,4 +68,4 @@ ASCENDC_TPL_SEL(
69 ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_2_1),68 ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_2_1),
70 ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST,69 ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST,
71 TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE)));70 TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE)));
72-#endif71+ 
Mmatmul/transpose_batch_mat_mul/op_kernel/arch35/transpose_batch_mat_mul_tiling_key_public.h+1-3
@@ -15,8 +15,7 @@
15 15 
16#include <cstdint>16#include <cstdint>
17 17 
18-#ifndef OP_KERNEL_TBMM_TILING_KEY_PUBLIC_H18+#pragma once
19-#define OP_KERNEL_TBMM_TILING_KEY_PUBLIC_H
20 19 
21#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE 020#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE 0
22#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE 121#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE 1
@@ -42,4 +41,3 @@ enum class TBMMBatchSplit : std::uint8_t {
42 BATCH_SPLIT_TRUE = TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE41 BATCH_SPLIT_TRUE = TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE
43};42};
44 43 
45-#endif
Mmatmul/transpose_quant_batch_mat_mul/op_host/op_tiling/arch35/transpose_quant_batch_mat_mul_asw_tiling.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef __TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_TILING_H__16+#pragma once
17-#define __TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_TILING_H__
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_base_tiling_advanced.h"
19#include "../../../op_kernel/arch35/transpose_quant_batch_mat_mul_tiling_key_public.h"18#include "../../../op_kernel/arch35/transpose_quant_batch_mat_mul_tiling_key_public.h"
20 19 
@@ -57,4 +56,4 @@ private:
57};56};
58} // namespace transpose_quant_batch_mat_mul_advanced57} // namespace transpose_quant_batch_mat_mul_advanced
59} // namespace optiling58} // namespace optiling
60-#endif // TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_TILING_H59+ 
Mmatmul/transpose_quant_batch_mat_mul/op_host/op_tiling/arch35/transpose_quant_batch_mat_mul_common.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_common.h12 * \file transpose_quant_batch_mat_mul_common.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_COMMON_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_COMMON_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_common_advanced.h"
19 18 
@@ -75,4 +74,4 @@ bool inline IsMicroScaling(const gert::CompileTimeTensorDesc* x1Scale, const ger
75}74}
76} // namespace transpose_quant_batch_mat_mul_advanced75} // namespace transpose_quant_batch_mat_mul_advanced
77} // namespace optiling76} // namespace optiling
78-#endif // __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_COMMON_H__77+ 
Mmatmul/transpose_quant_batch_mat_mul/op_host/op_tiling/arch35/transpose_quant_batch_mat_mul_tiling_advanced.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_tiling_advanced.h12 * \file transpose_quant_batch_mat_mul_tiling_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_ADVANCED_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_ADVANCED_H__
17 16 
18#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"17#include "matmul/mat_mul_v3/op_host/op_tiling/arch35/matmul_v3_tiling_advanced.h"
19namespace optiling {18namespace optiling {
@@ -42,4 +41,4 @@ protected:
42};41};
43} // namespace transpose_quant_batch_mat_mul_advanced42} // namespace transpose_quant_batch_mat_mul_advanced
44} // namespace optiling43} // namespace optiling
45-#endif // __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_ADVANCED_H__44+ 
Mmatmul/transpose_quant_batch_mat_mul/op_host/op_tiling/arch35/transpose_quant_batch_mat_mul_tiling_strategy.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_tiling_strategy.h12 * \file transpose_quant_batch_mat_mul_tiling_strategy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_STRATEGY_H__15+#pragma once
16-#define __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_STRATEGY_H__
17 16 
18#include <map>17#include <map>
19#include <vector>18#include <vector>
@@ -43,4 +42,3 @@ inline std::vector<int32_t> GetTransposeQuantBatchMatMulPriorities(NpuArch npuAr
43} // namespace transpose_quant_batch_mat_mul_advanced42} // namespace transpose_quant_batch_mat_mul_advanced
44} // namespace optiling43} // namespace optiling
45 44 
46-#endif // __OP_HOST_TRANSPOSE_QUANT_BATCH_MAT_MUL_TILING_STRATEGY_H__
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/mm_extension_interface/tqbmm_copy_cube_out.h+2-3
@@ -12,8 +12,7 @@
12 * \file tqbmm_copy_cube_out.h12 * \file tqbmm_copy_cube_out.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TQBMM_COPY_CUBE_OUT_H15+#pragma once
16-#define TQBMM_COPY_CUBE_OUT_H
17#include "lib/matmul_intf.h"16#include "lib/matmul_intf.h"
18 17 
19namespace AscendC {18namespace AscendC {
@@ -205,4 +204,4 @@ private:
205};204};
206 205 
207} // namespace AscendC206} // namespace AscendC
208-#endif // QBMM_COPY_CUBE_OUT_H207+ 
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/mm_extension_interface/tqbmm_custom_mm_policy.h+2-3
@@ -12,8 +12,7 @@
12 * \file tqbmm_custom_mm_policy.h12 * \file tqbmm_custom_mm_policy.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TQBMM_CUSTOM_MM_POLICY_H15+#pragma once
16-#define TQBMM_CUSTOM_MM_POLICY_H
17 16 
18#include "lib/matmul_intf.h"17#include "lib/matmul_intf.h"
19#include "tqbmm_copy_cube_out.h"18#include "tqbmm_copy_cube_out.h"
@@ -26,4 +25,4 @@ public:
26 using CopyCubeOut = TQBmmCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;25 using CopyCubeOut = TQBmmCustomCopyCubeOut<IMPL, A_TYPE, B_TYPE, C_TYPE, MM_CFG, McgShfMode::DUAL_DST_SPLIT_M>;
27};26};
28} // namespace AscendC27} // namespace AscendC
29-#endif // TQBMM_CUSTOM_MM_POLICY_H28+ 
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/transpose_quant_batch_mat_mul_asw_block_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_asw_block_advanced.h12 * \file transpose_quant_batch_mat_mul_asw_block_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H15+#pragma once
16-#define TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H
17 16 
18#include "../../mat_mul_v3/arch35/mat_mul_tiling_data.h"17#include "../../mat_mul_v3/arch35/mat_mul_tiling_data.h"
19#include "../../common/cmct/utils/common_utils.h"18#include "../../common/cmct/utils/common_utils.h"
@@ -157,4 +156,3 @@ __aicore__ inline void TransposeQuantBatchMatMulAswBlock::CalcGMOffset(bool isMx
157 156 
158} // namespace TransposeQuantBatchMatMulAdvanced157} // namespace TransposeQuantBatchMatMulAdvanced
159 158 
160-#endif // TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_BLOCK_ADVANCED_H
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/transpose_quant_batch_mat_mul_asw_kernel_advanced.h+1-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_asw_kernel_advanced.h12 * \file transpose_quant_batch_mat_mul_asw_kernel_advanced.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_KERNEL_ADVANCED_H15+#pragma once
16-#define TRANSPOSE_QUANT_BATCH_MAT_MUL_ASW_KERNEL_ADVANCED_H
17 16 
18#include "../../inc/platform.h"17#include "../../inc/platform.h"
19#include "mm_extension_interface/tqbmm_custom_mm_policy.h"18#include "mm_extension_interface/tqbmm_custom_mm_policy.h"
@@ -447,4 +446,3 @@ __aicore__ inline void TransposeQuantBatchMatMulAswKernel<LOCAL_TEMPLATE_FUNC_MI
447 446 
448} // namespace TransposeQuantBatchMatMulAdvanced447} // namespace TransposeQuantBatchMatMulAdvanced
449 448 
450-#endif // QBMM_MIX_ONLINE_DYNAMIC_H
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/transpose_quant_batch_mat_mul_tiling_key.h+2-3
@@ -12,8 +12,7 @@
12 * \file transpose_quant_batch_mat_mul_tiling_key.h12 * \file transpose_quant_batch_mat_mul_tiling_key.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef __OP_KERNEL_TQBMM_TILING_KEY_H__15+#pragma once
16-#define __OP_KERNEL_TQBMM_TILING_KEY_H__
17 16 
18#include "ascendc/host_api/tiling/template_argument.h"17#include "ascendc/host_api/tiling/template_argument.h"
19#include "transpose_quant_batch_mat_mul_tiling_key_public.h"18#include "transpose_quant_batch_mat_mul_tiling_key_public.h"
@@ -50,4 +49,4 @@ ASCENDC_TPL_SEL(
50 ASCENDC_TPL_UINT_SEL(PRECISION_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_QUANT_BATCH_MAT_MUL_MXFP8)),49 ASCENDC_TPL_UINT_SEL(PRECISION_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_QUANT_BATCH_MAT_MUL_MXFP8)),
51 50 
52);51);
53-#endif52+ 
Mmatmul/transpose_quant_batch_mat_mul/op_kernel/arch35/transpose_quant_batch_mat_mul_tiling_key_public.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef OP_KERNEL_TQBMM_TILING_KEY_PUBLIC_H16+#pragma once
17-#define OP_KERNEL_TQBMM_TILING_KEY_PUBLIC_H
18#include <cstdint>17#include <cstdint>
19 18 
20#define TRANSPOSE_QUANT_BATCH_MAT_MUL_BATCH_SPLIT_FALSE 019#define TRANSPOSE_QUANT_BATCH_MAT_MUL_BATCH_SPLIT_FALSE 0
@@ -48,4 +47,4 @@ enum class TQBMMPrecisionMode : std::uint8_t {
48 PRECISION_MODE_FP8 = TRANSPOSE_QUANT_BATCH_MAT_MUL_FP8,47 PRECISION_MODE_FP8 = TRANSPOSE_QUANT_BATCH_MAT_MUL_FP8,
49 PRECISION_MODE_MXFP8 = TRANSPOSE_QUANT_BATCH_MAT_MUL_MXFP848 PRECISION_MODE_MXFP8 = TRANSPOSE_QUANT_BATCH_MAT_MUL_MXFP8
50};49};
51-#endif50+ 
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/backward_compatible/weight_quant_batch_matmul_v2_tiling_custom_backward_compatible.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_CUSTOM_BACKWARD_COMPATIBLE_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_CUSTOM_BACKWARD_COMPATIBLE_H
18 17 
19#include "../../weight_quant_batch_matmul_v2_tiling_custom.h"18#include "../../weight_quant_batch_matmul_v2_tiling_custom.h"
20 19 
@@ -37,4 +36,4 @@ protected:
37};36};
38 37 
39} // namespace optiling38} // namespace optiling
40-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_CUSTOM_BACKWARD_COMPATIBLE_H39+ 
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_adaptive_sliding_window_tiling.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SLIDING_WINDOW_TILING_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SLIDING_WINDOW_TILING_H
18 17 
19#include "../weight_quant_batch_matmul_v2_tiling.h"18#include "../weight_quant_batch_matmul_v2_tiling.h"
20#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"19#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"
@@ -102,4 +101,3 @@ private:
102} // namespace weight_quant_batch_matmul_v2101} // namespace weight_quant_batch_matmul_v2
103} // namespace optiling102} // namespace optiling
104 103 
105-#endif
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_adaptive_split_tiling.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SPLIT_TILING_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SPLIT_TILING_H
18 17 
19#include "../weight_quant_batch_matmul_v2_tiling.h"18#include "../weight_quant_batch_matmul_v2_tiling.h"
20#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"19#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"
@@ -98,4 +97,3 @@ private:
98} // namespace weight_quant_batch_matmul_v297} // namespace weight_quant_batch_matmul_v2
99} // namespace optiling98} // namespace optiling
100 99 
101-#endif
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_basic_block_table.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TABLE_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TABLE_H
18 17 
19#include <array>18#include <array>
20#include <cstdint>19#include <cstdint>
@@ -218,4 +217,3 @@ private:
218};217};
219} // namespace optiling218} // namespace optiling
220 219 
221-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TABLE_H
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_basic_block_tiling.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TILING_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TILING_H
18 17 
19#include <algorithm>18#include <algorithm>
20#include <cmath>19#include <cmath>
@@ -498,4 +497,3 @@ protected:
498 497 
499} // namespace optiling498} // namespace optiling
500 499 
501-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_BASIC_BLOCK_TILING_H
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_iterbatch_tiling.h+43-44
@@ -1,44 +1,43 @@
1-/**1+/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of 3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
9- */9+ */
10- 10+ 
11-/*!11+/*!
12- * \file weight_quant_batch_matmul_v2_iterbatch_tiling.h12+ * \file weight_quant_batch_matmul_v2_iterbatch_tiling.h
13- * \brief13+ * \brief
14- */14+ */
15- 15+ 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_TILING_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_TILING_H17+#include "weight_quant_batch_matmul_v2_adaptive_sliding_window_tiling.h"
18-#include "weight_quant_batch_matmul_v2_adaptive_sliding_window_tiling.h"18+#include "../weight_quant_batch_matmul_v2_tiling.h"
19-#include "../weight_quant_batch_matmul_v2_tiling.h"19+#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"
20-#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"20+namespace optiling {
21-namespace optiling {21+namespace weight_quant_batch_matmul_v2 {
22-namespace weight_quant_batch_matmul_v2 {22+ 
23- 23+class WeightQuantBatchMatmulV2IterbatchTiling : public WeightQuantBatchMatmulV2TilingASW {
24-class WeightQuantBatchMatmulV2IterbatchTiling : public WeightQuantBatchMatmulV2TilingASW {24+public:
25-public:25+ explicit WeightQuantBatchMatmulV2IterbatchTiling(gert::TilingContext* context) :
26- explicit WeightQuantBatchMatmulV2IterbatchTiling(gert::TilingContext* context) :26+ WeightQuantBatchMatmulV2TilingASW(context) {}
27- WeightQuantBatchMatmulV2TilingASW(context) {}27+ ~WeightQuantBatchMatmulV2IterbatchTiling() override = default;
28- ~WeightQuantBatchMatmulV2IterbatchTiling() override = default;28+protected:
29-protected:29+ ge::graphStatus DoOpTiling() override;
30- ge::graphStatus DoOpTiling() override;30+ bool IsCapable() override;
31- bool IsCapable() override;31+ uint64_t GetTilingKey() const override;
32- uint64_t GetTilingKey() const override;32+ void GetBroadCastInfo(uint64_t& broadcastNum, uint64_t& innerBatchNum, bool& isBroadcastA, bool& isBroadcastB);
33- void GetBroadCastInfo(uint64_t& broadcastNum, uint64_t& innerBatchNum, bool& isBroadcastA, bool& isBroadcastB);33+ 
34- 34+ void CalL1Tiling();
35- void CalL1Tiling();35+ bool CheckBatch();
36- bool CheckBatch();36+ uint32_t CalcIterBatch();
37- uint32_t CalcIterBatch();37+ uint32_t GetGcd(uint32_t numA, uint32_t numB) const;
38- uint32_t GetGcd(uint32_t numA, uint32_t numB) const;38+private:
39-private:39+ uint64_t leftL1Size_ = 0;
40- uint64_t leftL1Size_ = 0;40+};
41-};41+} // namespace weight_quant_batch_matmul_v2
42-} // namespace weight_quant_batch_matmul_v242+} // namespace optiling
43-} // namespace optiling43+ 
44-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_TILING_H
Mmatmul/weight_quant_batch_matmul_v2/op_host/op_tiling/arch35/weight_quant_batch_matmul_v2_reg_base_tiling.h+2-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_reg_base_tiling.h12 * \file weight_quant_batch_matmul_v2_reg_base_tiling.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_REG_BASE_TILING_H15+#pragma once
16-#define WEIGHT_QUANT_BATCH_MATMUL_V2_REG_BASE_TILING_H
17 16 
18#include "weight_quant_batch_matmul_v2_basic_block_tiling.h"17#include "weight_quant_batch_matmul_v2_basic_block_tiling.h"
19#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"18#include "matmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h"
@@ -64,4 +63,4 @@ private:
64 ge::graphStatus InstantiateTilingData();63 ge::graphStatus InstantiateTilingData();
65};64};
66} // namespace optiling65} // namespace optiling
67-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_REG_BASE_TILING_H66+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/cmct_convertor.h+1-3
@@ -8,8 +8,7 @@
8 * See LICENSE in the root of the software repository for the full text of the License.8 * See LICENSE in the root of the software repository for the full text of the License.
9 */9 */
10 10 
11-#ifndef ARCH35_CMCT_CONVERTOR_H11+#pragma once
12-#define ARCH35_CMCT_CONVERTOR_H
13#include "cmct/policy/dispatch_policy.h"12#include "cmct/policy/dispatch_policy.h"
14#include "cmct/kernel/kernel_matmul_a_prefetch_b_antiquant.h"13#include "cmct/kernel/kernel_matmul_a_prefetch_b_antiquant.h"
15#include "cmct/block/block_scheduler_tail_resplit_expanded.h"14#include "cmct/block/block_scheduler_tail_resplit_expanded.h"
@@ -514,4 +513,3 @@ __aicore__ inline void InvokeKernel(
514 513 
515#define KERNEL_PARAMS x, weight, antiquantScale, antiquantOffset, quantScale, quantOffset, bias, y, workspace, tiling514#define KERNEL_PARAMS x, weight, antiquantScale, antiquantOffset, quantScale, quantOffset, bias, y, workspace, tiling
516 515 
517-#endif
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/anti_quant_y_vf.h+2-3
@@ -12,8 +12,7 @@
12 * \file anti_quant_y_vf.h12 * \file anti_quant_y_vf.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_ANTI_QUANT_Y_VF_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_ANTI_QUANT_Y_VF_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -94,4 +93,4 @@ __aicore__ inline void AntiQuantYB32(
94 }93 }
95}94}
96} // namespace WeightQuantBatchMatmulV2::Arch3595} // namespace WeightQuantBatchMatmulV2::Arch35
97-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_ANTI_QUANT_Y_VF_H96+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/basic_block_config.h+2-3
@@ -12,8 +12,7 @@
12 * \file basic_block_config.h12 * \file basic_block_config.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONFIG_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONFIG_H
17 16 
18#include "../tool_arch35.h"17#include "../tool_arch35.h"
19#include "../../weight_quant_batch_matmul_v2_constant.h"18#include "../../weight_quant_batch_matmul_v2_constant.h"
@@ -227,4 +226,4 @@ __aicore__ constexpr VfConfig GetVfConfig()
227 }226 }
228}227}
229} // namespace WeightQuantBatchMatmulV2::Arch35228} // namespace WeightQuantBatchMatmulV2::Arch35
230-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONFIG_H229+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/basic_block_vf_mx.h+2-3
@@ -12,8 +12,7 @@
12 * \file basic_block_vf_mx.h12 * \file basic_block_vf_mx.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_MX_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_MX_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -320,4 +319,4 @@ __aicore__ inline void AntiQuantFp4NzKnVf(Fp4NzParams<xType, wType>& fp4NzParams
320 }319 }
321}320}
322} // namespace WeightQuantBatchMatmulV2::Arch35321} // namespace WeightQuantBatchMatmulV2::Arch35
323-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_MX_H322+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/basic_block_vf_nd.h+2-3
@@ -12,8 +12,7 @@
12 * \file basic_block_vf_nd.h12 * \file basic_block_vf_nd.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_ND_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_ND_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -554,4 +553,4 @@ __aicore__ inline void AntiQuantInt4NdKn(
554}553}
555 554 
556} // namespace WeightQuantBatchMatmulV2::Arch35555} // namespace WeightQuantBatchMatmulV2::Arch35
557-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_ND_H556+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/basic_block_vf_nz.h+2-3
@@ -12,8 +12,7 @@
12 * \file basic_block_vf_nz.h12 * \file basic_block_vf_nz.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_NZ_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_NZ_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -165,4 +164,4 @@ __aicore__ inline void AntiQuantS8S4NzKnGroupVf(Int4NzParams<xType, wType, antiQ
165 }164 }
166}165}
167} // namespace WeightQuantBatchMatmulV2::Arch35166} // namespace WeightQuantBatchMatmulV2::Arch35
168-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_VF_NZ_H167+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/weight_quant_batch_matmul_v2_basic_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_basic_block.h12 * \file weight_quant_batch_matmul_v2_basic_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -343,4 +342,3 @@ WeightQuantMatmulBasicBlock<xType, wType, antiQuantScaleType, biasType, yType, w
343}342}
344} // namespace WeightQuantBatchMatmulV2::Arch35343} // namespace WeightQuantBatchMatmulV2::Arch35
345 344 
346-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/weight_quant_batch_matmul_v2_basic_block_controller.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONTROLLER_H16+#pragma once
17-#define WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONTROLLER_H
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#include "weight_quant_batch_matmul_v2_basic_block.h"18#include "weight_quant_batch_matmul_v2_basic_block.h"
20 19 
@@ -128,4 +127,4 @@ __aicore__ inline void WeightQuantBatchMatmulV2BasicBlockController<
128 wqmmBasicBlock_.End();127 wqmmBasicBlock_.End();
129}128}
130} // namespace WeightQuantBatchMatmulV2::Arch35129} // namespace WeightQuantBatchMatmulV2::Arch35
131-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_CONTROLLER_H130+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/weight_quant_batch_matmul_v2_cube_compute.h+2-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_cube_compute.h12 * \file weight_quant_batch_matmul_v2_cube_compute.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_CUBE_COMPUTE_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_CUBE_COMPUTE_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -426,4 +425,4 @@ __aicore__ inline void WQBMM_CUBE_COMPUTE_CLASS::GetTensorC(LocalTensor<yType>&
426#endif425#endif
427}426}
428} // namespace WeightQuantBatchMatmulV2::Arch35427} // namespace WeightQuantBatchMatmulV2::Arch35
429-#endif428+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/weight_quant_batch_matmul_v2_vcv_basic_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_vcv_basic_block.h12 * \file weight_quant_batch_matmul_v2_vcv_basic_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_VCV_BASIC_BLOCK_H15+#pragma once
16-#define WEIGHT_QUANT_BATCHMATMUL_V2_VCV_BASIC_BLOCK_H
17 16 
18#include "basic_block_config.h"17#include "basic_block_config.h"
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
@@ -298,4 +297,3 @@ __aicore__ inline void WeightQuantVcvMatmulBasicBlock<xType, wType, biasType, yT
298}297}
299} // namespace WeightQuantBatchMatmulV2::Arch35298} // namespace WeightQuantBatchMatmulV2::Arch35
300 299 
301-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_BASIC_BLOCK_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/n_first/weight_quant_batch_matmul_v2_vec_compute.h+1-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_vec_compute.h12 * \file weight_quant_batch_matmul_v2_vec_compute.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_VEC_COMPUTE_H15+#pragma once
16-#define WEIGHT_QUANT_BATCH_MATMUL_V2_VEC_COMPUTE_H
17 16 
18#include "anti_quant_y_vf.h"17#include "anti_quant_y_vf.h"
19#include "basic_block_config.h"18#include "basic_block_config.h"
@@ -1218,4 +1217,3 @@ BasicBlockLibVectorAntiQuantCompute<xType, wType, antiQuantScaleType, yType, wqm
1218}1217}
1219} // namespace WeightQuantBatchMatmulV2::Arch351218} // namespace WeightQuantBatchMatmulV2::Arch35
1220 1219 
1221-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_VEC_COMPUTE_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/tool_arch35.h+2-3
@@ -12,8 +12,7 @@
12 * \file tool_arch35.h12 * \file tool_arch35.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_TOOL_ARCH35_H15+#pragma once
16-#define WEIGHT_QUANT_BATCH_MATMUL_V2_TOOL_ARCH35_H
17 16 
18#include <limits>17#include <limits>
19 18 
@@ -132,4 +131,4 @@ struct MatmulL1GmType : MatmulType<POSITION, FORMAT, TYPE, ISTRANS, LAYOUT, IBSH
132 constexpr static TPosition srcPos = TPosition::GM;131 constexpr static TPosition srcPos = TPosition::GM;
133};132};
134} // namespace WeightQuantBatchMatmulV2::Arch35133} // namespace WeightQuantBatchMatmulV2::Arch35
135-#endif134+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_adaptive_sliding_window.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SLIDING_WINDOW_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SLIDING_WINDOW_H
18 17 
19#include "weight_quant_batch_matmul_v2_asw_block.h"18#include "weight_quant_batch_matmul_v2_asw_block.h"
20#include "../weight_quant_batch_matmul_v2_constant.h"19#include "../weight_quant_batch_matmul_v2_constant.h"
@@ -225,4 +224,4 @@ __aicore__ inline void WeightQuantBatchMatmulV2ASWKernel<LOCAL_TEMPLATE_FUNC_PAR
225 mm_.GetTensorC(cGlobal_[block_.offset_.offsetC]);224 mm_.GetTensorC(cGlobal_[block_.offset_.offsetC]);
226}225}
227} // namespace WeightQuantBatchMatmulV2::Arch35226} // namespace WeightQuantBatchMatmulV2::Arch35
228-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_ADAPTIVE_SLIDING_WINDOW_H227+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_data.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef ARCH35_WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_DATA_H16+#pragma once
17-#define ARCH35_WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_DATA_H
18#include "kernel_tiling/kernel_tiling.h"17#include "kernel_tiling/kernel_tiling.h"
19 18 
20#ifndef __CCE_AICORE__19#ifndef __CCE_AICORE__
@@ -161,4 +160,4 @@ struct alignas(8) WeightQuantBatchMatmulV2TilingData
161};160};
162#pragma pack(pop)161#pragma pack(pop)
163} // namespace wqbmmv2_tiling162} // namespace wqbmmv2_tiling
164-#endif // ARCH35_WEIGHT_QUANT_BATCH_MATMUL_V2_TILING_DATA_H163+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_arch35_tiling_key.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ARCH35_TILING_KEY_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ARCH35_TILING_KEY_H
18 17 
19#include "ascendc/host_api/tiling/template_argument.h"18#include "ascendc/host_api/tiling/template_argument.h"
20#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"19#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"
@@ -720,4 +719,3 @@ ASCENDC_TPL_SEL(
720#endif719#endif
721);720);
722 721 
723-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_ARCH35_TILING_KEY_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_asw_block.h+1-3
@@ -12,8 +12,7 @@
12 * \file weight_quant_batch_matmul_v2_asw_block.h12 * \file weight_quant_batch_matmul_v2_asw_block.h
13 * \brief13 * \brief
14 */14 */
15-#ifndef WEIGHT_QUANT_BMMV2_ASW_BLOCK_H15+#pragma once
16-#define WEIGHT_QUANT_BMMV2_ASW_BLOCK_H
17 16 
18#if ASC_DEVKIT_MAJOR >= 917#if ASC_DEVKIT_MAJOR >= 9
19#include "kernel_basic_intf.h"18#include "kernel_basic_intf.h"
@@ -192,4 +191,3 @@ __aicore__ inline void WeightQuantBmmAswBlock::CalcGMOffset()
192 191 
193} // namespace WeightQuantBatchMatmulV2::Arch35192} // namespace WeightQuantBatchMatmulV2::Arch35
194 193 
195-#endif // WEIGHT_QUANT_BMMV2_ASW_BLOCK_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_iterbatch.h+157-158
@@ -1,158 +1,157 @@
1-/**1+/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of 3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
9- */9+ */
10- 10+ 
11-/*!11+/*!
12- * \file weight_quant_batch_matmul_v2_iterbatch.h12+ * \file weight_quant_batch_matmul_v2_iterbatch.h
13- * \brief13+ * \brief
14- */14+ */
15- 15+ 
16-#ifndef WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_H16+#pragma once
17-#define WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_H17+ 
18- 18+#if ASC_DEVKIT_MAJOR >= 9
19-#if ASC_DEVKIT_MAJOR >= 919+#include "kernel_basic_intf.h"
20-#include "kernel_basic_intf.h"20+#else
21-#else21+#include "kernel_operator.h"
22-#include "kernel_operator.h"22+#endif
23-#endif23+#include "lib/matmul_intf.h"
24-#include "lib/matmul_intf.h"24+#include "../tool.h"
25-#include "../tool.h"25+#include "weight_quant_batch_matmul_v2_iterbatch_block.h"
26-#include "weight_quant_batch_matmul_v2_iterbatch_block.h"26+#include "../weight_quant_batch_matmul_v2_constant.h"
27-#include "../weight_quant_batch_matmul_v2_constant.h"27+#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"
28-#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"28+ 
29- 29+#define ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS \
30-#define ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS \30+ template <typename xType, typename wType, typename biasType, typename yType, bool aTrans, bool bTrans, \
31- template <typename xType, typename wType, typename biasType, typename yType, bool aTrans, bool bTrans, \31+ QuantType antiQuantType, bool hasAntiQuantOffset, QuantType quantType, const MatmulConfig &mmCfg>
32- QuantType antiQuantType, bool hasAntiQuantOffset, QuantType quantType, const MatmulConfig &mmCfg>32+#define ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS \
33-#define ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS \33+ xType, wType, biasType, yType, aTrans, bTrans, antiQuantType, hasAntiQuantOffset, quantType, mmCfg
34- xType, wType, biasType, yType, aTrans, bTrans, antiQuantType, hasAntiQuantOffset, quantType, mmCfg34+ 
35- 35+using AscendC::GetBlockIdx;
36-using AscendC::GetBlockIdx;36+using AscendC::GlobalTensor;
37-using AscendC::GlobalTensor;37+using AscendC::TPipe;
38-using AscendC::TPipe;38+using AscendC::TPosition;
39-using AscendC::TPosition;39+using matmul::MatmulImpl;
40-using matmul::MatmulImpl;40+using matmul::MatmulType;
41-using matmul::MatmulType;41+namespace WeightQuantBatchMatmulV2::Arch35 {
42-namespace WeightQuantBatchMatmulV2::Arch35 {42+ 
43- 43+ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS
44-ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS44+class WeightQuantBatchMatmulV2IterBatchKernel {
45-class WeightQuantBatchMatmulV2IterBatchKernel {45+public:
46-public:46+ __aicore__ inline WeightQuantBatchMatmulV2IterBatchKernel()
47- __aicore__ inline WeightQuantBatchMatmulV2IterBatchKernel()47+ {
48- {48+ }
49- }49+ __aicore__ inline void Init(GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset,
50- __aicore__ inline void Init(GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset,50+ GM_ADDR quantScale, GM_ADDR quantOffset, GM_ADDR bias, GM_ADDR y, GM_ADDR workspace,
51- GM_ADDR quantScale, GM_ADDR quantOffset, GM_ADDR bias, GM_ADDR y, GM_ADDR workspace,51+ const void* tilingData, TPipe* tPipe);
52- const void* tilingData, TPipe* tPipe);52+ __aicore__ inline void UpdateGlobalAddr(GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset,
53- __aicore__ inline void UpdateGlobalAddr(GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset,53+ GM_ADDR quantScale, GM_ADDR quantOffset, GM_ADDR bias, GM_ADDR y,
54- GM_ADDR quantScale, GM_ADDR quantOffset, GM_ADDR bias, GM_ADDR y,54+ GM_ADDR workspace);
55- GM_ADDR workspace);55+ __aicore__ inline void Process();
56- __aicore__ inline void Process();56+protected:
57-protected:57+ __aicore__ inline void CalcMmWithBatch();
58- __aicore__ inline void CalcMmWithBatch();58+ uint32_t blockIdx_;
59- uint32_t blockIdx_;59+ const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tiling_;
60- const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tiling_;60+ 
61- 61+ GlobalTensor<xType> aGlobal_;
62- GlobalTensor<xType> aGlobal_;62+ GlobalTensor<wType> bGlobal_;
63- GlobalTensor<wType> bGlobal_;63+ GlobalTensor<yType> cGlobal_;
64- GlobalTensor<yType> cGlobal_;64+ GlobalTensor<biasType> biasGlobal_;
65- GlobalTensor<biasType> biasGlobal_;65+ WeightQuantBmmIterBatchBlock block_;
66- WeightQuantBmmIterBatchBlock block_;66+ GlobalTensor<uint64_t> scaleGlobal_;
67- GlobalTensor<uint64_t> scaleGlobal_;67+ using aType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, xType, aTrans, LayoutMode::NORMAL>;
68- using aType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, xType, aTrans, LayoutMode::NORMAL>;68+ using bType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, wType, bTrans, LayoutMode::NORMAL>;
69- using bType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, wType, bTrans, LayoutMode::NORMAL>;69+ using cType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, yType, false, LayoutMode::NORMAL>;
70- using cType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, yType, false, LayoutMode::NORMAL>;70+ using biasMatmulType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, biasType>;
71- using biasMatmulType = matmul::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, biasType>;71+ matmul::MatmulImpl<aType, bType, cType, biasMatmulType, mmCfg> mm_;
72- matmul::MatmulImpl<aType, bType, cType, biasMatmulType, mmCfg> mm_;72+};
73-};73+ 
74- 74+ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS
75-ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS75+__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::Init(
76-__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::Init(76+ GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset, GM_ADDR quantScale, GM_ADDR quantOffset,
77- GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset, GM_ADDR quantScale, GM_ADDR quantOffset,77+ GM_ADDR bias, GM_ADDR y, GM_ADDR workspace, const void* tilingData, TPipe* tPipe)
78- GM_ADDR bias, GM_ADDR y, GM_ADDR workspace, const void* tilingData, TPipe* tPipe)78+{
79-{79+ if ASCEND_IS_AIV {
80- if ASCEND_IS_AIV {80+ return;
81- return;81+ }
82- }82+ tiling_ = static_cast<const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams*>(tilingData);
83- tiling_ = static_cast<const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams*>(tilingData);83+ blockIdx_ = GetBlockIdx();
84- blockIdx_ = GetBlockIdx();84+ UpdateGlobalAddr(x, weight, antiquantScale, antiquantOffset, quantScale, quantOffset, bias, y, workspace);
85- UpdateGlobalAddr(x, weight, antiquantScale, antiquantOffset, quantScale, quantOffset, bias, y, workspace);85+ mm_.SetSubBlockIdx(0);
86- mm_.SetSubBlockIdx(0);86+ mm_.Init(&tiling_->matmulTiling, tPipe);
87- mm_.Init(&tiling_->matmulTiling, tPipe);87+}
88-}88+ 
89- 89+ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS
90-ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS90+__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::UpdateGlobalAddr(
91-__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::UpdateGlobalAddr(91+ GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset, GM_ADDR quantScale, GM_ADDR quantOffset,
92- GM_ADDR x, GM_ADDR weight, GM_ADDR antiquantScale, GM_ADDR antiquantOffset, GM_ADDR quantScale, GM_ADDR quantOffset,92+ GM_ADDR bias, GM_ADDR y, GM_ADDR workspace)
93- GM_ADDR bias, GM_ADDR y, GM_ADDR workspace)93+{
94-{94+ block_.Init(tiling_, blockIdx_);
95- block_.Init(tiling_, blockIdx_);95+ 
96- 96+ if constexpr (antiQuantType == QuantType::PER_TENSOR) { // pertensor
97- if constexpr (antiQuantType == QuantType::PER_TENSOR) { // pertensor97+ block_.offset_.scaleScalar = *((__gm__ uint64_t *)antiquantScale);
98- block_.offset_.scaleScalar = *((__gm__ uint64_t *)antiquantScale);98+ } else {
99- } else {99+ scaleGlobal_.SetGlobalBuffer((__gm__ uint64_t *)antiquantScale);
100- scaleGlobal_.SetGlobalBuffer((__gm__ uint64_t *)antiquantScale);100+ }
101- }101+ 
102- 102+ // update global buffer
103- // update global buffer103+ aGlobal_.SetGlobalBuffer((__gm__ xType *)x);
104- aGlobal_.SetGlobalBuffer((__gm__ xType *)x);104+ bGlobal_.SetGlobalBuffer((__gm__ wType *)weight);
105- bGlobal_.SetGlobalBuffer((__gm__ wType *)weight);105+ cGlobal_.SetGlobalBuffer((__gm__ yType *)y);
106- cGlobal_.SetGlobalBuffer((__gm__ yType *)y);106+ if (static_cast<bool>(tiling_->matmulTiling.isBias)) {
107- if (static_cast<bool>(tiling_->matmulTiling.isBias)) {107+ biasGlobal_.SetGlobalBuffer((__gm__ biasType*)bias);
108- biasGlobal_.SetGlobalBuffer((__gm__ biasType*)bias);108+ }
109- }109+}
110-}110+ 
111- 111+ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS
112-ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS112+__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::Process()
113-__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::Process()113+{
114-{114+ if ASCEND_IS_AIV {
115- if ASCEND_IS_AIV {115+ return;
116- return;116+ }
117- }117+ if (blockIdx_ >= block_.tilingData_->matmulTiling.usedCoreNum) {
118- if (blockIdx_ >= block_.tilingData_->matmulTiling.usedCoreNum) {118+ return;
119- return;119+ }
120- }120+ if (block_.params_.innerBatchNum == 0) {
121- if (block_.params_.innerBatchNum == 0) {121+ block_.offset_.batchCOffset = 0;
122- block_.offset_.batchCOffset = 0;122+ CalcMmWithBatch();
123- CalcMmWithBatch();123+ } else {
124- } else {124+ for (uint64_t b1Index = 0; b1Index < block_.params_.iterBatch1; ++b1Index) {
125- for (uint64_t b1Index = 0; b1Index < block_.params_.iterBatch1; ++b1Index) {125+ for (uint64_t b2Index = 0; b2Index < block_.params_.iterBatch2; ++b2Index) {
126- for (uint64_t b2Index = 0; b2Index < block_.params_.iterBatch2; ++b2Index) {126+ for (uint64_t b3Index = 0; b3Index < block_.params_.iterBatch3; ++b3Index) {
127- for (uint64_t b3Index = 0; b3Index < block_.params_.iterBatch3; ++b3Index) {127+ block_.GetBroadcastBatchOffset(b1Index, b2Index, b3Index);
128- block_.GetBroadcastBatchOffset(b1Index, b2Index, b3Index);128+ CalcMmWithBatch();
129- CalcMmWithBatch();129+ }
130- }130+ }
131- }131+ }
132- }132+ }
133- }133+}
134-}134+ 
135- 135+ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS
136-ITERBATCH_LOCAL_TEMPLATE_CLASS_PARAMS136+__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::CalcMmWithBatch()
137-__aicore__ inline void WeightQuantBatchMatmulV2IterBatchKernel<ITERBATCH_LOCAL_TEMPLATE_FUNC_PARAMS>::CalcMmWithBatch()137+{
138-{138+ for (uint64_t loopIndex = 0; loopIndex < block_.params_.loopTimes; loopIndex++) {
139- for (uint64_t loopIndex = 0; loopIndex < block_.params_.loopTimes; loopIndex++) {139+ if constexpr(antiQuantType == QuantType::PER_TENSOR) {
140- if constexpr(antiQuantType == QuantType::PER_TENSOR) {140+ mm_.SetQuantScalar(block_.offset_.scaleScalar);
141- mm_.SetQuantScalar(block_.offset_.scaleScalar);141+ } else {
142- } else {142+ mm_.SetQuantVector(scaleGlobal_[block_.offset_.offsetScale]);
143- mm_.SetQuantVector(scaleGlobal_[block_.offset_.offsetScale]);143+ }
144- }144+ block_.GetMultiBatchInfo(loopIndex);
145- block_.GetMultiBatchInfo(loopIndex);145+ block_.CalcGMOffset();
146- block_.CalcGMOffset();146+ if (block_.tilingData_->matmulTiling.isBias) {
147- if (block_.tilingData_->matmulTiling.isBias) {147+ mm_.SetBias(biasGlobal_[block_.offset_.offsetBias]);
148- mm_.SetBias(biasGlobal_[block_.offset_.offsetBias]);148+ }
149- }149+ mm_.SetTensorA(aGlobal_[block_.offset_.offsetA], aTrans);
150- mm_.SetTensorA(aGlobal_[block_.offset_.offsetA], aTrans);150+ mm_.SetTensorB(bGlobal_[block_.offset_.offsetB], bTrans);
151- mm_.SetTensorB(bGlobal_[block_.offset_.offsetB], bTrans);151+ mm_.SetBatchNum(block_.params_.batchANum, block_.params_.batchBNum);
152- mm_.SetBatchNum(block_.params_.batchANum, block_.params_.batchBNum);152+ mm_.IterateBatch(cGlobal_[block_.offset_.offsetC], false, 0, false, block_.params_.singleASize,
153- mm_.IterateBatch(cGlobal_[block_.offset_.offsetC], false, 0, false, block_.params_.singleASize,153+ block_.params_.singleBSize);
154- block_.params_.singleBSize);154+ }
155- }155+}
156-}156+} // namespace WeightQuantBatchMatmulV2::Arch35
157-} // namespace WeightQuantBatchMatmulV2::Arch35157+ 
158-#endif // WEIGHT_QUANT_BATCH_MATMUL_V2_ITERBATCH_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_iterbatch_block.h+253-254
@@ -1,254 +1,253 @@
1-/**1+/**
2- * Copyright (c) 2026 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3- * This program is free software, you can redistribute it and/or modify it under the terms and conditions of 3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4- * CANN Open Software License Agreement Version 2.0 (the "License").4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5- * Please refer to the License for details. You may not use this file except in compliance with the License.5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6- * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7- * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. 7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8- * See LICENSE in the root of the software repository for the full text of the License.8+ * See LICENSE in the root of the software repository for the full text of the License.
9- */9+ */
10- 10+ 
11-/*!11+/*!
12- * \file weight_quant_batch_matmul_v2_iterbatch_block.h12+ * \file weight_quant_batch_matmul_v2_iterbatch_block.h
13- * \brief13+ * \brief
14- */14+ */
15- 15+ 
16-#ifndef WEIGHT_QUANT_BMMV2_ASW_ITERBATCH_BLOCK_H16+#pragma once
17-#define WEIGHT_QUANT_BMMV2_ASW_ITERBATCH_BLOCK_H17+ 
18- 18+#if ASC_DEVKIT_MAJOR >= 9
19-#if ASC_DEVKIT_MAJOR >= 919+#include "kernel_basic_intf.h"
20-#include "kernel_basic_intf.h"20+#else
21-#else21+#include "kernel_operator.h"
22-#include "kernel_operator.h"22+#endif
23-#endif23+#include "lib/matmul_intf.h"
24-#include "lib/matmul_intf.h"24+#include "../tool.h"
25-#include "../tool.h"25+#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"
26-#include "weight_quant_batch_matmul_v2_arch35_tiling_data.h"26+ 
27- 27+namespace WeightQuantBatchMatmulV2::Arch35 {
28-namespace WeightQuantBatchMatmulV2::Arch35 {28+constexpr uint64_t L0C_SIZE_256K = 256 * 1024UL;
29-constexpr uint64_t L0C_SIZE_256K = 256 * 1024UL;29+constexpr uint8_t NO_NEED_BROADCAST = 0;
30-constexpr uint8_t NO_NEED_BROADCAST = 0;30+constexpr uint8_t A_NEED_BROADCAST = 1;
31-constexpr uint8_t A_NEED_BROADCAST = 1;31+constexpr uint8_t B_NEED_BROADCAST = 2;
32-constexpr uint8_t B_NEED_BROADCAST = 2;32+ 
33- 33+struct IterBatchTilingParam {
34-struct IterBatchTilingParam {34+ uint64_t singleASize;
35- uint64_t singleASize;35+ uint64_t singleBSize;
36- uint64_t singleBSize;36+ uint64_t singleCSize;
37- uint64_t singleCSize;37+ uint64_t mainLoopPerCoreBatchNum;
38- uint64_t mainLoopPerCoreBatchNum;38+ uint64_t lastLoopAllBatchNum;
39- uint64_t lastLoopAllBatchNum;39+ uint64_t lastLoopPreCoreBatchNum;
40- uint64_t lastLoopPreCoreBatchNum;40+ uint64_t lastLoopBlockNum;
41- uint64_t lastLoopBlockNum;41+ uint64_t loopTimes;
42- uint64_t loopTimes;42+ uint64_t batchIndex;
43- uint64_t batchIndex;43+ uint64_t batchAIndex;
44- uint64_t batchAIndex;44+ uint64_t batchBIndex;
45- uint64_t batchBIndex;45+ uint64_t batchANum;
46- uint64_t batchANum;46+ uint64_t batchBNum;
47- uint64_t batchBNum;47+ uint64_t useCoreNum;
48- uint64_t useCoreNum;48+ uint64_t nBatchOutNum;
49- uint64_t nBatchOutNum;49+ // outshape = (batch1, batch2, batch3, batch4, m, n)
50- // outshape = (batch1, batch2, batch3, batch4, m, n)50+ uint64_t iterBatch3;
51- uint64_t iterBatch3;51+ uint64_t iterBatch2;
52- uint64_t iterBatch2;52+ uint64_t iterBatch1;
53- uint64_t iterBatch1;53+ uint64_t calcBatchNum;
54- uint64_t calcBatchNum;54+ uint64_t innerBatchNum;
55- uint64_t innerBatchNum;55+ uint64_t broadcastFlag;
56- uint64_t broadcastFlag;56+};
57-};57+ 
58- 58+struct IterBatchOffsetParam {
59-struct IterBatchOffsetParam {59+ uint64_t offsetA;
60- uint64_t offsetA;60+ uint64_t offsetB;
61- uint64_t offsetB;61+ uint64_t offsetC;
62- uint64_t offsetC;62+ uint64_t offsetScale;
63- uint64_t offsetScale;63+ uint64_t offsetBias;
64- uint64_t offsetBias;64+ uint64_t batchCOffset;
65- uint64_t batchCOffset;65+ uint64_t scaleScalar;
66- uint64_t scaleScalar;66+};
67-};67+ 
68- 68+class WeightQuantBmmIterBatchBlock {
69-class WeightQuantBmmIterBatchBlock {69+public:
70-public:70+ __aicore__ inline WeightQuantBmmIterBatchBlock() {}
71- __aicore__ inline WeightQuantBmmIterBatchBlock() {}71+ __aicore__ inline void Init(
72- __aicore__ inline void Init(72+ const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData, uint32_t blockIdx);
73- const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData, uint32_t blockIdx);73+ __aicore__ inline void GetMultiBatchInfo(uint64_t loopIndex);
74- __aicore__ inline void GetMultiBatchInfo(uint64_t loopIndex);74+ __aicore__ inline void CalcGMOffset();
75- __aicore__ inline void CalcGMOffset();75+ __aicore__ inline void GetBroadcastBatchOffset(uint64_t b1Index, uint64_t b2Index, uint64_t b3Index);
76- __aicore__ inline void GetBroadcastBatchOffset(uint64_t b1Index, uint64_t b2Index, uint64_t b3Index);76+public:
77-public:77+ IterBatchTilingParam params_;
78- IterBatchTilingParam params_;78+ IterBatchOffsetParam offset_;
79- IterBatchOffsetParam offset_;79+ const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData_;
80- const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData_;80+protected:
81-protected:81+ __aicore__ inline void UpdateBatchInfo();
82- __aicore__ inline void UpdateBatchInfo();82+ __aicore__ inline void GetBatchInfo(uint64_t batchNum);
83- __aicore__ inline void GetBatchInfo(uint64_t batchNum);83+private:
84-private:84+ uint32_t blockIdx_;
85- uint32_t blockIdx_;85+};
86-};86+ 
87- 87+__aicore__ inline void WeightQuantBmmIterBatchBlock::Init(
88-__aicore__ inline void WeightQuantBmmIterBatchBlock::Init(88+ const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData, uint32_t blockIdx)
89- const wqbmmv2_tiling::WeightQuantBatchMatmulV2ASWTilingDataParams* tilingData, uint32_t blockIdx)89+{
90-{90+ tilingData_ = tilingData;
91- tilingData_ = tilingData;91+ blockIdx_ = blockIdx;
92- blockIdx_ = blockIdx;92+ params_.singleASize =
93- params_.singleASize =93+ static_cast<uint64_t>(tilingData_->matmulTiling.M) * static_cast<uint64_t>(tilingData_->matmulTiling.Ka);
94- static_cast<uint64_t>(tilingData_->matmulTiling.M) * static_cast<uint64_t>(tilingData_->matmulTiling.Ka);94+ params_.singleBSize =
95- params_.singleBSize =95+ static_cast<uint64_t>(tilingData_->matmulTiling.N) * static_cast<uint64_t>(tilingData_->matmulTiling.Kb);
96- static_cast<uint64_t>(tilingData_->matmulTiling.N) * static_cast<uint64_t>(tilingData_->matmulTiling.Kb);96+ params_.singleCSize =
97- params_.singleCSize =97+ static_cast<uint64_t>(tilingData_->matmulTiling.M) * static_cast<uint64_t>(tilingData_->matmulTiling.N);
98- static_cast<uint64_t>(tilingData_->matmulTiling.M) * static_cast<uint64_t>(tilingData_->matmulTiling.N);98+ 
99- 99+ params_.useCoreNum = tilingData_->matmulTiling.usedCoreNum;
100- params_.useCoreNum = tilingData_->matmulTiling.usedCoreNum;100+ params_.mainLoopPerCoreBatchNum = tilingData_->matmulTiling.BatchNum;
101- params_.mainLoopPerCoreBatchNum = tilingData_->matmulTiling.BatchNum;101+ params_.nBatchOutNum = Min(L0C_SIZE_256K / (tilingData_->matmulTiling.baseM * tilingData_->matmulTiling.baseN *
102- params_.nBatchOutNum = Min(L0C_SIZE_256K / (tilingData_->matmulTiling.baseM * tilingData_->matmulTiling.baseN *102+ tilingData_->matmulTiling.dbL0C * sizeof(int32_t)),
103- tilingData_->matmulTiling.dbL0C * sizeof(int32_t)),103+ static_cast<uint64_t>(tilingData_->matmulTiling.BatchNum));
104- static_cast<uint64_t>(tilingData_->matmulTiling.BatchNum));104+ UpdateBatchInfo();
105- UpdateBatchInfo();105+ params_.loopTimes = CeilDiv(params_.calcBatchNum, params_.mainLoopPerCoreBatchNum * params_.useCoreNum);
106- params_.loopTimes = CeilDiv(params_.calcBatchNum, params_.mainLoopPerCoreBatchNum * params_.useCoreNum);106+ params_.lastLoopAllBatchNum = params_.calcBatchNum % (params_.mainLoopPerCoreBatchNum * params_.useCoreNum);
107- params_.lastLoopAllBatchNum = params_.calcBatchNum % (params_.mainLoopPerCoreBatchNum * params_.useCoreNum);107+ params_.lastLoopAllBatchNum = params_.lastLoopAllBatchNum == 0
108- params_.lastLoopAllBatchNum = params_.lastLoopAllBatchNum == 0108+ ? params_.mainLoopPerCoreBatchNum * params_.useCoreNum
109- ? params_.mainLoopPerCoreBatchNum * params_.useCoreNum109+ : params_.lastLoopAllBatchNum;
110- : params_.lastLoopAllBatchNum;110+ 
111- 111+ params_.lastLoopPreCoreBatchNum = params_.lastLoopAllBatchNum / params_.useCoreNum;
112- params_.lastLoopPreCoreBatchNum = params_.lastLoopAllBatchNum / params_.useCoreNum;112+ params_.lastLoopBlockNum = params_.lastLoopAllBatchNum % params_.useCoreNum;
113- params_.lastLoopBlockNum = params_.lastLoopAllBatchNum % params_.useCoreNum;113+ params_.batchIndex = 0;
114- params_.batchIndex = 0;114+ params_.batchAIndex = 0;
115- params_.batchAIndex = 0;115+ params_.batchBIndex = 0;
116- params_.batchBIndex = 0;116+ params_.batchANum = 1;
117- params_.batchANum = 1;117+ params_.batchBNum = 1;
118- params_.batchBNum = 1;118+}
119-}119+ 
120- 120+__aicore__ inline void WeightQuantBmmIterBatchBlock::UpdateBatchInfo()
121-__aicore__ inline void WeightQuantBmmIterBatchBlock::UpdateBatchInfo()121+{
122-{122+ if (tilingData_->params.batchA == 1 || tilingData_->params.batchB == 1 ||
123- if (tilingData_->params.batchA == 1 || tilingData_->params.batchB == 1 ||123+ tilingData_->params.batchA == tilingData_->params.batchB) {
124- tilingData_->params.batchA == tilingData_->params.batchB) {124+ // no need broadcast or batchA = 1 or batchB = 1
125- // no need broadcast or batchA = 1 or batchB = 1125+ params_.innerBatchNum = 0;
126- params_.innerBatchNum = 0;126+ params_.calcBatchNum = tilingData_->params.batchC;
127- params_.calcBatchNum = tilingData_->params.batchC;127+ params_.broadcastFlag = NO_NEED_BROADCAST;
128- params_.broadcastFlag = NO_NEED_BROADCAST;128+ } else if (tilingData_->params.batchA4 != tilingData_->params.batchB4) {
129- } else if (tilingData_->params.batchA4 != tilingData_->params.batchB4) {129+ // batch4 need broadcast
130- // batch4 need broadcast130+ params_.iterBatch3 = tilingData_->params.batchC3;
131- params_.iterBatch3 = tilingData_->params.batchC3;131+ params_.iterBatch2 = tilingData_->params.batchC2;
132- params_.iterBatch2 = tilingData_->params.batchC2;132+ params_.iterBatch1 = tilingData_->params.batchC1;
133- params_.iterBatch1 = tilingData_->params.batchC1;133+ params_.calcBatchNum = tilingData_->params.batchC4;
134- params_.calcBatchNum = tilingData_->params.batchC4;134+ params_.innerBatchNum = 1;
135- params_.innerBatchNum = 1;135+ params_.broadcastFlag = (tilingData_->params.batchA4 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;
136- params_.broadcastFlag = (tilingData_->params.batchA4 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;136+ } else if (tilingData_->params.batchA3 != tilingData_->params.batchB3) {
137- } else if (tilingData_->params.batchA3 != tilingData_->params.batchB3) {137+ // batch3 need broadcast
138- // batch3 need broadcast138+ params_.iterBatch3 = 1;
139- params_.iterBatch3 = 1;139+ params_.iterBatch2 = tilingData_->params.batchC2;
140- params_.iterBatch2 = tilingData_->params.batchC2;140+ params_.iterBatch1 = tilingData_->params.batchC1;
141- params_.iterBatch1 = tilingData_->params.batchC1;141+ params_.innerBatchNum = tilingData_->params.batchC4;
142- params_.innerBatchNum = tilingData_->params.batchC4;142+ params_.calcBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3;
143- params_.calcBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3;143+ params_.broadcastFlag = (tilingData_->params.batchA3 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;
144- params_.broadcastFlag = (tilingData_->params.batchA3 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;144+ } else if (tilingData_->params.batchA2 != tilingData_->params.batchB2) {
145- } else if (tilingData_->params.batchA2 != tilingData_->params.batchB2) {145+ // batch2 need broadcast
146- // batch2 need broadcast146+ params_.iterBatch3 = 1;
147- params_.iterBatch3 = 1;147+ params_.iterBatch2 = 1;
148- params_.iterBatch2 = 1;148+ params_.iterBatch1 = tilingData_->params.batchC1;
149- params_.iterBatch1 = tilingData_->params.batchC1;149+ params_.innerBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3;
150- params_.innerBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3;150+ params_.calcBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3 * tilingData_->params.batchC2;
151- params_.calcBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3 * tilingData_->params.batchC2;151+ params_.broadcastFlag = (tilingData_->params.batchA2 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;
152- params_.broadcastFlag = (tilingData_->params.batchA2 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;152+ } else {
153- } else {153+ // batch1 need broadcast
154- // batch1 need broadcast154+ params_.iterBatch3 = 1;
155- params_.iterBatch3 = 1;155+ params_.iterBatch2 = 1;
156- params_.iterBatch2 = 1;156+ params_.iterBatch1 = 1;
157- params_.iterBatch1 = 1;157+ params_.innerBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3 * tilingData_->params.batchC2;
158- params_.innerBatchNum = tilingData_->params.batchC4 * tilingData_->params.batchC3 * tilingData_->params.batchC2;158+ params_.calcBatchNum = tilingData_->params.batchC;
159- params_.calcBatchNum = tilingData_->params.batchC;159+ params_.broadcastFlag = (tilingData_->params.batchA1 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;
160- params_.broadcastFlag = (tilingData_->params.batchA1 == 1) ? A_NEED_BROADCAST : B_NEED_BROADCAST;160+ }
161- }161+}
162-}162+ 
163- 163+__aicore__ inline void WeightQuantBmmIterBatchBlock::GetBatchInfo(uint64_t batchNum)
164-__aicore__ inline void WeightQuantBmmIterBatchBlock::GetBatchInfo(uint64_t batchNum)164+{
165-{165+ if (params_.innerBatchNum == 0) {
166- if (params_.innerBatchNum == 0) {166+ params_.batchANum = Min(batchNum, static_cast<uint64_t>(tilingData_->params.batchA));
167- params_.batchANum = Min(batchNum, static_cast<uint64_t>(tilingData_->params.batchA));167+ params_.batchBNum = Min(batchNum, static_cast<uint64_t>(tilingData_->params.batchB));
168- params_.batchBNum = Min(batchNum, static_cast<uint64_t>(tilingData_->params.batchB));168+ params_.batchAIndex = Min(params_.batchIndex, static_cast<uint64_t>(tilingData_->params.batchA - 1));
169- params_.batchAIndex = Min(params_.batchIndex, static_cast<uint64_t>(tilingData_->params.batchA - 1));169+ params_.batchBIndex = Min(params_.batchIndex, static_cast<uint64_t>(tilingData_->params.batchB - 1));
170- params_.batchBIndex = Min(params_.batchIndex, static_cast<uint64_t>(tilingData_->params.batchB - 1));170+ } else if (params_.batchIndex >= (params_.innerBatchNum - 1) && params_.broadcastFlag == A_NEED_BROADCAST) {
171- } else if (params_.batchIndex >= (params_.innerBatchNum - 1) && params_.broadcastFlag == A_NEED_BROADCAST) {171+ // 当本次计算需要使用的batch数量超过需要broadcast的batch轴的内轴数量,且A矩阵的batch需要broadcast
172- // 当本次计算需要使用的batch数量超过需要broadcast的batch轴的内轴数量,且A矩阵的batch需要broadcast172+ params_.batchANum = Min(params_.innerBatchNum, batchNum);
173- params_.batchANum = Min(params_.innerBatchNum, batchNum);173+ params_.batchBNum = batchNum;
174- params_.batchBNum = batchNum;174+ params_.batchAIndex = params_.batchIndex % params_.innerBatchNum;
175- params_.batchAIndex = params_.batchIndex % params_.innerBatchNum;175+ params_.batchBIndex = params_.batchIndex;
176- params_.batchBIndex = params_.batchIndex;176+ } else if (params_.batchIndex >= (params_.innerBatchNum - 1) && params_.broadcastFlag == B_NEED_BROADCAST) {
177- } else if (params_.batchIndex >= (params_.innerBatchNum - 1) && params_.broadcastFlag == B_NEED_BROADCAST) {177+ // 当本次计算需要使用的batch数量超过需要broadcast的batch轴的内轴数量,且B矩阵的batch需要broadcast
178- // 当本次计算需要使用的batch数量超过需要broadcast的batch轴的内轴数量,且B矩阵的batch需要broadcast178+ params_.batchANum = batchNum;
179- params_.batchANum = batchNum;179+ params_.batchBNum = Min(params_.innerBatchNum, batchNum);
180- params_.batchBNum = Min(params_.innerBatchNum, batchNum);180+ params_.batchAIndex = params_.batchIndex;
181- params_.batchAIndex = params_.batchIndex;181+ params_.batchBIndex = params_.batchIndex % params_.innerBatchNum;
182- params_.batchBIndex = params_.batchIndex % params_.innerBatchNum;182+ } else {
183- } else {183+ params_.batchANum = batchNum;
184- params_.batchANum = batchNum;184+ params_.batchBNum = batchNum;
185- params_.batchBNum = batchNum;185+ params_.batchAIndex = params_.batchIndex;
186- params_.batchAIndex = params_.batchIndex;186+ params_.batchBIndex = params_.batchIndex;
187- params_.batchBIndex = params_.batchIndex;187+ }
188- }188+}
189-}189+ 
190- 190+__aicore__ inline void WeightQuantBmmIterBatchBlock::GetMultiBatchInfo(uint64_t loopIndex)
191-__aicore__ inline void WeightQuantBmmIterBatchBlock::GetMultiBatchInfo(uint64_t loopIndex)191+{
192-{192+ // main loop
193- // main loop193+ if (loopIndex + 1 < params_.loopTimes) {
194- if (loopIndex + 1 < params_.loopTimes) {194+ params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +
195- params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +195+ blockIdx_ * params_.mainLoopPerCoreBatchNum;
196- blockIdx_ * params_.mainLoopPerCoreBatchNum;196+ GetBatchInfo(params_.mainLoopPerCoreBatchNum);
197- GetBatchInfo(params_.mainLoopPerCoreBatchNum);197+ } else if (blockIdx_ < params_.lastLoopBlockNum) { // last loop
198- } else if (blockIdx_ < params_.lastLoopBlockNum) { // last loop198+ params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +
199- params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +199+ blockIdx_ * (params_.lastLoopPreCoreBatchNum + 1);
200- blockIdx_ * (params_.lastLoopPreCoreBatchNum + 1);200+ GetBatchInfo(params_.lastLoopPreCoreBatchNum + 1);
201- GetBatchInfo(params_.lastLoopPreCoreBatchNum + 1);201+ } else {
202- } else {202+ params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +
203- params_.batchIndex = loopIndex * params_.mainLoopPerCoreBatchNum * params_.useCoreNum +203+ params_.lastLoopBlockNum * (params_.lastLoopPreCoreBatchNum + 1) +
204- params_.lastLoopBlockNum * (params_.lastLoopPreCoreBatchNum + 1) +204+ (blockIdx_ - params_.lastLoopBlockNum) * params_.lastLoopPreCoreBatchNum;
205- (blockIdx_ - params_.lastLoopBlockNum) * params_.lastLoopPreCoreBatchNum;205+ 
206- 206+ GetBatchInfo(params_.lastLoopPreCoreBatchNum);
207- GetBatchInfo(params_.lastLoopPreCoreBatchNum);207+ }
208- }208+}
209-}209+ 
210- 210+__aicore__ inline void WeightQuantBmmIterBatchBlock::GetBroadcastBatchOffset(uint64_t b1Index, uint64_t b2Index,
211-__aicore__ inline void WeightQuantBmmIterBatchBlock::GetBroadcastBatchOffset(uint64_t b1Index, uint64_t b2Index,211+ uint64_t b3Index)
212- uint64_t b3Index)212+{
213-{213+ if (params_.iterBatch1 != tilingData_->params.batchC1) {
214- if (params_.iterBatch1 != tilingData_->params.batchC1) {214+ // batch1 need broadcast
215- // batch1 need broadcast215+ offset_.batchCOffset = 0;
216- offset_.batchCOffset = 0;216+ } else if (params_.iterBatch2 != tilingData_->params.batchC2) {
217- } else if (params_.iterBatch2 != tilingData_->params.batchC2) {217+ // batch2 need broadcast
218- // batch2 need broadcast218+ offset_.batchCOffset = b1Index;
219- offset_.batchCOffset = b1Index;219+ } else if (params_.iterBatch3 != tilingData_->params.batchC3) {
220- } else if (params_.iterBatch3 != tilingData_->params.batchC3) {220+ // batch3 need broadcast
221- // batch3 need broadcast221+ offset_.batchCOffset = b2Index + b1Index * params_.iterBatch2;
222- offset_.batchCOffset = b2Index + b1Index * params_.iterBatch2;222+ } else {
223- } else {223+ // batch4 need broadcast
224- // batch4 need broadcast224+ offset_.batchCOffset = b3Index + b2Index * params_.iterBatch3 + b1Index * params_.iterBatch2;
225- offset_.batchCOffset = b3Index + b2Index * params_.iterBatch3 + b1Index * params_.iterBatch2;225+ }
226- }226+}
227-}227+ 
228- 228+__aicore__ inline void WeightQuantBmmIterBatchBlock::CalcGMOffset()
229-__aicore__ inline void WeightQuantBmmIterBatchBlock::CalcGMOffset()229+{
230-{230+ if (params_.broadcastFlag == A_NEED_BROADCAST) {
231- if (params_.broadcastFlag == A_NEED_BROADCAST) {231+ offset_.offsetA = params_.batchAIndex * params_.singleASize +
232- offset_.offsetA = params_.batchAIndex * params_.singleASize +232+ offset_.batchCOffset * params_.innerBatchNum * params_.singleASize;
233- offset_.batchCOffset * params_.innerBatchNum * params_.singleASize;233+ offset_.offsetB = params_.batchBIndex * params_.singleBSize +
234- offset_.offsetB = params_.batchBIndex * params_.singleBSize +234+ offset_.batchCOffset * params_.calcBatchNum * params_.singleBSize;
235- offset_.batchCOffset * params_.calcBatchNum * params_.singleBSize;235+ offset_.offsetC = params_.batchIndex * params_.singleCSize +
236- offset_.offsetC = params_.batchIndex * params_.singleCSize +236+ offset_.batchCOffset * params_.calcBatchNum * params_.singleCSize;
237- offset_.batchCOffset * params_.calcBatchNum * params_.singleCSize;237+ } else if (params_.broadcastFlag == B_NEED_BROADCAST) {
238- } else if (params_.broadcastFlag == B_NEED_BROADCAST) {238+ offset_.offsetA = params_.batchAIndex * params_.singleASize +
239- offset_.offsetA = params_.batchAIndex * params_.singleASize +239+ offset_.batchCOffset * params_.calcBatchNum * params_.singleASize;
240- offset_.batchCOffset * params_.calcBatchNum * params_.singleASize;240+ offset_.offsetB = params_.batchBIndex * params_.singleBSize +
241- offset_.offsetB = params_.batchBIndex * params_.singleBSize +241+ offset_.batchCOffset * params_.innerBatchNum * params_.singleBSize;
242- offset_.batchCOffset * params_.innerBatchNum * params_.singleBSize;242+ offset_.offsetC = params_.batchIndex * params_.singleCSize +
243- offset_.offsetC = params_.batchIndex * params_.singleCSize +243+ offset_.batchCOffset * params_.calcBatchNum * params_.singleCSize;
244- offset_.batchCOffset * params_.calcBatchNum * params_.singleCSize;244+ } else {
245- } else {245+ offset_.offsetA = params_.batchAIndex * params_.singleASize;
246- offset_.offsetA = params_.batchAIndex * params_.singleASize;246+ offset_.offsetB = params_.batchBIndex * params_.singleBSize;
247- offset_.offsetB = params_.batchBIndex * params_.singleBSize;247+ offset_.offsetC = params_.batchIndex * params_.singleCSize;
248- offset_.offsetC = params_.batchIndex * params_.singleCSize;248+ }
249- }249+ offset_.offsetScale = 0;
250- offset_.offsetScale = 0;250+ offset_.offsetBias = 0;
251- offset_.offsetBias = 0;251+}
252-}252+} // namespace WeightQuantBatchMatmulV2::Arch35
253-} // namespace WeightQuantBatchMatmulV2::Arch35253+ 
254-#endif // WEIGHT_QUANT_BMMV2_ITERBATCH_BLOCK_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_reg_base.h+2-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_H16+#pragma once
17-#define WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_H
18 17 
19#include "weight_quant_batch_matmul_v2_reg_base_common.h"18#include "weight_quant_batch_matmul_v2_reg_base_common.h"
20 19 
@@ -63,4 +62,4 @@ __aicore__ inline void WeightQuantBatchMatmulV2RegBaseKernel<
63 this->EndSync(eventIdsMte1ToMte2, biasEventIdsMte1ToMte2);62 this->EndSync(eventIdsMte1ToMte2, biasEventIdsMte1ToMte2);
64}63}
65} // namespace WeightQuantBatchMatmulV2::Arch3564} // namespace WeightQuantBatchMatmulV2::Arch35
66-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_H65+ 
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_reg_base_common.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_COMMON_H16+#pragma once
17-#define WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_COMMON_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -2260,4 +2259,3 @@ __aicore__ inline void WeightQuantBatchMatmulV2RegBaseCommonKernel<
2260}2259}
2261} // namespace WeightQuantBatchMatmulV2::Arch352260} // namespace WeightQuantBatchMatmulV2::Arch35
2262 2261 
2263-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_REG_BASE_COMMON_H
Mmatmul/weight_quant_batch_matmul_v2/op_kernel/arch35/weight_quant_batch_matmul_v2_vf.h+1-3
@@ -13,8 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#ifndef WEIGHT_QUANT_BATCHMATMUL_V2_VF_H16+#pragma once
17-#define WEIGHT_QUANT_BATCHMATMUL_V2_VF_H
18 17 
19#if ASC_DEVKIT_MAJOR >= 918#if ASC_DEVKIT_MAJOR >= 9
20#include "kernel_basic_intf.h"19#include "kernel_basic_intf.h"
@@ -1034,4 +1033,3 @@ __aicore__ inline void AntiquantW4Pergroup32OddNK(ParamsGroupSize32OddNK<XType>&
1034 1033 
1035} // namespace WeightQuantBatchMatmulV2::Arch351034} // namespace WeightQuantBatchMatmulV2::Arch35
1036 1035 
1037-#endif // WEIGHT_QUANT_BATCHMATMUL_V2_VF_H