8 Star 123 Fork 5

Ascend/cann-var-sequence-gemm

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
include
batch_cal_valid_len.h
batch_epilogue.h
batch_matmul.h
batch_padding.h
custom_type.h
data_transfer.h
kernel_const.h
kernel_utils.h
swizzle.h
test
.gitignore
LICENSE
OAT.xml
OWNERS
README.en.md
README.md
克隆/下载
kernel_const.h 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
/*
Copyright (c) 2025 Huawei Technologies Co., Ltd.
This file is a part of the CANN Open Software.
Licensed under CANN Open Software License Agreement Version 1.0 (the "License").
Please refer to the License for details. You may not use this file except in compliance with the License.
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
See LICENSE in the root of the software repository for the full text of the License.
*/
#pragma once
#define L1M0 128
#define L1N0 256
#define L1K0 256
#define WORKSPACENUM 2
#define SWIZZLEOFFSET 8
#define SWIZZLEDIRECTION 1
static constexpr uint64_t L1_BYTES = 512 * 1024;
static constexpr uint64_t L0AB_BYTES = 64 * 1024;
static constexpr uint64_t L0C_BYTES = 128 * 1024;
static constexpr uint64_t UB_BYTES = 192 * 1024;
constexpr uint64_t DATABLOCK_BYTES = AscendC::GetDataBlockSizeInBytes();
constexpr uint64_t L1L0_BASEBLOCK_BYTES = 512;
constexpr uint32_t L1L0_BASEBLOCK_M0 = 16;
constexpr uint32_t L1L0_BASEBLOCK_N0 = 16;
constexpr uint32_t L1L0_BASEBLOCK_K0 = 32 / sizeof(half);
constexpr uint32_t L1L0_BASEBLOCK_CUBE = 16; // Mmad正方形基块
constexpr uint32_t L1L0_BASEBLOCK_SIZE = L1L0_BASEBLOCK_BYTES / sizeof(half);
constexpr uint32_t STRIDE_LIMIT = 65536;
constexpr uint32_t MAX_AICORE_NUM = 20;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ascend/cann-var-sequence-gemm.git
git@gitee.com:ascend/cann-var-sequence-gemm.git
ascend
cann-var-sequence-gemm
cann-var-sequence-gemm
master

搜索帮助