diff --git a/impl/matmul/param/matmul_shape_tiling.h b/impl/matmul/param/matmul_shape_tiling.h index 3956bb478b7c874b5e306fd41104c62d62604b20..71fabae1168a7aedc78841cb78ac38cb5cc40b87 100644 --- a/impl/matmul/param/matmul_shape_tiling.h +++ b/impl/matmul/param/matmul_shape_tiling.h @@ -17,26 +17,13 @@ #define IMPL_MATMUL_PARAM_MATMUL_SHAPE_TILING_H #include "../utils/matmul_module.h" +#include "../utils/matmul_utils.h" #include "../tiling/matmul_constant_tiling_struct.h" namespace AscendC { namespace Impl { namespace Detail { -#if __CCE_AICORE__ < 220 - constexpr static int L1Size_ = 1024 * 1024; - constexpr static int L0CSize_ = 256 * 1024; - constexpr static int UBSize_ = 256 * 1024; -#elif __CCE_AICORE__ == 300 - constexpr static int L1Size_ = 1024 * 1024; - constexpr static int L0CSize_ = 128 * 1024; -#else - constexpr static int L1Size_ = 512 * 1024; - constexpr static int L0CSize_ = 128 * 1024; -#endif - constexpr static int L0ASize_ = 64 * 1024; - constexpr static int L0BSize_ = 64 * 1024; - template class MatmulShapeTiling { public: diff --git a/impl/matmul/utils/matmul_config_utils.h b/impl/matmul/utils/matmul_config_utils.h index ab1e08a0197ce747323bd2cae41ab9c451036365..4b155868680bcbda24cfa02da5d63af50c42fb53 100644 --- a/impl/matmul/utils/matmul_config_utils.h +++ b/impl/matmul/utils/matmul_config_utils.h @@ -44,6 +44,20 @@ constexpr uint8_t ATOMIC_MIN = 3; constexpr int32_t DOUBLE_SIZE = 2; constexpr uint32_t SHARE_LEN_SIZE = 3; +#if __CCE_AICORE__ < 220 +constexpr static int L1Size_ = 1024 * 1024; +constexpr static int L0CSize_ = 256 * 1024; +constexpr static int UBSize_ = 256 * 1024; +#elif __CCE_AICORE__ == 300 +constexpr static int L1Size_ = 1024 * 1024; +constexpr static int L0CSize_ = 128 * 1024; +#else +constexpr static int L1Size_ = 512 * 1024; +constexpr static int L0CSize_ = 128 * 1024; +#endif +constexpr static int L0ASize_ = 64 * 1024; +constexpr static int L0BSize_ = 64 * 1024; + /* the KFC_MESSAGE_LENGTH is 64 the MAX_MSG_COUNT is 64