Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 :
11 : /*!
12 : * \file kernel_vec_reduce_other_check.h
13 : * \brief
14 : */
15 :
16 : #ifndef ASCENDC_VEC_REDUCE_OTHER_CHECK_H
17 : #define ASCENDC_VEC_REDUCE_OTHER_CHECK_H
18 : #include "kernel_base_check.h"
19 :
20 : namespace AscendC {
21 : namespace check {
22 :
23 : class TikcppVecReduceOtherCheck : public TikcppBaseCheck {
24 : public:
25 72 : TikcppVecReduceOtherCheck(const std::string& name, VecReduceApiParams& param) : TikcppBaseCheck(name), param_(param)
26 72 : {}
27 72 : ~TikcppVecReduceOtherCheck() override = default;
28 : bool CheckWholeReduceDtypeBytes(const std::string& errMsg);
29 : bool CheckWholeReduceDstSize();
30 : bool CheckWholeReduceDstSize(std::vector<uint64_t>& maskArray, const uint64_t unit, const std::string& tensorName);
31 : bool CheckPairReduceDstSize(std::vector<uint64_t>& maskArray, const std::string& tensorName);
32 : bool CheckRepeatReduceDstSize();
33 : bool CheckAllLowLevel(std::vector<uint64_t> maskArray);
34 : bool CheckAddrAlign();
35 : bool CheckTensorByteOverflowLow(
36 : std::vector<uint64_t>& maskArray, const TensorOverflowParams& params, const std::string& tensorName);
37 :
38 : public:
39 : VecReduceApiParams& param_;
40 : };
41 : } // namespace check
42 : } // namespace AscendC
43 : #endif
|