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 : #ifndef HWTS_KERNEL_MODEL_CONTROL_H
12 : #define HWTS_KERNEL_MODEL_CONTROL_H
13 :
14 : #include "hwts_kernel.h"
15 : #include "aicpu_sched/common/aicpu_task_struct.h"
16 :
17 : namespace AicpuSchedule {
18 : class EndGraphTsKernel : public HwTsKernelHandler {
19 : public:
20 6 : EndGraphTsKernel() = default;
21 6 : ~EndGraphTsKernel() override = default;
22 : int32_t Compute(const aicpu::HwtsTsKernel &tsKernelInfo) override;
23 : };
24 :
25 : class RecordNotifyTsKernel : public HwTsKernelHandler {
26 : public:
27 6 : RecordNotifyTsKernel() = default;
28 6 : ~RecordNotifyTsKernel() override = default;
29 : int32_t Compute(const aicpu::HwtsTsKernel &tsKernelInfo) override;
30 : };
31 :
32 : class ActiveEntryStreamTsKernel : public HwTsKernelHandler {
33 : public:
34 5 : ActiveEntryStreamTsKernel() = default;
35 5 : ~ActiveEntryStreamTsKernel() override = default;
36 : int32_t Compute(const aicpu::HwtsTsKernel &tsKernelInfo) override;
37 : };
38 :
39 : class ModelStopTsKernel : public HwTsKernelHandler {
40 : public:
41 6 : ModelStopTsKernel() = default;
42 6 : ~ModelStopTsKernel() override = default;
43 : int32_t Compute(const aicpu::HwtsTsKernel &tsKernelInfo) override;
44 : };
45 :
46 : class ModelClearAndRestartTsKernel : public HwTsKernelHandler {
47 : public:
48 7 : ModelClearAndRestartTsKernel() = default;
49 7 : ~ModelClearAndRestartTsKernel() override = default;
50 : int32_t Compute(const aicpu::HwtsTsKernel &tsKernelInfo) override;
51 : };
52 : } // namespace AicpuSchedule
53 : #endif // HWTS_KERNEL_MODEL_CONTROL_H
|