* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
* MindIE is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* 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 FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
* \file iterator.h
* \brief
*/
#ifndef INCLUDE_ITERTOR_H
#define INCLUDE_ITERTOR_H
#include "common_func.h"
#include "hardware.h"
#if ASC_DEVKIT_MAJOR >= 9
#include "kernel_vec_intf.h"
#include "kernel_cube_intf.h"
#else
#include "kernel_operator.h"
#endif
#include "layout.h"
#include "mem.h"
template <ArchType ArchTag, typename DataType, DataFormatT FormatInGM, DataFormatT FormatInL1> struct gm_to_l1 {
__aicore__ gm_to_l1(AscendC::LocalTensor<DataType> l1Tensor, AscendC::GlobalTensor<DataType> gmTensor,
uint32_t nTileActual, uint32_t nTileCeil, uint32_t nVal, uint32_t dTileActual, uint32_t dTileCeil,
uint32_t dVal) {};
};
template <ArchType ArchTag, typename DataType, bool IsTransPose, DataFormatT DFmtIn, DataFormatT DFmtOut>
struct l1_to_l0_a {
__aicore__ l1_to_l0_a(AscendC::LocalTensor<DataType> l0Tensor, AscendC::LocalTensor<DataType> l1Tensor,
uint32_t mTileCeil, uint32_t kPartCeil, uint32_t mSrcStride, uint32_t kSrcStride, uint32_t mDstStride,
uint32_t kDstStride) {};
};
template <ArchType ArchTag, typename DataType, bool IsTransPose, DataFormatT DFmtIn, DataFormatT DFmtOut>
struct l1_to_l0_b {
__aicore__ l1_to_l0_b(AscendC::LocalTensor<DataType> l0Tensor, AscendC::LocalTensor<DataType> l1Tensor,
uint32_t nTileCeil, uint32_t kPartCeil, uint32_t nSrcStride, uint32_t kSrcStride, uint32_t nDstStride,
uint32_t kDstStride) {};
};
template <ArchType ArchTag, typename DataType, bool IsTransPose, bool IsVectore> struct l1_to_l0_a_v1 {
__aicore__ l1_to_l0_a_v1(AscendC::LocalTensor<DataType> l0_tensor, AscendC::LocalTensor<DataType> l1_tensor,
uint32_t m_tile_ceil, uint32_t k_tile_ceil, uint32_t k_part, uint32_t k_part_ceil, uint32_t k_part_idx) {};
};
template <ArchType ArchTag, typename DataType, bool IsTransPose, bool IsVectore> struct l1_to_l0_b_v1 {
__aicore__ l1_to_l0_b_v1(AscendC::LocalTensor<DataType> l0_tensor, AscendC::LocalTensor<DataType> l1_tensor,
int32_t n_tile_ceil, int32_t k_tile_ceil, int32_t k_part_ceil, int32_t k_part_idx) {};
};
template <ArchType ArchTag, DataFormatT OutFormatType, typename OutDataType, typename L0CDataType> struct l0c_to_gm {
__aicore__ l0c_to_gm(AscendC::GlobalTensor<OutDataType> gmTensor, AscendC::LocalTensor<L0CDataType> l0cTensor,
uint32_t mTileActual, uint32_t nTileActual, uint32_t mTileCeil, uint32_t nActual) {};
};
template <ArchType ArchTag, DataFormatT LayoutOut, typename ElementOut, typename ElementIn> struct l0c_to_l1 {
__aicore__ l0c_to_l1(AscendC::LocalTensor<ElementOut> l1Tensor, AscendC::LocalTensor<ElementIn> l0cTensor,
AscendC::LocalTensor<uint64_t> deqTensor, uint32_t mTileActual, uint32_t nTileActual, uint32_t mTileCeil,
uint32_t nActual) {};
};
#endif