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_binary_check.h
13 : * \brief
14 : */
15 :
16 : #ifndef ASCENDC_VEC_BINARY_CHECK_H
17 : #define ASCENDC_VEC_BINARY_CHECK_H
18 : #include "kernel_base_check.h"
19 :
20 : namespace AscendC {
21 : namespace check {
22 : class TikcppVecBinaryCheck : public TikcppBaseCheck {
23 : public:
24 40 : TikcppVecBinaryCheck(const std::string& name, VecBinaryApiParams& param) : TikcppBaseCheck(name), param_(param) {}
25 40 : ~TikcppVecBinaryCheck() override = default;
26 : bool CheckAllLowLevel(std::vector<uint64_t> maskArray);
27 : bool CheckAllHighLevel();
28 : bool CheckAddrAlign();
29 : bool CheckCmpTensorOverflowLowNorm(const TensorOverflowParams& params, const std::string& tensorName);
30 : bool CheckCmpTensorOverflowHigh(
31 : const uint32_t dtypeSize, const uint64_t bufferSize, const uint32_t calCount, const std::string& tensorName);
32 : bool CommonCheck();
33 :
34 : public:
35 : VecBinaryApiParams& param_;
36 : };
37 : } // namespace check
38 : } // namespace AscendC
39 : #endif
|