From 8c1600c85af3be139402ed14a5491818638891d5 Mon Sep 17 00:00:00 2001 From: "@mr-zql" Date: Wed, 22 Oct 2025 16:32:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8D=95=E8=AF=8D=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- impl/matmul/tiling/matmul_constant_tiling_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/matmul/tiling/matmul_constant_tiling_utils.h b/impl/matmul/tiling/matmul_constant_tiling_utils.h index a1f4e64f..d1a46b1f 100644 --- a/impl/matmul/tiling/matmul_constant_tiling_utils.h +++ b/impl/matmul/tiling/matmul_constant_tiling_utils.h @@ -39,7 +39,7 @@ constexpr int32_t L1_SIZE = 512 * 1024; constexpr int32_t SCALE_K_SIZE = 32; constexpr int32_t MIN_MX_PARAM = 257;// scaleFactorA = 1, scaleFactorB = 1 constexpr int32_t MX_L1_BUFFER_NUM = 4;// A/B/scaleA/scaleB buffer -constexpr uint32_t SCALE_FACTOR_MAX_VALUE = 127;// scaleFactorA/scaleFactorB is 7 bit, max vaule is 127 +constexpr uint32_t SCALE_FACTOR_MAX_VALUE = 127;// scaleFactorA/scaleFactorB is 7 bit, max value is 127 } enum class L1TilingType : uint8_t { -- Gitee From 2d658212b8895bf14860fa57fb94c7d65db493e6 Mon Sep 17 00:00:00 2001 From: "@mr-zql" Date: Wed, 22 Oct 2025 16:43:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8D=95=E8=AF=8D=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- impl/matmul/matmul_impl.h | 2 +- .../resource/local_workspace/matmul_local_workspace.h | 4 ++-- impl/matmul/tiling/matmul_tiling_algorithm.h | 8 ++++---- impl/matmul/tiling/matmul_tiling_base.cpp | 4 ++-- impl/matmul/utils/matmul_param.h | 2 +- lib/matmul/matmul_client.h | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/impl/matmul/matmul_impl.h b/impl/matmul/matmul_impl.h index 4a347846..ded29d88 100644 --- a/impl/matmul/matmul_impl.h +++ b/impl/matmul/matmul_impl.h @@ -19,7 +19,7 @@ namespace AscendC { -// Match Policy with CallBack paramter +// Match Policy with CallBack parameter template class MatmulImpl>> diff --git a/impl/matmul/resource/local_workspace/matmul_local_workspace.h b/impl/matmul/resource/local_workspace/matmul_local_workspace.h index 3cdc6327..6999a216 100644 --- a/impl/matmul/resource/local_workspace/matmul_local_workspace.h +++ b/impl/matmul/resource/local_workspace/matmul_local_workspace.h @@ -48,7 +48,7 @@ public: SetWorkspace(localBuffer); #else ASCENDC_ASSERT((false), - { KERNEL_LOG(KERNEL_ERROR, "current vecrsion do not support SetLocalWorkspace interface!"); }); + { KERNEL_LOG(KERNEL_ERROR, "current version do not support SetLocalWorkspace interface!"); }); #endif } @@ -178,7 +178,7 @@ public: SetWorkspace(localBuffer); #else ASCENDC_ASSERT((false), - { KERNEL_LOG(KERNEL_ERROR, "current vecrsion do not support SetLocalWorkspace interface!"); }); + { KERNEL_LOG(KERNEL_ERROR, "current version do not support SetLocalWorkspace interface!"); }); #endif } diff --git a/impl/matmul/tiling/matmul_tiling_algorithm.h b/impl/matmul/tiling/matmul_tiling_algorithm.h index 562b00c7..fd163d44 100644 --- a/impl/matmul/tiling/matmul_tiling_algorithm.h +++ b/impl/matmul/tiling/matmul_tiling_algorithm.h @@ -32,8 +32,8 @@ constexpr int32_t DB_OFF = 1; constexpr int32_t L1_FACTORS_LEN = 6; constexpr int32_t L0PARAS_COMBO_LEN = 2; constexpr int32_t SCALE_K_SIZE = 32; -constexpr float MATMUL_EPSILION = 1.0E-4F; -constexpr float MEMORY_EPSILION = 0.05F; +constexpr float MATMUL_EPSILON = 1.0E-4F; +constexpr float MEMORY_EPSILON = 0.05F; constexpr int32_t L0_SIZE = 64 * 1024; struct MatmulTemplateCfg { @@ -326,7 +326,7 @@ struct ComputeIntensitySmallShape { float memoryTraffic; ComputeBaseBlock baseBlock; bool operator<(const ComputeIntensitySmallShape& rhs) const { - if (std::fabs(rhs.memoryTraffic - memoryTraffic) > MEMORY_EPSILION * memoryTraffic) { + if (std::fabs(rhs.memoryTraffic - memoryTraffic) > MEMORY_EPSILON * memoryTraffic) { return memoryTraffic < rhs.memoryTraffic; } if (std::fabs(computeCycle - rhs.computeCycle) < 0.01f * rhs.computeCycle) { @@ -342,7 +342,7 @@ struct ComputeIntensity { float avgIntensity; float bandRatio; bool operator<(const ComputeIntensity& rhs) const { - if (std::fabs(avgIntensity - rhs.avgIntensity) > MATMUL_EPSILION) { + if (std::fabs(avgIntensity - rhs.avgIntensity) > MATMUL_EPSILON) { return avgIntensity > rhs.avgIntensity; } if (std::fabs(computeCycle - rhs.computeCycle) < 0.01f * rhs.computeCycle) { diff --git a/impl/matmul/tiling/matmul_tiling_base.cpp b/impl/matmul/tiling/matmul_tiling_base.cpp index c4557dcc..146a9396 100644 --- a/impl/matmul/tiling/matmul_tiling_base.cpp +++ b/impl/matmul/tiling/matmul_tiling_base.cpp @@ -139,7 +139,7 @@ MatmulApiTilingBase::MatmulApiTilingBase(const platform_ascendc::PlatformAscendC this->traverse_ = MatrixTraverse::NOSET; - // based on platfromInfo initial size + // based on platformInfo initial size uint64_t l1Size = 0; uint64_t l0CSize = 0; uint64_t ubSize = 0; @@ -218,7 +218,7 @@ MatmulApiTilingBase::MatmulApiTilingBase(const PlatformInfo& platform) this->traverse_ = MatrixTraverse::NOSET; - // based on platfromInfo initial size + // based on platformInfo initial size socVersion = platform.socVersion; this->oriBufferPool_.l1Size = platform.l1Size; this->oriBufferPool_.l0CSize = platform.l0CSize; diff --git a/impl/matmul/utils/matmul_param.h b/impl/matmul/utils/matmul_param.h index 2f2bd89c..48a4187d 100644 --- a/impl/matmul/utils/matmul_param.h +++ b/impl/matmul/utils/matmul_param.h @@ -77,7 +77,7 @@ struct MatmulParamsNorm : public MatmulParamsBasegm in MTE3 before using iterate, can find matched wait flag in matmul server + // Op sometimes execute ub ->gm in MTE3 before using iterate, can find matched wait flag in matmul server CrossCoreSetFlag(static_cast(CUBE_WAIT_INTRA_Enum::GM_L1_UB_GM)); } } @@ -2231,7 +2231,7 @@ private: { if constexpr (A_TYPE::format == CubeFormat::NZ && (A_TYPE::ibShare && B_TYPE::ibShare)) { uint16_t blockCount = static_cast(Ceil(col, c0Size_)); - // Concat V0 and V1 A matrix, then row need devide MIX_NUM; + // Concat V0 and V1 A matrix, then rows need divide MIX_NUM; uint16_t blockLen = static_cast(Ceil(row / MIX_NUM * sizeof(T) * c0Size_, ONE_BLK_SIZE)); uint16_t dstStride = blockLen; DataCopy(dst, src, {blockCount, blockLen, 0, dstStride}); @@ -2520,7 +2520,7 @@ private: } }; -// Match Policy with CallBack paramter +// Match Policy with CallBack parameter template class MatmulClient -- Gitee