已合并
【PR】: 添加aclplatfrom的接口资料 #2941
【PR】: 添加aclplatfrom的接口资料 #2941
已合并
jiang-mingming01创建于 6月18日
5 个文件变更+218-45
@@ -1,6 +1,6 @@
1# 24. 其他接口1# 24. 其他接口
2 2 
3-本章节描述 CANN Runtime 的其他辅助接口,包括版本查询、数据类型转换等。3+本章节描述 CANN Runtime 的其他辅助接口,包括版本查询、数据类型转换、平台硬件信息查询等。
4 4 
5- [`size_t aclDataTypeSize(aclDataType dataType)`](#aclDataTypeSize):获取aclDataType数据的大小,单位Byte。5- [`size_t aclDataTypeSize(aclDataType dataType)`](#aclDataTypeSize):获取aclDataType数据的大小,单位Byte。
6- [`float aclFloat16ToFloat(aclFloat16 value)`](#aclFloat16ToFloat):将[aclFloat16](25_数据类型及其操作接口.md#aclFloat16)类型的数据转换为float(指float32)类型的数据。6- [`float aclFloat16ToFloat(aclFloat16 value)`](#aclFloat16ToFloat):将[aclFloat16](25_数据类型及其操作接口.md#aclFloat16)类型的数据转换为float(指float32)类型的数据。
@@ -15,6 +15,8 @@
15- [`aclError aclrtProfTrace(void *userdata, int32_t length, aclrtStream stream)`](#aclrtProfTrace):支持用户在网络指定位置下发自定义的Profiling打点。异步接口。15- [`aclError aclrtProfTrace(void *userdata, int32_t length, aclrtStream stream)`](#aclrtProfTrace):支持用户在网络指定位置下发自定义的Profiling打点。异步接口。
16- [`aclError aclsysGetVersionNum(char *pkgName, int32_t *versionNum)`](#aclsysGetVersionNum):根据软件包名称查询版本号,版本号是数值类型,通过计算各包安装目录下version.info文件中的version字段的主、次、补丁等版本信息的权重得出。16- [`aclError aclsysGetVersionNum(char *pkgName, int32_t *versionNum)`](#aclsysGetVersionNum):根据软件包名称查询版本号,版本号是数值类型,通过计算各包安装目录下version.info文件中的version字段的主、次、补丁等版本信息的权重得出。
17- [`aclError aclsysGetVersionStr(char *pkgName, char *versionStr)`](#aclsysGetVersionStr):根据软件包名称查询版本号,版本号是字符串类型,与各包安装目录下version.info文件中的version保持一致。17- [`aclError aclsysGetVersionStr(char *pkgName, char *versionStr)`](#aclsysGetVersionStr):根据软件包名称查询版本号,版本号是字符串类型,与各包安装目录下version.info文件中的version保持一致。
18+- [`aclError aclplatformGetDeviceInfo(aclplatformDevInfo infoType, char *value, uint32_t maxLen)`](#aclplatformGetDeviceInfo):查询对应AI处理器型号的硬件信息。
19+- [`aclError aclplatformGetInstructionInfo(aclplatformCoreType type, const char *instruction, char *value, uint32_t maxLen)`](#aclplatformGetInstructionInfo):根据核类型查询指定指令的相关属性信息。
18 20 
19 21 
20 22 
@@ -559,3 +561,90 @@ aclError aclsysGetVersionStr(char *pkgName, char *versionStr)
559 561 
560返回0表示成功,返回其他值表示失败,请参见[aclError](25_数据类型及其操作接口.md#aclError)。562返回0表示成功,返回其他值表示失败,请参见[aclError](25_数据类型及其操作接口.md#aclError)。
561 563 
564+ 
565+<br>
566+<br>
567+<br>
568+ 
569+ 
570+ 
571+<a id="aclplatformGetDeviceInfo"></a>
572+ 
573+## aclplatformGetDeviceInfo
574+ 
575+```c
576+aclError aclplatformGetDeviceInfo(aclplatformDevInfo infoType, char *value, uint32_t maxLen);
577+```
578+ 
579+### 产品支持情况
580+ 
581+ 
582+| 产品 | 是否支持 |
583+| --- | :---: |
584+| Ascend 950PR/Ascend 950DT | √ |
585+| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
586+| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
587+ 
588+### 功能说明
589+ 
590+查询对应AI处理器型号的硬件信息。
591+ 
592+### 参数说明
593+ 
594+ 
595+| 参数名 | 输入/输出 | 说明 |
596+| --- | :---: | --- |
597+| infoType | 输入 | 要查询的设备硬件信息类型。类型定义请参见[aclplatformDevInfo](25_数据类型及其操作接口.md#aclplatformDevInfo)。 |
598+| value | 输出 | 用于接收查询结果的字符缓冲区指针。返回内容以字符串形式给出,数值类信息(如大小、数量、频率)以十进制字符串表示。 |
599+| maxLen | 输入 | 用户申请的用于存放value的最大内存长度,单位Byte。<br>若实际结果超出此长度,接口将返回错误。 |
600+ 
601+### 返回值说明
602+ 
603+返回0表示成功,返回其他值表示失败,请参见[aclError](25_数据类型及其操作接口.md#aclError)。
604+ 
605+ 
606+<br>
607+<br>
608+<br>
609+ 
610+ 
611+ 
612+<a id="aclplatformGetInstructionInfo"></a>
613+ 
614+## aclplatformGetInstructionInfo
615+ 
616+```c
617+aclError aclplatformGetInstructionInfo(aclplatformCoreType type,
618+ const char *instruction,
619+ char *value,
620+ uint32_t maxLen);
621+```
622+ 
623+### 产品支持情况
624+ 
625+ 
626+| 产品 | 是否支持 |
627+| --- | :---: |
628+| Ascend 950PR/Ascend 950DT | √ |
629+| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
630+| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
631+ 
632+### 功能说明
633+ 
634+根据指定的核类型,查询某条指令的相关属性信息。
635+ 
636+该接口适用于查询当前NPU架构对特定指令的支持情况,以便应用程序根据查询结果选择合适的算法路径或特性开关。
637+ 
638+### 参数说明
639+ 
640+ 
641+| 参数名 | 输入/输出 | 说明 |
642+| --- | :---: | --- |
643+| type | 输入 | 要查询的核类型。类型定义请参见[aclplatformCoreType](25_数据类型及其操作接口.md#aclplatformCoreType)。 |
644+| instruction | 输入 | 要查询的指令名称字符串,如"Intrinsic_vexp"、"Intrinsic_vln"。<br>指令集可以参考对应AI处理器的配置文件,在${INSTALL_DIR}/{arch-os}/data/platform_config/目录下。<br>${INSTALL_DIR}请替换为CANN软件安装后文件存储路径。以root用户安装为例,安装后文件默认存储路径为:/usr/local/Ascend/cann。<br>{arch-os}中arch表示操作系统架构,os表示操作系统。 |
645+| value | 输出 | 用于接收查询结果的字符缓冲区指针。返回内容以字符串形式给出。 |
646+| maxLen | 输入 | 用户申请的用于存放value的最大内存长度,单位Byte。<br>若实际结果超出此长度,接口将返回错误。 |
647+ 
648+### 返回值说明
649+ 
650+返回0表示成功,返回其他值表示失败,请参见[aclError](25_数据类型及其操作接口.md#aclError)。
@@ -34,6 +34,9 @@
34- [aclmdlRIValueWaitTaskParams](#aclmdlRIValueWaitTaskParams)34- [aclmdlRIValueWaitTaskParams](#aclmdlRIValueWaitTaskParams)
35- [aclmdlRIValueWriteTaskParams](#aclmdlRIValueWriteTaskParams)35- [aclmdlRIValueWriteTaskParams](#aclmdlRIValueWriteTaskParams)
36- [aclMemType](#aclMemType)36- [aclMemType](#aclMemType)
37+- [aclplatformCoreType](#aclplatformCoreType)
38+- [aclplatformDevInfo](#aclplatformDevInfo)
39+- [aclplatformLocalMemType](#aclplatformLocalMemType)
37- [aclprofAicoreMetrics](#aclprofAicoreMetrics)40- [aclprofAicoreMetrics](#aclprofAicoreMetrics)
38- [aclprofConfig](#aclprofConfig)41- [aclprofConfig](#aclprofConfig)
39 - [`aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, aclprofAicoreMetrics aicoreMetrics, const aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig)`](#aclprofCreateConfig):创建aclprofConfig类型的数据,表示创建Profiling配置数据。42 - [`aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, aclprofAicoreMetrics aicoreMetrics, const aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig)`](#aclprofCreateConfig):创建aclprofConfig类型的数据,表示创建Profiling配置数据。
@@ -1405,6 +1408,120 @@ ACL\_MEMTYPE\_HOST和ACL\_MEMTYPE\_HOST\_COMPILE\_INDEPENDENT都标识Host内存
1405 1408 
1406 1409 
1407 1410 
1411+<a id="aclplatformCoreType"></a>
1412+ 
1413+## aclplatformCoreType
1414+ 
1415+```c
1416+typedef enum aclplatformCoreType {
1417+ ACL_PLATFORM_CORE_TYPE_AI_CORE = 0,
1418+ ACL_PLATFORM_CORE_TYPE_VECTOR_CORE = 1,
1419+} aclplatformCoreType;
1420+```
1421+ 
1422+ 
1423+| 枚举项 | 说明 |
1424+| --- | --- |
1425+| ACL_PLATFORM_CORE_TYPE_AI_CORE | Cube Core,负责矩阵乘等高算力运算。 |
1426+| ACL_PLATFORM_CORE_TYPE_VECTOR_CORE | Vector Core,负责向量及标量类运算。 |
1427+ 
1428+ 
1429+<br>
1430+<br>
1431+<br>
1432+ 
1433+ 
1434+ 
1435+<a id="aclplatformDevInfo"></a>
1436+ 
1437+## aclplatformDevInfo
1438+ 
1439+```c
1440+typedef enum aclplatformDevInfo {
1441+ ACL_PLATFORM_AICORE_CNT = 0,
1442+ ACL_PLATFORM_AICORE_UB_SIZE = 1,
1443+ ACL_PLATFORM_CUBE_CORE_CNT = 2,
1444+ ACL_PLATFORM_VECTOR_CORE_CNT = 3,
1445+ ACL_PLATFORM_L2_SIZE = 4,
1446+ ACL_PLATFORM_MEMORY_SIZE = 5,
1447+ ACL_PLATFORM_CUBE_FREQ = 6,
1448+ ACL_PLATFORM_VEC_FREQ = 7,
1449+ ACL_PLATFORM_BT_SIZE = 8,
1450+ ACL_PLATFORM_L0_A_SIZE = 9,
1451+ ACL_PLATFORM_L0_B_SIZE = 10,
1452+ ACL_PLATFORM_L0_C_SIZE = 11,
1453+ ACL_PLATFORM_L1_SIZE = 12,
1454+ ACL_PLATFORM_SHORT_SOC_VERSION = 13,
1455+ ACL_PLATFORM_SOC_VERSION = 14,
1456+ ACL_PLATFORM_AIC_VERSION = 15,
1457+ ACL_PLATFORM_NPU_ARCH = 16,
1458+ ACL_PLATFORM_MEMORY_TYPE = 17,
1459+} aclplatformDevInfo;
1460+```
1461+ 
1462+ 
1463+| 枚举项 | 说明 |
1464+| --- | --- |
1465+| ACL_PLATFORM_AICORE_CNT | AI Core的数量。 |
1466+| ACL_PLATFORM_AICORE_UB_SIZE | 单个AI Core的UB(Unified Buffer)大小,单位Byte。 |
1467+| ACL_PLATFORM_CUBE_CORE_CNT | Cube Core的数量。 |
1468+| ACL_PLATFORM_VECTOR_CORE_CNT | Vector Core的数量。 |
1469+| ACL_PLATFORM_L2_SIZE | L2 Cache的大小,单位Byte。 |
1470+| ACL_PLATFORM_MEMORY_SIZE | 设备内存大小,单位Byte。 |
1471+| ACL_PLATFORM_CUBE_FREQ | Cube Core的工作频率,单位MHz。 |
1472+| ACL_PLATFORM_VEC_FREQ | Vector Core的工作频率,单位MHz。 |
1473+| ACL_PLATFORM_BT_SIZE | Base Tile基础分块大小,单位Byte。 |
1474+| ACL_PLATFORM_L0_A_SIZE | L0-A缓冲区大小,单位Byte。用于Cube Core矩阵运算的左矩阵输入缓存。 |
1475+| ACL_PLATFORM_L0_B_SIZE | L0-B缓冲区大小,单位Byte。用于Cube Core矩阵运算的右矩阵输入缓存。 |
1476+| ACL_PLATFORM_L0_C_SIZE | L0-C缓冲区大小,单位Byte。用于Cube Core矩阵运算的输出结果缓存。 |
1477+| ACL_PLATFORM_L1_SIZE | L1缓冲区大小,单位Byte。 |
1478+| ACL_PLATFORM_SHORT_SOC_VERSION | AI处理器系列名称。 |
1479+| ACL_PLATFORM_SOC_VERSION | AI处理器型号名称。 |
1480+| ACL_PLATFORM_AIC_VERSION | AI Core版本字符串。 |
1481+| ACL_PLATFORM_NPU_ARCH | NPU架构版本。<br><br> Ascend 950PR/Ascend 950DT对应NPU架构版本为3510,Atlas A3训练系列产品/Atlas A3推理系列产品对应NPU架构版本为2201,Atlas A2训练系列产品/Atlas A2推理系列产品对应NPU架构版本为2201。 |
1482+| ACL_PLATFORM_MEMORY_TYPE | 设备内存类型,返回值对应[aclplatformLocalMemType](#aclplatformLocalMemType)枚举的整数表示。 |
1483+ 
1484+ 
1485+<br>
1486+<br>
1487+<br>
1488+ 
1489+ 
1490+ 
1491+<a id="aclplatformLocalMemType"></a>
1492+ 
1493+## aclplatformLocalMemType
1494+ 
1495+```cpp
1496+enum class aclplatformLocalMemType {
1497+ L0_A = 0,
1498+ L0_B = 1,
1499+ L0_C = 2,
1500+ L1 = 3,
1501+ L2 = 4,
1502+ UB = 5,
1503+ HBM = 6
1504+};
1505+```
1506+ 
1507+ 
1508+| 枚举项 | 说明 |
1509+| --- | --- |
1510+| L0_A | AI Core内部物理存储单元,通常用于存储矩阵计算的左矩阵。 |
1511+| L0_B | AI Core内部物理存储单元,通常用于存储矩阵计算的右矩阵。 |
1512+| L0_C | AI Core内部物理存储单元,通常用于存储矩阵计算的结果。 |
1513+| L1 | AI Core内部物理存储单元,空间相对较大,通常用于缓存矩阵计算的输入数据。 |
1514+| L2 | 二级缓存,专门用于存储频繁访问的数据,以便减少对Global Memory的读写。 |
1515+| UB | AI Core内部存储单元,主要用于矢量计算。 |
1516+| HBM | 设备HBM(高带宽内存)。 |
1517+ 
1518+ 
1519+<br>
1520+<br>
1521+<br>
1522+ 
1523+ 
1524+ 
1408<a id="aclprofAicoreMetrics"></a>1525<a id="aclprofAicoreMetrics"></a>
1409 1526 
1410## aclprofAicoreMetrics1527## aclprofAicoreMetrics
@@ -60,39 +60,6 @@ aclError aclplatformGetInstructionInfo(aclplatformCoreType type,
60 char *value,60 char *value,
61 uint32_t maxLen);61 uint32_t maxLen);
62 62 
63-enum class aclplatformNpuArch : uint32_t {
64- DAV_1001 = 1001,
65- DAV_1002 = 1002,
66- DAV_1003 = 1003,
67- DAV_1004 = 1004,
68- DAV_1999 = 1999,
69- DAV_2002 = 2002,
70- DAV_2003 = 2003,
71- DAV_2004 = 2004,
72- DAV_2006 = 2006,
73- DAV_2102 = 2102,
74- DAV_2103 = 2103,
75- DAV_2104 = 2104,
76- DAV_2201 = 2201,
77- DAV_3002 = 3002,
78- DAV_3003 = 3003,
79- DAV_3004 = 3004,
80- DAV_3102 = 3102,
81- DAV_3103 = 3103,
82- DAV_3113 = 3113,
83- DAV_3502 = 3502,
84- DAV_3505 = 3505,
85- DAV_3510 = 3510,
86- DAV_3801 = 3801,
87- DAV_5101 = 5101,
88- DAV_5102 = 5102,
89- DAV_5161 = 5161,
90- DAV_9201 = 9201,
91- DAV_9202 = 9202,
92- DAV_9301 = 9301,
93- DAV_RESV = 0xFFFF
94-};
95- 
96// --------------------------------------------------------------------------63// --------------------------------------------------------------------------
97// Mapping: aclplatformDevInfo enum value → (ini section, ini key)64// Mapping: aclplatformDevInfo enum value → (ini section, ini key)
98// Indexed by enum value; order MUST match aclplatformDevInfo definition.65// Indexed by enum value; order MUST match aclplatformDevInfo definition.
@@ -127,7 +127,7 @@ aclError aclplatformGetDeviceInfo(aclplatformDevInfo infoType, char *value, uint
127 // --- obtain platform info ---127 // --- obtain platform info ---
128 fe::PlatFormInfos platform_infos;128 fe::PlatFormInfos platform_infos;
129 if (!GetPlatFormInfos(platform_infos)) {129 if (!GetPlatFormInfos(platform_infos)) {
130- return ACL_ERROR_OP_NOT_FOUND;130+ return ACL_ERROR_INTERNAL_ERROR;
131 }131 }
132 132 
133 // --- query the value ---133 // --- query the value ---
@@ -137,11 +137,11 @@ aclError aclplatformGetDeviceInfo(aclplatformDevInfo infoType, char *value, uint
137 137 
138 if (!platform_infos.GetPlatformResWithLock(section, key, result)) {138 if (!platform_infos.GetPlatformResWithLock(section, key, result)) {
139 PF_LOGE("aclplatformGetDeviceInfo: key [%s/%s] not found.", section.c_str(), key.c_str());139 PF_LOGE("aclplatformGetDeviceInfo: key [%s/%s] not found.", section.c_str(), key.c_str());
140- return ACL_ERROR_OP_NOT_FOUND;140+ return ACL_ERROR_INVALID_PARAM;
141 }141 }
142 if (result.empty()) {142 if (result.empty()) {
143 PF_LOGE("aclplatformGetDeviceInfo: empty result for key [%s/%s].", section.c_str(), key.c_str());143 PF_LOGE("aclplatformGetDeviceInfo: empty result for key [%s/%s].", section.c_str(), key.c_str());
144- return ACL_ERROR_OP_NOT_FOUND;144+ return ACL_ERROR_INVALID_PARAM;
145 }145 }
146 146 
147 PF_LOGI("aclplatformGetDeviceInfo: [%s, %s] = %s.", section.c_str(), key.c_str(), result.c_str());147 PF_LOGI("aclplatformGetDeviceInfo: [%s, %s] = %s.", section.c_str(), key.c_str(), result.c_str());
@@ -174,7 +174,7 @@ aclError aclplatformGetInstructionInfo(aclplatformCoreType type,
174 // --- obtain platform info ---174 // --- obtain platform info ---
175 fe::PlatFormInfos platform_infos;175 fe::PlatFormInfos platform_infos;
176 if (!GetPlatFormInfos(platform_infos)) {176 if (!GetPlatFormInfos(platform_infos)) {
177- return ACL_ERROR_OP_NOT_FOUND;177+ return ACL_ERROR_INTERNAL_ERROR;
178 }178 }
179 179 
180 // --- query intrinsic dtype map ---180 // --- query intrinsic dtype map ---
@@ -191,7 +191,7 @@ aclError aclplatformGetInstructionInfo(aclplatformCoreType type,
191 if (it == intrinsic_map.end() || it->second.empty()) {191 if (it == intrinsic_map.end() || it->second.empty()) {
192 PF_LOGE("aclplatformGetInstructionInfo: instruction [%s] not found for core type %d.",192 PF_LOGE("aclplatformGetInstructionInfo: instruction [%s] not found for core type %d.",
193 instruction, static_cast<int>(type));193 instruction, static_cast<int>(type));
194- return ACL_ERROR_OP_NOT_FOUND;194+ return ACL_ERROR_INVALID_PARAM;
195 }195 }
196 196 
197 // --- join dtypes with "," ---197 // --- join dtypes with "," ---
@@ -126,7 +126,7 @@ TEST_F(PlatformManagerAclUTest, acl_platform_GetDeviceInfo_VEC_FREQ)
126 // Ascend910B1 has no independent VectorCoreSpec section → vec_freq not found126 // Ascend910B1 has no independent VectorCoreSpec section → vec_freq not found
127 char buf[64] = {0};127 char buf[64] = {0};
128 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_VEC_FREQ, buf, sizeof(buf));128 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_VEC_FREQ, buf, sizeof(buf));
129- EXPECT_EQ(ret, ACL_ERROR_OP_NOT_FOUND);129+ EXPECT_EQ(ret, ACL_ERROR_INVALID_PARAM);
130}130}
131 131 
132TEST_F(PlatformManagerAclUTest, acl_platform_GetDeviceInfo_BT_SIZE)132TEST_F(PlatformManagerAclUTest, acl_platform_GetDeviceInfo_BT_SIZE)
@@ -206,7 +206,7 @@ TEST_F(PlatformManagerAclUTest, acl_platform_GetDeviceInfo_MEMORY_TYPE)
206 // Ascend910B1.ini has empty memory_type → returns not found206 // Ascend910B1.ini has empty memory_type → returns not found
207 char buf[64] = {0};207 char buf[64] = {0};
208 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_MEMORY_TYPE, buf, sizeof(buf));208 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_MEMORY_TYPE, buf, sizeof(buf));
209- EXPECT_EQ(ret, ACL_ERROR_OP_NOT_FOUND);209+ EXPECT_EQ(ret, ACL_ERROR_INVALID_PARAM);
210}210}
211 211 
212// ============================================================================212// ============================================================================
@@ -330,7 +330,7 @@ TEST_F(PlatformManagerAclUTest, acl_platform_GetInstructionInfo_not_found)
330 char buf[256] = {0};330 char buf[256] = {0};
331 aclError ret = aclplatformGetInstructionInfo(ACL_PLATFORM_CORE_TYPE_AI_CORE,331 aclError ret = aclplatformGetInstructionInfo(ACL_PLATFORM_CORE_TYPE_AI_CORE,
332 "Intrinsic_NotExist", buf, sizeof(buf));332 "Intrinsic_NotExist", buf, sizeof(buf));
333- EXPECT_EQ(ret, ACL_ERROR_OP_NOT_FOUND);333+ EXPECT_EQ(ret, ACL_ERROR_INVALID_PARAM);
334}334}
335 335 
336TEST_F(PlatformManagerAclUTest, acl_platform_GetInstructionInfo_buffer_too_small)336TEST_F(PlatformManagerAclUTest, acl_platform_GetInstructionInfo_buffer_too_small)
@@ -423,7 +423,7 @@ TEST_F(PlatformManagerAclUTest, GetPlatFormInfos_Step4_GeInstance_OptionalInfos)
423 PlatformInfoManager::GeInstance().Finalize();423 PlatformInfoManager::GeInstance().Finalize();
424}424}
425 425 
426-// ---- All 4 steps fail: returns ACL_ERROR_OP_NOT_FOUND ----426+// ---- All 4 steps fail: returns ACL_ERROR_INTERNAL_ERROR ----
427TEST_F(PlatformManagerAclUTest, GetPlatFormInfos_AllFail)427TEST_F(PlatformManagerAclUTest, GetPlatFormInfos_AllFail)
428{428{
429 // Wipe Instance completely429 // Wipe Instance completely
@@ -439,7 +439,7 @@ TEST_F(PlatformManagerAclUTest, GetPlatFormInfos_AllFail)
439 // GeInstance is uninitialized → all 4 steps fail439 // GeInstance is uninitialized → all 4 steps fail
440 char buf[64] = {0};440 char buf[64] = {0};
441 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_AICORE_CNT, buf, sizeof(buf));441 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_AICORE_CNT, buf, sizeof(buf));
442- EXPECT_EQ(ret, ACL_ERROR_OP_NOT_FOUND);442+ EXPECT_EQ(ret, ACL_ERROR_INTERNAL_ERROR);
443}443}
444 444 
445// ---- Instance OptionalInfos cleared, only GeInstance OptionalInfos set ----445// ---- Instance OptionalInfos cleared, only GeInstance OptionalInfos set ----
@@ -458,7 +458,7 @@ TEST_F(PlatformManagerAclUTest, GetPlatFormInfos_FallbackToGeInstance_OnlyOption
458 // GeInstance not set up → steps 1-4 all fail458 // GeInstance not set up → steps 1-4 all fail
459 char buf[64] = {0};459 char buf[64] = {0};
460 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_AICORE_CNT, buf, sizeof(buf));460 aclError ret = aclplatformGetDeviceInfo(ACL_PLATFORM_AICORE_CNT, buf, sizeof(buf));
461- EXPECT_EQ(ret, ACL_ERROR_OP_NOT_FOUND);461+ EXPECT_EQ(ret, ACL_ERROR_INTERNAL_ERROR);
462}462}
463 463 
464} // namespace fe464} // namespace fe