* Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
* \file hcomm_define.h
* \brief
*/
#pragma once
#include <cstdint>
namespace npu::tile_fwk {
typedef void *HcommHandle;
enum HcommResult {
HCOMM_SUCCESS = 0,
HCOMM_E_PARA = 1,
HCOMM_E_PTR = 2,
HCOMM_E_MEMORY = 3,
HCOMM_E_INTERNAL = 4,
HCOMM_E_NOT_SUPPORT = 5,
HCOMM_E_NOT_FOUND = 6,
HCOMM_E_UNAVAIL = 7,
HCOMM_E_SYSCALL = 8,
HCOMM_E_TIMEOUT = 9,
HCOMM_E_OPEN_FILE_FAILURE = 10,
HCOMM_E_TCP_CONNECT = 11,
HCOMM_E_ROCE_CONNECT = 12,
HCOMM_E_TCP_TRANSFER = 13,
HCOMM_E_ROCE_TRANSFER = 14,
HCOMM_E_RUNTIME = 15,
HCOMM_E_DRV = 16,
HCOMM_E_PROFILING = 17,
HCOMM_E_CCE = 18,
HCOMM_E_NETWORK = 19,
HCOMM_E_AGAIN = 20,
HCOMM_E_REMOTE = 21,
HCOMM_E_SUSPENDING = 22,
HCOMM_E_OPRETRY_FAIL = 23,
HCOMM_E_OOM = 24,
HCOMM_E_IN_STATUS = 1041,
HCOMM_E_RESERVED
};
enum HCommTopo {
HCOMM_TOPO_RESERVED = -1,
HCOMM_TOPO_CLOS = 0,
HCOMM_TOPO_1DMESH = 1,
HCOMM_TOPO_910_93 = 2,
HCOMM_TOPO_310P = 3,
HCOMM_TOPO_A2AXSERVER = 4,
HCOMM_TOPO_CUSTOM = 5
};
const uint32_t HCOMM_ROOT_INFO_BYTES = 4108;
struct HcommRootInfo {
char internal[HCOMM_ROOT_INFO_BYTES];
};
}