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 : #include "esched_notify.h"
12 :
13 : namespace hccl {
14 : constexpr u32 DEFAULT_NTC_EVENTID = 50;
15 : uint32_t EschedNotify::eventId_ = DEFAULT_NTC_EVENTID;
16 : uint32_t EschedNotify::initialThreadId_ = 0U;
17 :
18 0 : EschedNotify::EschedNotify(NotifyType notifyType) : NotifyBase(notifyType) {}
19 :
20 0 : EschedNotify::EschedNotify(NotifyType notifyType, HcclNotifyInfo notifyInfo) : NotifyBase(notifyType, notifyInfo) {}
21 :
22 0 : EschedNotify::~EschedNotify() { (void)Destroy(); }
23 :
24 0 : HcclResult EschedNotify::Open() { return HCCL_SUCCESS; }
25 :
26 0 : HcclResult EschedNotify::Close() { return HCCL_SUCCESS; }
27 :
28 0 : HcclResult EschedNotify::Wait(
29 : [[maybe_unused]] Stream& stream, [[maybe_unused]] HcclDispatcher dispatcher, [[maybe_unused]] s32 stage,
30 : [[maybe_unused]] u32 timeOut)
31 : {
32 0 : return HCCL_SUCCESS;
33 : }
34 :
35 0 : HcclResult EschedNotify::Post(
36 : [[maybe_unused]] Stream& stream, [[maybe_unused]] HcclDispatcher dispatcher, [[maybe_unused]] s32 stage)
37 : {
38 0 : return HCCL_SUCCESS;
39 : }
40 :
41 0 : HcclResult EschedNotify::Wait(
42 : Stream& stream, HcclDispatcher dispatcher, s32 stage, u32 timeOut, [[maybe_unused]] u32 userRank,
43 : [[maybe_unused]] u32 remoteUserRank)
44 : {
45 0 : return Wait(stream, dispatcher, stage, timeOut);
46 : }
47 :
48 0 : HcclResult EschedNotify::Wait([[maybe_unused]] Stream& stream, [[maybe_unused]] u32 timeOut) { return HCCL_SUCCESS; }
49 :
50 0 : HcclResult EschedNotify::Post(Stream& stream, HcclDispatcher dispatcher, s32 stage, [[maybe_unused]] u32 remoteUserRank)
51 : {
52 0 : return Post(stream, dispatcher, stage);
53 : }
54 :
55 0 : HcclResult EschedNotify::Post([[maybe_unused]] Stream& stream) { return HCCL_SUCCESS; }
56 :
57 0 : HcclResult EschedNotify::SetIpc() { return HCCL_SUCCESS; }
58 :
59 0 : HcclResult EschedNotify::Grant([[maybe_unused]] s64 recvId) { return HCCL_SUCCESS; }
60 :
61 0 : HcclResult EschedNotify::Alloc() { return HCCL_SUCCESS; }
62 :
63 0 : HcclResult EschedNotify::Destroy() { return HCCL_SUCCESS; }
64 :
65 0 : HcclResult EschedNotify::ThreadIdCreate([[maybe_unused]] uint32_t& threadId) { return HCCL_SUCCESS; }
66 :
67 0 : HcclResult EschedNotify::InitGroupId() { return HCCL_SUCCESS; }
68 :
69 0 : void EschedNotify::ThreadIdQueInit() { return; }
70 :
71 0 : HcclResult EschedNotify::GetGroupId() { return HCCL_SUCCESS; }
72 :
73 0 : void EschedNotify::Break() {}
74 : } // namespace hccl
|