已合并
【PR】: revert platform.so modify #2073
handong12138创建于 5月11日
【PR】: revert platform.so modify #2073
已合并
共 7 个文件变更+65-85
| @@ -21,13 +21,13 @@ using std::vector; | |||
| 21 | using std::string; | 21 | using std::string; |
| 22 | 22 | ||
| 23 | namespace fe { | 23 | namespace fe { |
| 24 | -enum __attribute__((visibility("default"))) MemoryType { DDR = 0, HBM }; | 24 | +enum MemoryType { DDR = 0, HBM }; |
| 25 | 25 | ||
| 26 | -enum __attribute__((visibility("default"))) L2Type { Cache = 0, Buff }; | 26 | +enum L2Type { Cache = 0, Buff }; |
| 27 | 27 | ||
| 28 | -enum __attribute__((visibility("default"))) JitCompileMode { REUSE_BINARY = 0, COMPILE_ONLINE, AUTO }; | 28 | +enum JitCompileMode { REUSE_BINARY = 0, COMPILE_ONLINE, AUTO }; |
| 29 | 29 | ||
| 30 | -typedef struct __attribute__((visibility("default"))) tag_str_info { | 30 | +typedef struct tag_str_info { |
| 31 | std::string aic_version; | 31 | std::string aic_version; |
| 32 | std::string ccec_aic_version; | 32 | std::string ccec_aic_version; |
| 33 | std::string ccec_aiv_version; | 33 | std::string ccec_aiv_version; |
| @@ -35,7 +35,7 @@ typedef struct __attribute__((visibility("default"))) tag_str_info { | |||
| 35 | std::string short_soc_version; | 35 | std::string short_soc_version; |
| 36 | } StrInfo; | 36 | } StrInfo; |
| 37 | 37 | ||
| 38 | -typedef struct __attribute__((visibility("default"))) tag_so_c_info { | 38 | +typedef struct tag_so_c_info { |
| 39 | uint32_t ai_core_cnt; | 39 | uint32_t ai_core_cnt; |
| 40 | uint32_t vector_core_cnt; | 40 | uint32_t vector_core_cnt; |
| 41 | uint32_t ai_cpu_cnt; | 41 | uint32_t ai_cpu_cnt; |
| @@ -52,7 +52,7 @@ typedef struct __attribute__((visibility("default"))) tag_so_c_info { | |||
| 52 | chip_type(-1) {} | 52 | chip_type(-1) {} |
| 53 | } SoCInfo; | 53 | } SoCInfo; |
| 54 | 54 | ||
| 55 | -typedef struct __attribute__((visibility("default"))) tag_ai_core_spec { | 55 | +typedef struct tag_ai_core_spec { |
| 56 | double cube_freq; | 56 | double cube_freq; |
| 57 | uint64_t cube_m_size; | 57 | uint64_t cube_m_size; |
| 58 | uint64_t cube_n_size; | 58 | uint64_t cube_n_size; |
| @@ -77,7 +77,7 @@ typedef struct __attribute__((visibility("default"))) tag_ai_core_spec { | |||
| 77 | uint8_t sparsity; | 77 | uint8_t sparsity; |
| 78 | } AiCoreSpec; | 78 | } AiCoreSpec; |
| 79 | 79 | ||
| 80 | -typedef struct __attribute__((visibility("default"))) tag_ai_core_memory_rates { | 80 | +typedef struct tag_ai_core_memory_rates { |
| 81 | double ddr_rate; | 81 | double ddr_rate; |
| 82 | double ddr_read_rate; | 82 | double ddr_read_rate; |
| 83 | double ddr_write_rate; | 83 | double ddr_write_rate; |
| @@ -93,7 +93,7 @@ typedef struct __attribute__((visibility("default"))) tag_ai_core_memory_rates { | |||
| 93 | double ub_to_l1_rate; | 93 | double ub_to_l1_rate; |
| 94 | } AiCoreMemoryRates; | 94 | } AiCoreMemoryRates; |
| 95 | 95 | ||
| 96 | -typedef struct __attribute__((visibility("default"))) tag_vector_core_spec { | 96 | +typedef struct tag_vector_core_spec { |
| 97 | double vec_freq; | 97 | double vec_freq; |
| 98 | uint64_t vec_calc_size; | 98 | uint64_t vec_calc_size; |
| 99 | uint64_t smask_buffer; | 99 | uint64_t smask_buffer; |
| @@ -109,7 +109,7 @@ typedef struct __attribute__((visibility("default"))) tag_vector_core_spec { | |||
| 109 | uint64_t alignment_reg_size; | 109 | uint64_t alignment_reg_size; |
| 110 | } VectorCoreSpec; | 110 | } VectorCoreSpec; |
| 111 | 111 | ||
| 112 | -typedef struct __attribute__((visibility("default"))) tag_vector_core_memory_rates { | 112 | +typedef struct tag_vector_core_memory_rates { |
| 113 | double ddr_rate; | 113 | double ddr_rate; |
| 114 | double ddr_read_rate; | 114 | double ddr_read_rate; |
| 115 | double ddr_write_rate; | 115 | double ddr_write_rate; |
| @@ -120,12 +120,12 @@ typedef struct __attribute__((visibility("default"))) tag_vector_core_memory_rat | |||
| 120 | double ub_to_ddr_rate; | 120 | double ub_to_ddr_rate; |
| 121 | } VectorCoreMemoryRates; | 121 | } VectorCoreMemoryRates; |
| 122 | 122 | ||
| 123 | -typedef struct __attribute__((visibility("default"))) tag_cpu_cache { | 123 | +typedef struct tag_cpu_cache { |
| 124 | uint32_t AICPUSyncBySW; | 124 | uint32_t AICPUSyncBySW; |
| 125 | uint32_t TSCPUSyncBySW; | 125 | uint32_t TSCPUSyncBySW; |
| 126 | } CPUCache; | 126 | } CPUCache; |
| 127 | 127 | ||
| 128 | -typedef struct __attribute__((visibility("default"))) tag_software_spec { | 128 | +typedef struct tag_software_spec { |
| 129 | bool jit_compile_default_value; | 129 | bool jit_compile_default_value; |
| 130 | JitCompileMode jit_compile_mode; | 130 | JitCompileMode jit_compile_mode; |
| 131 | tag_software_spec() { | 131 | tag_software_spec() { |
| @@ -134,7 +134,7 @@ typedef struct __attribute__((visibility("default"))) tag_software_spec { | |||
| 134 | } | 134 | } |
| 135 | } SoftwareSpec; | 135 | } SoftwareSpec; |
| 136 | 136 | ||
| 137 | -typedef struct __attribute__((visibility("default"))) tag_platform_info { | 137 | +typedef struct tag_platform_info { |
| 138 | StrInfo str_info; | 138 | StrInfo str_info; |
| 139 | SoCInfo soc_info; | 139 | SoCInfo soc_info; |
| 140 | AiCoreSpec ai_core_spec; | 140 | AiCoreSpec ai_core_spec; |
| @@ -147,7 +147,7 @@ typedef struct __attribute__((visibility("default"))) tag_platform_info { | |||
| 147 | SoftwareSpec software_spec; | 147 | SoftwareSpec software_spec; |
| 148 | } PlatformInfo; | 148 | } PlatformInfo; |
| 149 | 149 | ||
| 150 | -typedef struct __attribute__((visibility("default"))) tag_optional_info { | 150 | +typedef struct tag_optional_info { |
| 151 | std::string soc_version; | 151 | std::string soc_version; |
| 152 | std::string core_type; | 152 | std::string core_type; |
| 153 | uint32_t ai_core_num; | 153 | uint32_t ai_core_num; |
| @@ -20,7 +20,7 @@ | |||
| 20 | namespace fe { | 20 | namespace fe { |
| 21 | class PlatformInfosUtils; | 21 | class PlatformInfosUtils; |
| 22 | 22 | ||
| 23 | -enum class __attribute__((visibility("default"))) LocalMemType { | 23 | +enum class LocalMemType { |
| 24 | L0_A = 0, | 24 | L0_A = 0, |
| 25 | L0_B = 1, | 25 | L0_B = 1, |
| 26 | L0_C = 2, | 26 | L0_C = 2, |
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <cstdint> | 14 | #include <cstdint> |
| 15 | 15 | ||
| 16 | 16 | ||
| 17 | -enum class __attribute__((visibility("default"))) NpuArch : uint32_t { | 17 | +enum class NpuArch : uint32_t { |
| 18 | DAV_1001 = 1001, | 18 | DAV_1001 = 1001, |
| 19 | DAV_1002 = 1002, | 19 | DAV_1002 = 1002, |
| 20 | DAV_1003 = 1003, | 20 | DAV_1003 = 1003, |
| @@ -76,7 +76,6 @@ target_include_directories(platform PRIVATE | |||
| 76 | 76 | ||
| 77 | target_compile_options(platform PRIVATE | 77 | target_compile_options(platform PRIVATE |
| 78 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++17> | 78 | $<$<COMPILE_LANGUAGE:CXX>:-std=c++17> |
| 79 | - -fvisibility=hidden | ||
| 80 | -Werror | 79 | -Werror |
| 81 | -fno-common | 80 | -fno-common |
| 82 | -fno-strict-aliasing | 81 | -fno-strict-aliasing |
| @@ -81,12 +81,12 @@ PlatformInfoManager::PlatformInfoManager() : init_flag_(false), runtime_init_fla | |||
| 81 | PlatformInfoManager::~PlatformInfoManager() | 81 | PlatformInfoManager::~PlatformInfoManager() |
| 82 | {} | 82 | {} |
| 83 | 83 | ||
| 84 | -__attribute__((visibility("default"))) PlatformInfoManager &PlatformInfoManager::Instance() { | 84 | +PlatformInfoManager &PlatformInfoManager::Instance() { |
| 85 | static PlatformInfoManager platform_info; | 85 | static PlatformInfoManager platform_info; |
| 86 | return platform_info; | 86 | return platform_info; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | -__attribute__((visibility("default"))) PlatformInfoManager &PlatformInfoManager::GeInstance() { | 89 | +PlatformInfoManager &PlatformInfoManager::GeInstance() { |
| 90 | static PlatformInfoManager ge_platform_info; | 90 | static PlatformInfoManager ge_platform_info; |
| 91 | return ge_platform_info; | 91 | return ge_platform_info; |
| 92 | } | 92 | } |
| @@ -987,8 +987,7 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::GetPlatform | |||
| 987 | return PLATFORM_SUCCESS; | 987 | return PLATFORM_SUCCESS; |
| 988 | } | 988 | } |
| 989 | 989 | ||
| 990 | -__attribute__((visibility("default"))) void PlatformInfoManager::SetOptionalCompilationInfo( | 990 | +void PlatformInfoManager::SetOptionalCompilationInfo(OptionalInfo &opti_compilation_info) { |
| 991 | - OptionalInfo &opti_compilation_info) { | ||
| 992 | // add lock | 991 | // add lock |
| 993 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 992 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 994 | opti_compilation_info_ = opti_compilation_info; | 993 | opti_compilation_info_ = opti_compilation_info; |
| @@ -1054,8 +1053,7 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::GetPlatform | |||
| 1054 | return PLATFORM_SUCCESS; | 1053 | return PLATFORM_SUCCESS; |
| 1055 | } | 1054 | } |
| 1056 | 1055 | ||
| 1057 | -__attribute__((visibility("default"))) void PlatformInfoManager::SetOptionalCompilationInfo( | 1056 | +void PlatformInfoManager::SetOptionalCompilationInfo(OptionalInfos &opti_compilation_info) { |
| 1058 | - OptionalInfos &opti_compilation_info) { | ||
| 1059 | // add lock | 1057 | // add lock |
| 1060 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1058 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1061 | opti_compilation_infos_ = opti_compilation_info; | 1059 | opti_compilation_infos_ = opti_compilation_info; |
| @@ -1064,8 +1062,7 @@ __attribute__((visibility("default"))) void PlatformInfoManager::SetOptionalComp | |||
| 1064 | } | 1062 | } |
| 1065 | } | 1063 | } |
| 1066 | 1064 | ||
| 1067 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdatePlatformInfos( | 1065 | +uint32_t PlatformInfoManager::UpdatePlatformInfos(fe::PlatFormInfos &platform_info) { |
| 1068 | - fe::PlatFormInfos &platform_info) { | ||
| 1069 | // add lock | 1066 | // add lock |
| 1070 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1067 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1071 | if (opti_compilation_infos_.GetSocVersion().empty()) { | 1068 | if (opti_compilation_infos_.GetSocVersion().empty()) { |
| @@ -1080,8 +1077,7 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdatePlatf | |||
| 1080 | return PLATFORM_SUCCESS; | 1077 | return PLATFORM_SUCCESS; |
| 1081 | } | 1078 | } |
| 1082 | 1079 | ||
| 1083 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdatePlatformInfos( | 1080 | +uint32_t PlatformInfoManager::UpdatePlatformInfos(const std::string &soc_version, fe::PlatFormInfos &platform_info) { |
| 1084 | - const std::string &soc_version, fe::PlatFormInfos &platform_info) { | ||
| 1085 | // add lock | 1081 | // add lock |
| 1086 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1082 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1087 | if (soc_version.empty()) { | 1083 | if (soc_version.empty()) { |
| @@ -1101,7 +1097,7 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdatePlatf | |||
| 1101 | return PLATFORM_SUCCESS; | 1097 | return PLATFORM_SUCCESS; |
| 1102 | } | 1098 | } |
| 1103 | 1099 | ||
| 1104 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::Finalize() { | 1100 | +uint32_t PlatformInfoManager::Finalize() { |
| 1105 | // add lock | 1101 | // add lock |
| 1106 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1102 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1107 | if (!init_flag_) { | 1103 | if (!init_flag_) { |
| @@ -1121,8 +1117,8 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::Finalize() | |||
| 1121 | return PLATFORM_SUCCESS; | 1117 | return PLATFORM_SUCCESS; |
| 1122 | } | 1118 | } |
| 1123 | 1119 | ||
| 1124 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::GetRuntimePlatformInfosByDevice( | 1120 | +uint32_t PlatformInfoManager::GetRuntimePlatformInfosByDevice(const uint32_t &device_id, |
| 1125 | - const uint32_t &device_id, PlatFormInfos &platform_infos, bool need_deep_copy) { | 1121 | + PlatFormInfos &platform_infos, bool need_deep_copy) { |
| 1126 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1122 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1127 | const auto it = runtime_device_platform_infos_map_.find(device_id); | 1123 | const auto it = runtime_device_platform_infos_map_.find(device_id); |
| 1128 | PlatFormInfos device_platform_infos; | 1124 | PlatFormInfos device_platform_infos; |
| @@ -1142,8 +1138,8 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::GetRuntimeP | |||
| 1142 | return PLATFORM_SUCCESS; | 1138 | return PLATFORM_SUCCESS; |
| 1143 | } | 1139 | } |
| 1144 | 1140 | ||
| 1145 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdateRuntimePlatformInfosByDevice( | 1141 | +uint32_t PlatformInfoManager::UpdateRuntimePlatformInfosByDevice(const uint32_t &device_id, |
| 1146 | - const uint32_t &device_id, PlatFormInfos &platform_infos) { | 1142 | + PlatFormInfos &platform_infos) { |
| 1147 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1143 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1148 | PF_LOGD("Update the platform info with device_id %u.", device_id); | 1144 | PF_LOGD("Update the platform info with device_id %u.", device_id); |
| 1149 | PlatFormInfos device_platform_infos; | 1145 | PlatFormInfos device_platform_infos; |
| @@ -1152,8 +1148,7 @@ __attribute__((visibility("default"))) uint32_t PlatformInfoManager::UpdateRunti | |||
| 1152 | return PLATFORM_SUCCESS; | 1148 | return PLATFORM_SUCCESS; |
| 1153 | } | 1149 | } |
| 1154 | 1150 | ||
| 1155 | -__attribute__((visibility("default"))) uint32_t PlatformInfoManager::InitRuntimePlatformInfos( | 1151 | +uint32_t PlatformInfoManager::InitRuntimePlatformInfos(const std::string &SoCVersion) { |
| 1156 | - const std::string &SoCVersion) { | ||
| 1157 | std::lock_guard<std::mutex> lock_guard(pc_lock_); | 1152 | std::lock_guard<std::mutex> lock_guard(pc_lock_); |
| 1158 | if (runtime_init_flag_) { | 1153 | if (runtime_init_flag_) { |
| 1159 | return PLATFORM_SUCCESS; | 1154 | return PLATFORM_SUCCESS; |
| @@ -32,7 +32,7 @@ using ProtoBufStringMapMap = ascend_private::protobuf::Map<ProtoBufString, Proto | |||
| 32 | #endif | 32 | #endif |
| 33 | PlatFormInfosImplPtr g_platformInfosImplInstance; | 33 | PlatFormInfosImplPtr g_platformInfosImplInstance; |
| 34 | 34 | ||
| 35 | -__attribute__((visibility("default"))) bool PlatFormInfos::Init() { | 35 | +bool PlatFormInfos::Init() { |
| 36 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 36 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 37 | platform_infos_impl_ = make_shared<PlatFormInfosImpl>(); | 37 | platform_infos_impl_ = make_shared<PlatFormInfosImpl>(); |
| 38 | if (platform_infos_impl_ == nullptr) { | 38 | if (platform_infos_impl_ == nullptr) { |
| @@ -74,7 +74,7 @@ static void GetMapMapInfoFromProtoBuf(ProtoBufStringMapMap *protoMap, | |||
| 74 | } | 74 | } |
| 75 | #endif | 75 | #endif |
| 76 | 76 | ||
| 77 | -__attribute__((visibility("default"))) map<string, vector<string>> PlatFormInfos::GetAICoreIntrinsicDtype() { | 77 | +map<string, vector<string>> PlatFormInfos::GetAICoreIntrinsicDtype() { |
| 78 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 78 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 79 | if (platform_infos_impl_ == nullptr) { | 79 | if (platform_infos_impl_ == nullptr) { |
| 80 | return map<string, vector<string>>(); | 80 | return map<string, vector<string>>(); |
| @@ -82,7 +82,7 @@ __attribute__((visibility("default"))) map<string, vector<string>> PlatFormInfos | |||
| 82 | return platform_infos_impl_->GetAICoreIntrinsicDtype(); | 82 | return platform_infos_impl_->GetAICoreIntrinsicDtype(); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | -__attribute__((visibility("default"))) map<string, vector<string>> PlatFormInfos::GetVectorCoreIntrinsicDtype() { | 85 | +map<string, vector<string>> PlatFormInfos::GetVectorCoreIntrinsicDtype() { |
| 86 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 86 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 87 | if (platform_infos_impl_ == nullptr) { | 87 | if (platform_infos_impl_ == nullptr) { |
| 88 | return map<string, vector<string>>(); | 88 | return map<string, vector<string>>(); |
| @@ -90,16 +90,14 @@ __attribute__((visibility("default"))) map<string, vector<string>> PlatFormInfos | |||
| 90 | return platform_infos_impl_->GetVectorCoreIntrinsicDtype(); | 90 | return platform_infos_impl_->GetVectorCoreIntrinsicDtype(); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | -__attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformRes(const string &label, const string &key, | 93 | +bool PlatFormInfos::GetPlatformRes(const string &label, const string &key, string &val) { |
| 94 | - string &val) { | ||
| 95 | if (platform_infos_impl_ == nullptr) { | 94 | if (platform_infos_impl_ == nullptr) { |
| 96 | return true; | 95 | return true; |
| 97 | } | 96 | } |
| 98 | return platform_infos_impl_->GetPlatformRes(label, key, val); | 97 | return platform_infos_impl_->GetPlatformRes(label, key, val); |
| 99 | } | 98 | } |
| 100 | 99 | ||
| 101 | -__attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLock(const string &label, | 100 | +bool PlatFormInfos::GetPlatformResWithLock(const string &label, const string &key, string &val) { |
| 102 | - const string &key, string &val) { | ||
| 103 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 101 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 104 | if (platform_infos_impl_ == nullptr) { | 102 | if (platform_infos_impl_ == nullptr) { |
| 105 | return true; | 103 | return true; |
| @@ -107,16 +105,14 @@ __attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLoc | |||
| 107 | return platform_infos_impl_->GetPlatformRes(label, key, val); | 105 | return platform_infos_impl_->GetPlatformRes(label, key, val); |
| 108 | } | 106 | } |
| 109 | 107 | ||
| 110 | -__attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformRes(const std::string &label, | 108 | +bool PlatFormInfos::GetPlatformRes(const std::string &label, std::map<std::string, std::string> &res) { |
| 111 | - std::map<std::string, std::string> &res) { | ||
| 112 | if (platform_infos_impl_ == nullptr) { | 109 | if (platform_infos_impl_ == nullptr) { |
| 113 | return true; | 110 | return true; |
| 114 | } | 111 | } |
| 115 | return platform_infos_impl_->GetPlatformRes(label, res); | 112 | return platform_infos_impl_->GetPlatformRes(label, res); |
| 116 | } | 113 | } |
| 117 | 114 | ||
| 118 | -__attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLock(const std::string &label, | 115 | +bool PlatFormInfos::GetPlatformResWithLock(const std::string &label, std::map<std::string, std::string> &res) { |
| 119 | - std::map<std::string, std::string> &res) { | ||
| 120 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 116 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 121 | if (platform_infos_impl_ == nullptr) { | 117 | if (platform_infos_impl_ == nullptr) { |
| 122 | return true; | 118 | return true; |
| @@ -124,8 +120,7 @@ __attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLoc | |||
| 124 | return platform_infos_impl_->GetPlatformRes(label, res); | 120 | return platform_infos_impl_->GetPlatformRes(label, res); |
| 125 | } | 121 | } |
| 126 | 122 | ||
| 127 | -__attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLock(std::map<std::string, | 123 | +bool PlatFormInfos::GetPlatformResWithLock(std::map<std::string, std::map<std::string, std::string>> &res) { |
| 128 | - std::map<std::string, std::string>> &res) { | ||
| 129 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 124 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 130 | if (platform_infos_impl_ == nullptr) { | 125 | if (platform_infos_impl_ == nullptr) { |
| 131 | return true; | 126 | return true; |
| @@ -133,8 +128,7 @@ __attribute__((visibility("default"))) bool PlatFormInfos::GetPlatformResWithLoc | |||
| 133 | return platform_infos_impl_->GetPlatformRes(res); | 128 | return platform_infos_impl_->GetPlatformRes(res); |
| 134 | } | 129 | } |
| 135 | 130 | ||
| 136 | -__attribute__((visibility("default"))) void PlatFormInfos::SetAICoreIntrinsicDtype(map<string, | 131 | +void PlatFormInfos::SetAICoreIntrinsicDtype(map<string, vector<string>> &intrinsic_dtypes) { |
| 137 | - vector<string>> &intrinsic_dtypes) { | ||
| 138 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 132 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 139 | if (platform_infos_impl_ == nullptr) { | 133 | if (platform_infos_impl_ == nullptr) { |
| 140 | return; | 134 | return; |
| @@ -142,8 +136,7 @@ __attribute__((visibility("default"))) void PlatFormInfos::SetAICoreIntrinsicDty | |||
| 142 | platform_infos_impl_->SetAICoreIntrinsicDtype(intrinsic_dtypes); | 136 | platform_infos_impl_->SetAICoreIntrinsicDtype(intrinsic_dtypes); |
| 143 | } | 137 | } |
| 144 | 138 | ||
| 145 | -__attribute__((visibility("default"))) void PlatFormInfos::SetVectorCoreIntrinsicDtype(map<string, | 139 | +void PlatFormInfos::SetVectorCoreIntrinsicDtype(map<string, vector<string>> &intrinsic_dtypes) { |
| 146 | - vector<string>> &intrinsic_dtypes) { | ||
| 147 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 140 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 148 | if (platform_infos_impl_ == nullptr) { | 141 | if (platform_infos_impl_ == nullptr) { |
| 149 | return; | 142 | return; |
| @@ -151,8 +144,7 @@ __attribute__((visibility("default"))) void PlatFormInfos::SetVectorCoreIntrinsi | |||
| 151 | platform_infos_impl_->SetVectorCoreIntrinsicDtype(intrinsic_dtypes); | 144 | platform_infos_impl_->SetVectorCoreIntrinsicDtype(intrinsic_dtypes); |
| 152 | } | 145 | } |
| 153 | 146 | ||
| 154 | -__attribute__((visibility("default"))) void PlatFormInfos::SetFixPipeDtypeMap(const std::map<std::string, | 147 | +void PlatFormInfos::SetFixPipeDtypeMap(const std::map<std::string, std::vector<std::string>> &fixpipe_dtype_map) { |
| 155 | - std::vector<std::string>> &fixpipe_dtype_map) { | ||
| 156 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 148 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 157 | if (platform_infos_impl_ == nullptr) { | 149 | if (platform_infos_impl_ == nullptr) { |
| 158 | return; | 150 | return; |
| @@ -160,7 +152,7 @@ __attribute__((visibility("default"))) void PlatFormInfos::SetFixPipeDtypeMap(co | |||
| 160 | platform_infos_impl_->SetFixPipeDtypeMap(fixpipe_dtype_map); | 152 | platform_infos_impl_->SetFixPipeDtypeMap(fixpipe_dtype_map); |
| 161 | } | 153 | } |
| 162 | 154 | ||
| 163 | -__attribute__((visibility("default"))) void PlatFormInfos::SetCoreNumByCoreType(const std::string &core_type) { | 155 | +void PlatFormInfos::SetCoreNumByCoreType(const std::string &core_type) { |
| 164 | string core_num_str; | 156 | string core_num_str; |
| 165 | string core_type_str; | 157 | string core_type_str; |
| 166 | /* | 158 | /* |
| @@ -194,25 +186,25 @@ __attribute__((visibility("default"))) void PlatFormInfos::SetCoreNumByCoreType( | |||
| 194 | core_type_str.c_str(), core_num_, core_type.c_str()); | 186 | core_type_str.c_str(), core_num_, core_type.c_str()); |
| 195 | } | 187 | } |
| 196 | 188 | ||
| 197 | -__attribute__((visibility("default"))) void PlatFormInfos::SetCoreNum(const uint32_t &core_num) { | 189 | +void PlatFormInfos::SetCoreNum(const uint32_t &core_num) { |
| 198 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 190 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 199 | PF_LOGD("Set PlatFormInfos::core_num_ to %u.", core_num); | 191 | PF_LOGD("Set PlatFormInfos::core_num_ to %u.", core_num); |
| 200 | core_num_ = core_num; | 192 | core_num_ = core_num; |
| 201 | } | 193 | } |
| 202 | 194 | ||
| 203 | -__attribute__((visibility("default"))) uint32_t PlatFormInfos::GetCoreNum() const { | 195 | +uint32_t PlatFormInfos::GetCoreNum() const { |
| 204 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 196 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 205 | PF_LOGD("Get PlatformInfos::core_num_=[%u].", core_num_); | 197 | PF_LOGD("Get PlatformInfos::core_num_=[%u].", core_num_); |
| 206 | return core_num_; | 198 | return core_num_; |
| 207 | } | 199 | } |
| 208 | 200 | ||
| 209 | -__attribute__((visibility("default"))) uint32_t PlatFormInfos::GetCoreNumWithLock() const { | 201 | +uint32_t PlatFormInfos::GetCoreNumWithLock() const { |
| 210 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 202 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 211 | PF_LOGD("Get PlatformInfos::core_num_=[%u].", core_num_); | 203 | PF_LOGD("Get PlatformInfos::core_num_=[%u].", core_num_); |
| 212 | return core_num_; | 204 | return core_num_; |
| 213 | } | 205 | } |
| 214 | 206 | ||
| 215 | -__attribute__((visibility("default"))) uint32_t PlatFormInfos::GetCoreNumByType(const std::string &core_type) | 207 | +uint32_t PlatFormInfos::GetCoreNumByType(const std::string &core_type) |
| 216 | { | 208 | { |
| 217 | std::unordered_set<string> vector_core_types = {"VectorCore", "AIV"}; | 209 | std::unordered_set<string> vector_core_types = {"VectorCore", "AIV"}; |
| 218 | std::string core_type_str; | 210 | std::string core_type_str; |
| @@ -236,7 +228,7 @@ __attribute__((visibility("default"))) uint32_t PlatFormInfos::GetCoreNumByType( | |||
| 236 | return core_num; | 228 | return core_num; |
| 237 | } | 229 | } |
| 238 | 230 | ||
| 239 | -__attribute__((visibility("default"))) void PlatFormInfos::GetLocalMemSize(const LocalMemType &mem_type, uint64_t &size) { | 231 | +void PlatFormInfos::GetLocalMemSize(const LocalMemType &mem_type, uint64_t &size) { |
| 240 | string size_str; | 232 | string size_str; |
| 241 | switch (mem_type) { | 233 | switch (mem_type) { |
| 242 | case LocalMemType::L0_A: | 234 | case LocalMemType::L0_A: |
| @@ -266,8 +258,7 @@ __attribute__((visibility("default"))) void PlatFormInfos::GetLocalMemSize(const | |||
| 266 | size = size_str.empty() ? 0 : std::atoll(size_str.c_str()); | 258 | size = size_str.empty() ? 0 : std::atoll(size_str.c_str()); |
| 267 | } | 259 | } |
| 268 | 260 | ||
| 269 | -__attribute__((visibility("default"))) void PlatFormInfos:: GetLocalMemBw(const LocalMemType &mem_type, | 261 | +void PlatFormInfos:: GetLocalMemBw(const LocalMemType &mem_type, uint64_t &bw_size) { |
| 270 | - uint64_t &bw_size) { | ||
| 271 | string bw_size_str; | 262 | string bw_size_str; |
| 272 | switch (mem_type) { | 263 | switch (mem_type) { |
| 273 | case LocalMemType::L2: | 264 | case LocalMemType::L2: |
| @@ -282,8 +273,7 @@ __attribute__((visibility("default"))) void PlatFormInfos:: GetLocalMemBw(const | |||
| 282 | bw_size = bw_size_str.empty() ? 0 : std::atoll(bw_size_str.c_str()); | 273 | bw_size = bw_size_str.empty() ? 0 : std::atoll(bw_size_str.c_str()); |
| 283 | } | 274 | } |
| 284 | 275 | ||
| 285 | -__attribute__((visibility("default"))) std::map<std::string, std::vector<std::string>> | 276 | +std::map<std::string, std::vector<std::string>> PlatFormInfos::GetFixPipeDtypeMap() { |
| 286 | -PlatFormInfos::GetFixPipeDtypeMap() { | ||
| 287 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 277 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 288 | if (platform_infos_impl_ == nullptr) { | 278 | if (platform_infos_impl_ == nullptr) { |
| 289 | return map<string, vector<string>>(); | 279 | return map<string, vector<string>>(); |
| @@ -291,16 +281,14 @@ PlatFormInfos::GetFixPipeDtypeMap() { | |||
| 291 | return platform_infos_impl_->GetFixPipeDtypeMap(); | 281 | return platform_infos_impl_->GetFixPipeDtypeMap(); |
| 292 | } | 282 | } |
| 293 | 283 | ||
| 294 | -__attribute__((visibility("default"))) void PlatFormInfos::SetPlatformRes(const std::string &label, | 284 | +void PlatFormInfos::SetPlatformRes(const std::string &label, std::map<std::string, std::string> &res) { |
| 295 | - std::map<std::string, std::string> &res) { | ||
| 296 | if (platform_infos_impl_ == nullptr) { | 285 | if (platform_infos_impl_ == nullptr) { |
| 297 | return; | 286 | return; |
| 298 | } | 287 | } |
| 299 | platform_infos_impl_->SetPlatformRes(label, res); | 288 | platform_infos_impl_->SetPlatformRes(label, res); |
| 300 | } | 289 | } |
| 301 | 290 | ||
| 302 | -__attribute__((visibility("default"))) void PlatFormInfos::SetPlatformResWithLock(const std::string &label, | 291 | +void PlatFormInfos::SetPlatformResWithLock(const std::string &label, std::map<std::string, std::string> &res) { |
| 303 | - std::map<std::string, std::string> &res) { | ||
| 304 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); | 292 | std::lock_guard<std::mutex> lock_guard(plt_info_mutex); |
| 305 | if (platform_infos_impl_ == nullptr) { | 293 | if (platform_infos_impl_ == nullptr) { |
| 306 | return; | 294 | return; |
| @@ -323,7 +311,7 @@ bool PlatFormInfos::InitByInstance() { | |||
| 323 | return true; | 311 | return true; |
| 324 | } | 312 | } |
| 325 | 313 | ||
| 326 | -__attribute__((visibility("default"))) std::string PlatFormInfos::SaveToBuffer() { | 314 | +std::string PlatFormInfos::SaveToBuffer() { |
| 327 | #ifdef _OPEN_SOURCE_LLT_ | 315 | #ifdef _OPEN_SOURCE_LLT_ |
| 328 | PF_LOGW("_OPEN_SOURCE_LLT_ is defined"); | 316 | PF_LOGW("_OPEN_SOURCE_LLT_ is defined"); |
| 329 | return ""; | 317 | return ""; |
| @@ -367,7 +355,7 @@ __attribute__((visibility("default"))) std::string PlatFormInfos::SaveToBuffer() | |||
| 367 | #endif | 355 | #endif |
| 368 | } | 356 | } |
| 369 | 357 | ||
| 370 | -__attribute__((visibility("default"))) bool PlatFormInfos::LoadFromBuffer(const char *bufPtr, const size_t bufLen) { | 358 | +bool PlatFormInfos::LoadFromBuffer(const char *bufPtr, const size_t bufLen) { |
| 371 | #ifdef _OPEN_SOURCE_LLT_ | 359 | #ifdef _OPEN_SOURCE_LLT_ |
| 372 | return true; | 360 | return true; |
| 373 | #else | 361 | #else |
| @@ -406,7 +394,7 @@ __attribute__((visibility("default"))) bool PlatFormInfos::LoadFromBuffer(const | |||
| 406 | #endif | 394 | #endif |
| 407 | } | 395 | } |
| 408 | 396 | ||
| 409 | -__attribute__((visibility("default"))) bool OptionalInfos::Init() { | 397 | +bool OptionalInfos::Init() { |
| 410 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 398 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 411 | optional_infos_impl_ = make_shared<OptionalInfosImpl>(); | 399 | optional_infos_impl_ = make_shared<OptionalInfosImpl>(); |
| 412 | if (optional_infos_impl_ == nullptr) { | 400 | if (optional_infos_impl_ == nullptr) { |
| @@ -415,7 +403,7 @@ __attribute__((visibility("default"))) bool OptionalInfos::Init() { | |||
| 415 | return true; | 403 | return true; |
| 416 | } | 404 | } |
| 417 | 405 | ||
| 418 | -__attribute__((visibility("default"))) string OptionalInfos::GetSocVersion() { | 406 | +string OptionalInfos::GetSocVersion() { |
| 419 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 407 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 420 | if (optional_infos_impl_ == nullptr) { | 408 | if (optional_infos_impl_ == nullptr) { |
| 421 | return ""; | 409 | return ""; |
| @@ -423,7 +411,7 @@ __attribute__((visibility("default"))) string OptionalInfos::GetSocVersion() { | |||
| 423 | return optional_infos_impl_->GetSocVersion(); | 411 | return optional_infos_impl_->GetSocVersion(); |
| 424 | } | 412 | } |
| 425 | 413 | ||
| 426 | -__attribute__((visibility("default"))) string OptionalInfos::GetCoreType() { | 414 | +string OptionalInfos::GetCoreType() { |
| 427 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 415 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 428 | if (optional_infos_impl_ == nullptr) { | 416 | if (optional_infos_impl_ == nullptr) { |
| 429 | return ""; | 417 | return ""; |
| @@ -431,7 +419,7 @@ __attribute__((visibility("default"))) string OptionalInfos::GetCoreType() { | |||
| 431 | return optional_infos_impl_->GetCoreType(); | 419 | return optional_infos_impl_->GetCoreType(); |
| 432 | } | 420 | } |
| 433 | 421 | ||
| 434 | -__attribute__((visibility("default"))) uint32_t OptionalInfos::GetAICoreNum() { | 422 | +uint32_t OptionalInfos::GetAICoreNum() { |
| 435 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 423 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 436 | if (optional_infos_impl_ == nullptr) { | 424 | if (optional_infos_impl_ == nullptr) { |
| 437 | return 0; | 425 | return 0; |
| @@ -439,7 +427,7 @@ __attribute__((visibility("default"))) uint32_t OptionalInfos::GetAICoreNum() { | |||
| 439 | return optional_infos_impl_->GetAICoreNum(); | 427 | return optional_infos_impl_->GetAICoreNum(); |
| 440 | } | 428 | } |
| 441 | 429 | ||
| 442 | -__attribute__((visibility("default"))) string OptionalInfos::GetL1FusionFlag() { | 430 | +string OptionalInfos::GetL1FusionFlag() { |
| 443 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 431 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 444 | if (optional_infos_impl_ == nullptr) { | 432 | if (optional_infos_impl_ == nullptr) { |
| 445 | return ""; | 433 | return ""; |
| @@ -447,8 +435,7 @@ __attribute__((visibility("default"))) string OptionalInfos::GetL1FusionFlag() { | |||
| 447 | return optional_infos_impl_->GetL1FusionFlag(); | 435 | return optional_infos_impl_->GetL1FusionFlag(); |
| 448 | } | 436 | } |
| 449 | 437 | ||
| 450 | -__attribute__((visibility("default"))) void OptionalInfos::SetFixPipeDtypeMap( | 438 | +void OptionalInfos::SetFixPipeDtypeMap(const std::map<std::string, std::vector<std::string>> &fixpipe_dtype_map) { |
| 451 | - const std::map<std::string, std::vector<std::string>> &fixpipe_dtype_map) { | ||
| 452 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 439 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 453 | if (optional_infos_impl_ == nullptr) { | 440 | if (optional_infos_impl_ == nullptr) { |
| 454 | return; | 441 | return; |
| @@ -456,15 +443,14 @@ __attribute__((visibility("default"))) void OptionalInfos::SetFixPipeDtypeMap( | |||
| 456 | optional_infos_impl_->SetFixPipeDtypeMap(fixpipe_dtype_map); | 443 | optional_infos_impl_->SetFixPipeDtypeMap(fixpipe_dtype_map); |
| 457 | } | 444 | } |
| 458 | 445 | ||
| 459 | -__attribute__((visibility("default"))) std::map<std::string, std::vector<std::string>> | 446 | +std::map<std::string, std::vector<std::string>> OptionalInfos::GetFixPipeDtypeMap() { |
| 460 | -OptionalInfos::GetFixPipeDtypeMap() { | ||
| 461 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 447 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 462 | if (optional_infos_impl_ == nullptr) { | 448 | if (optional_infos_impl_ == nullptr) { |
| 463 | return std::map<std::string, std::vector<std::string>>(); | 449 | return std::map<std::string, std::vector<std::string>>(); |
| 464 | } | 450 | } |
| 465 | return optional_infos_impl_->GetFixPipeDtypeMap(); | 451 | return optional_infos_impl_->GetFixPipeDtypeMap(); |
| 466 | } | 452 | } |
| 467 | -__attribute__((visibility("default"))) void OptionalInfos::SetSocVersion(string soc_version) { | 453 | +void OptionalInfos::SetSocVersion(string soc_version) { |
| 468 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 454 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 469 | if (optional_infos_impl_ == nullptr) { | 455 | if (optional_infos_impl_ == nullptr) { |
| 470 | return; | 456 | return; |
| @@ -472,7 +458,7 @@ __attribute__((visibility("default"))) void OptionalInfos::SetSocVersion(string | |||
| 472 | optional_infos_impl_->SetSocVersion(soc_version); | 458 | optional_infos_impl_->SetSocVersion(soc_version); |
| 473 | } | 459 | } |
| 474 | 460 | ||
| 475 | -__attribute__((visibility("default"))) void OptionalInfos::SetSocVersionWithLock(string soc_version) { | 461 | +void OptionalInfos::SetSocVersionWithLock(string soc_version) { |
| 476 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 462 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 477 | if (optional_infos_impl_ == nullptr) { | 463 | if (optional_infos_impl_ == nullptr) { |
| 478 | return; | 464 | return; |
| @@ -480,7 +466,7 @@ __attribute__((visibility("default"))) void OptionalInfos::SetSocVersionWithLock | |||
| 480 | optional_infos_impl_->SetSocVersion(soc_version); | 466 | optional_infos_impl_->SetSocVersion(soc_version); |
| 481 | } | 467 | } |
| 482 | 468 | ||
| 483 | -__attribute__((visibility("default"))) void OptionalInfos::SetCoreType(string core_type) { | 469 | +void OptionalInfos::SetCoreType(string core_type) { |
| 484 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 470 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 485 | if (optional_infos_impl_ == nullptr) { | 471 | if (optional_infos_impl_ == nullptr) { |
| 486 | return; | 472 | return; |
| @@ -488,7 +474,7 @@ __attribute__((visibility("default"))) void OptionalInfos::SetCoreType(string co | |||
| 488 | optional_infos_impl_->SetCoreType(core_type); | 474 | optional_infos_impl_->SetCoreType(core_type); |
| 489 | } | 475 | } |
| 490 | 476 | ||
| 491 | -__attribute__((visibility("default"))) void OptionalInfos::SetAICoreNum(uint32_t ai_core_num) { | 477 | +void OptionalInfos::SetAICoreNum(uint32_t ai_core_num) { |
| 492 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 478 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 493 | if (optional_infos_impl_ == nullptr) { | 479 | if (optional_infos_impl_ == nullptr) { |
| 494 | return; | 480 | return; |
| @@ -496,7 +482,7 @@ __attribute__((visibility("default"))) void OptionalInfos::SetAICoreNum(uint32_t | |||
| 496 | optional_infos_impl_->SetAICoreNum(ai_core_num); | 482 | optional_infos_impl_->SetAICoreNum(ai_core_num); |
| 497 | } | 483 | } |
| 498 | 484 | ||
| 499 | -__attribute__((visibility("default"))) void OptionalInfos::SetL1FusionFlag(string l1_fusion_flag) { | 485 | +void OptionalInfos::SetL1FusionFlag(string l1_fusion_flag) { |
| 500 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); | 486 | std::lock_guard<std::mutex> lock_guard(opt_info_mutex); |
| 501 | if (optional_infos_impl_ == nullptr) { | 487 | if (optional_infos_impl_ == nullptr) { |
| 502 | return; | 488 | return; |
| @@ -29,7 +29,7 @@ const std::string STR_VECTOR_CORE_INTRINSIC_DTYPE_MAP = "VectorCoreintrinsicDtyp | |||
| 29 | const std::string SOC_VERSION_ASCEND910 = "Ascend910"; | 29 | const std::string SOC_VERSION_ASCEND910 = "Ascend910"; |
| 30 | const std::string SOC_VERSION_ASCEND910A = "Ascend910A"; | 30 | const std::string SOC_VERSION_ASCEND910A = "Ascend910A"; |
| 31 | 31 | ||
| 32 | -__attribute__((visibility("default"))) PlatformManagerV2 &PlatformManagerV2::Instance() { | 32 | +PlatformManagerV2 &PlatformManagerV2::Instance() { |
| 33 | static PlatformManagerV2 platform_info; | 33 | static PlatformManagerV2 platform_info; |
| 34 | return platform_info; | 34 | return platform_info; |
| 35 | } | 35 | } |
| @@ -247,8 +247,8 @@ int32_t PlatformManagerV2::GetPlatformInfos(const std::string &soc_version, fe:: | |||
| 247 | return PLATFORM_SUCCESS; | 247 | return PLATFORM_SUCCESS; |
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | -__attribute__((visibility("default"))) int32_t PlatformManagerV2::GetSocSpec(const std::string &soc_version, | 250 | +int32_t PlatformManagerV2::GetSocSpec(const std::string &soc_version, |
| 251 | - const std::string &label, const std::string &key, std::string &value) { | 251 | + const std::string &label, const std::string &key, std::string &value) { |
| 252 | PF_LOGD("Begin to get soc[%s] info: label[%s], key[%s].", soc_version.c_str(), label.c_str(), key.c_str()); | 252 | PF_LOGD("Begin to get soc[%s] info: label[%s], key[%s].", soc_version.c_str(), label.c_str(), key.c_str()); |
| 253 | fe::PlatFormInfos platform_info; | 253 | fe::PlatFormInfos platform_info; |
| 254 | auto ret = GetPlatformInfos(soc_version, platform_info); | 254 | auto ret = GetPlatformInfos(soc_version, platform_info); |