Line data Source code
1 : /**
2 : * Copyright (c) 2026 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 : #ifndef DEV_AICPU_TS_ROCE_CHANNEL_V2_H
11 : #define DEV_AICPU_TS_ROCE_CHANNEL_V2_H
12 :
13 : #include <vector>
14 : #include <memory>
15 : #include "dev_aicpu_ts_channel.h"
16 : #include "roce_transport_lite_impl.h"
17 :
18 : namespace Hccl {
19 :
20 : MAKE_ENUM(RDMA_NOTIFY_TYPE, DATA_NOTIFY_MEM, ACK_NOTIFY_MEM, DATA_ACK_NOTIFY_MEM, NOTIFY_TYPE_RESERVED);
21 :
22 : class DevAicpuTsRoceChannelV2 : public ::DevAicpuTsChannel {
23 : public:
24 : explicit DevAicpuTsRoceChannelV2(std::vector<char>& uniqueId);
25 0 : DevAicpuTsRoceChannelV2() = default;
26 : ~DevAicpuTsRoceChannelV2() override;
27 :
28 : HcclResult
29 : Create(const void* blob, u64 blobBytes, const HcommDeviceInfo& deviceInfo, ChannelHandle& outHandle) override;
30 : bool Destroy(ChannelHandle handle) override;
31 :
32 : std::string Describe() const;
33 :
34 : private:
35 : std::unique_ptr<RoceTransportLiteImpl> transport_{};
36 : };
37 :
38 : } // namespace Hccl
39 : #endif
|