diff --git a/impl/matmul/matmul_impl.h b/impl/matmul/matmul_impl.h index 4a347846c9a024dbeada0b536afe6b38086049b9..ded29d8865b8c101214852d97ea58d2b588da198 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 3cdc632750703f10e3993eba7cf415d90ef1caa4..6999a2168d13ca9849e7b004f1f800b690b84da5 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_constant_tiling_utils.h b/impl/matmul/tiling/matmul_constant_tiling_utils.h index a1f4e64fd0fd274ac410650628b79f3a362ce5eb..d1a46b1f49e7ddae0e58c4c214ff04824cf46426 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 { diff --git a/impl/matmul/tiling/matmul_tiling_algorithm.h b/impl/matmul/tiling/matmul_tiling_algorithm.h index 562b00c7300fe36f7b57f484662b6abfe8b695f6..fd163d44ea3d38e9a08262c55ddffd7b3dd9be9d 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 c4557dccee5ff4416e9a6f01f8b957a5d60ac67c..146a939688c73c1991506464f7080db864c792b0 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 2f2bd89c99b255f3c1b33957c85ff205420464b3..48a4187dae19c3ae4481ac34a949dcaa82ce4c2c 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