1be168c0dSopenharmony_ci/**
2be168c0dSopenharmony_ci * Copyright 2021 Huawei Technologies Co., Ltd
3be168c0dSopenharmony_ci *
4be168c0dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
5be168c0dSopenharmony_ci * you may not use this file except in compliance with the License.
6be168c0dSopenharmony_ci * You may obtain a copy of the License at
7be168c0dSopenharmony_ci *
8be168c0dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0
9be168c0dSopenharmony_ci *
10be168c0dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
11be168c0dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
12be168c0dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13be168c0dSopenharmony_ci * See the License for the specific language governing permissions and
14be168c0dSopenharmony_ci * limitations under the License.
15be168c0dSopenharmony_ci */
16be168c0dSopenharmony_ci
17be168c0dSopenharmony_ci/**
18be168c0dSopenharmony_ci * @addtogroup MindSpore
19be168c0dSopenharmony_ci * @{
20be168c0dSopenharmony_ci *
21be168c0dSopenharmony_ci * @brief 提供MindSpore Lite的模型推理相关接口。
22be168c0dSopenharmony_ci *
23be168c0dSopenharmony_ci * @Syscap SystemCapability.Ai.MindSpore
24be168c0dSopenharmony_ci * @since 9
25be168c0dSopenharmony_ci */
26be168c0dSopenharmony_ci
27be168c0dSopenharmony_ci/**
28be168c0dSopenharmony_ci * @file context.h
29be168c0dSopenharmony_ci *
30be168c0dSopenharmony_ci * @brief 提供了Context相关的接口,可以配置运行时信息。
31be168c0dSopenharmony_ci *
32be168c0dSopenharmony_ci * @library libmindspore_lite_ndk.so
33be168c0dSopenharmony_ci * @since 9
34be168c0dSopenharmony_ci */
35be168c0dSopenharmony_ci#ifndef MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
36be168c0dSopenharmony_ci#define MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
37be168c0dSopenharmony_ci
38be168c0dSopenharmony_ci#include <stddef.h>
39be168c0dSopenharmony_ci#include <stdint.h>
40be168c0dSopenharmony_ci#include <stdbool.h>
41be168c0dSopenharmony_ci#include "mindspore/types.h"
42be168c0dSopenharmony_ci#include "mindspore/status.h"
43be168c0dSopenharmony_ci
44be168c0dSopenharmony_ci#ifdef __cplusplus
45be168c0dSopenharmony_ciextern "C" {
46be168c0dSopenharmony_ci#endif
47be168c0dSopenharmony_ci
48be168c0dSopenharmony_citypedef void *OH_AI_ContextHandle;
49be168c0dSopenharmony_citypedef void *OH_AI_DeviceInfoHandle;
50be168c0dSopenharmony_ci
51be168c0dSopenharmony_ci/**
52be168c0dSopenharmony_ci * @brief Create a context object.
53be168c0dSopenharmony_ci * @return Context object handle.
54be168c0dSopenharmony_ci * @since 9
55be168c0dSopenharmony_ci */
56be168c0dSopenharmony_ciOH_AI_API OH_AI_ContextHandle OH_AI_ContextCreate();
57be168c0dSopenharmony_ci
58be168c0dSopenharmony_ci/**
59be168c0dSopenharmony_ci * @brief Destroy the context object.
60be168c0dSopenharmony_ci * @param context Context object handle address.
61be168c0dSopenharmony_ci * @since 9
62be168c0dSopenharmony_ci */
63be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextDestroy(OH_AI_ContextHandle *context);
64be168c0dSopenharmony_ci
65be168c0dSopenharmony_ci/**
66be168c0dSopenharmony_ci * @brief Set the number of threads at runtime.
67be168c0dSopenharmony_ci * @param context Context object handle.
68be168c0dSopenharmony_ci * @param thread_num the number of threads at runtime.
69be168c0dSopenharmony_ci * @since 9
70be168c0dSopenharmony_ci */
71be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextSetThreadNum(OH_AI_ContextHandle context, int32_t thread_num);
72be168c0dSopenharmony_ci
73be168c0dSopenharmony_ci/**
74be168c0dSopenharmony_ci * @brief Obtain the current thread number setting.
75be168c0dSopenharmony_ci * @param context Context object handle.
76be168c0dSopenharmony_ci * @return The current thread number setting.
77be168c0dSopenharmony_ci * @since 9
78be168c0dSopenharmony_ci */
79be168c0dSopenharmony_ciOH_AI_API int32_t OH_AI_ContextGetThreadNum(const OH_AI_ContextHandle context);
80be168c0dSopenharmony_ci
81be168c0dSopenharmony_ci/**
82be168c0dSopenharmony_ci * @brief Set the thread affinity to CPU cores.
83be168c0dSopenharmony_ci * @param context Context object handle.
84be168c0dSopenharmony_ci * @param mode: 0: no affinities, 1: big cores first, 2: little cores first
85be168c0dSopenharmony_ci * @since 9
86be168c0dSopenharmony_ci */
87be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextSetThreadAffinityMode(OH_AI_ContextHandle context, int mode);
88be168c0dSopenharmony_ci
89be168c0dSopenharmony_ci/**
90be168c0dSopenharmony_ci * @brief Obtain the thread affinity of CPU cores.
91be168c0dSopenharmony_ci * @param context Context object handle.
92be168c0dSopenharmony_ci * @return Thread affinity to CPU cores. 0: no affinities, 1: big cores first, 2: little cores first
93be168c0dSopenharmony_ci * @since 9
94be168c0dSopenharmony_ci */
95be168c0dSopenharmony_ciOH_AI_API int OH_AI_ContextGetThreadAffinityMode(const OH_AI_ContextHandle context);
96be168c0dSopenharmony_ci
97be168c0dSopenharmony_ci/**
98be168c0dSopenharmony_ci * @brief Set the thread lists to CPU cores.
99be168c0dSopenharmony_ci *
100be168c0dSopenharmony_ci * If core_list and mode are set by OH_AI_ContextSetThreadAffinityMode at the same time,
101be168c0dSopenharmony_ci * the core_list is effective, but the mode is not effective. \n
102be168c0dSopenharmony_ci *
103be168c0dSopenharmony_ci * @param context Context object handle.
104be168c0dSopenharmony_ci * @param core_list: a array of thread core lists.
105be168c0dSopenharmony_ci * @param core_num The number of core.
106be168c0dSopenharmony_ci * @since 9
107be168c0dSopenharmony_ci */
108be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextSetThreadAffinityCoreList(OH_AI_ContextHandle context, const int32_t *core_list,
109be168c0dSopenharmony_ci                                                      size_t core_num);
110be168c0dSopenharmony_ci
111be168c0dSopenharmony_ci/**
112be168c0dSopenharmony_ci * @brief Obtain the thread lists of CPU cores.
113be168c0dSopenharmony_ci * @param context Context object handle.
114be168c0dSopenharmony_ci * @param core_num The number of core.
115be168c0dSopenharmony_ci * @return a array of thread core lists.
116be168c0dSopenharmony_ci * @since 9
117be168c0dSopenharmony_ci */
118be168c0dSopenharmony_ciOH_AI_API const int32_t *OH_AI_ContextGetThreadAffinityCoreList(const OH_AI_ContextHandle context, size_t *core_num);
119be168c0dSopenharmony_ci
120be168c0dSopenharmony_ci/**
121be168c0dSopenharmony_ci * @brief Set the status whether to perform model inference or training in parallel.
122be168c0dSopenharmony_ci * @param context Context object handle.
123be168c0dSopenharmony_ci * @param is_parallel: true, parallel; false, not in parallel.
124be168c0dSopenharmony_ci * @since 9
125be168c0dSopenharmony_ci */
126be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextSetEnableParallel(OH_AI_ContextHandle context, bool is_parallel);
127be168c0dSopenharmony_ci
128be168c0dSopenharmony_ci/**
129be168c0dSopenharmony_ci * @brief Obtain the status whether to perform model inference or training in parallel.
130be168c0dSopenharmony_ci * @param context Context object handle.
131be168c0dSopenharmony_ci * @return Bool value that indicates whether in parallel.
132be168c0dSopenharmony_ci * @since 9
133be168c0dSopenharmony_ci */
134be168c0dSopenharmony_ciOH_AI_API bool OH_AI_ContextGetEnableParallel(const OH_AI_ContextHandle context);
135be168c0dSopenharmony_ci
136be168c0dSopenharmony_ci/**
137be168c0dSopenharmony_ci * @brief Add device info to context object.
138be168c0dSopenharmony_ci * @param context Context object handle.
139be168c0dSopenharmony_ci * @param device_info Device info object handle.
140be168c0dSopenharmony_ci * @since 9
141be168c0dSopenharmony_ci */
142be168c0dSopenharmony_ciOH_AI_API void OH_AI_ContextAddDeviceInfo(OH_AI_ContextHandle context, OH_AI_DeviceInfoHandle device_info);
143be168c0dSopenharmony_ci
144be168c0dSopenharmony_ci/**
145be168c0dSopenharmony_ci * @brief Create a device info object.
146be168c0dSopenharmony_ci * @param device_info Device info object handle.
147be168c0dSopenharmony_ci * @return Device info object handle.
148be168c0dSopenharmony_ci * @since 9
149be168c0dSopenharmony_ci */
150be168c0dSopenharmony_ciOH_AI_API OH_AI_DeviceInfoHandle OH_AI_DeviceInfoCreate(OH_AI_DeviceType device_type);
151be168c0dSopenharmony_ci
152be168c0dSopenharmony_ci/**
153be168c0dSopenharmony_ci * @brief Destroy the device info object.
154be168c0dSopenharmony_ci * @param device_info Device info object handle address.
155be168c0dSopenharmony_ci * @since 9
156be168c0dSopenharmony_ci */
157be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoDestroy(OH_AI_DeviceInfoHandle *device_info);
158be168c0dSopenharmony_ci
159be168c0dSopenharmony_ci/**
160be168c0dSopenharmony_ci * @brief Set provider's name.
161be168c0dSopenharmony_ci * @param device_info Device info object handle.
162be168c0dSopenharmony_ci * @param provider define the provider's name.
163be168c0dSopenharmony_ci * @since 9
164be168c0dSopenharmony_ci */
165be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetProvider(OH_AI_DeviceInfoHandle device_info, const char *provider);
166be168c0dSopenharmony_ci
167be168c0dSopenharmony_ci/**
168be168c0dSopenharmony_ci * @brief Obtain provider's name
169be168c0dSopenharmony_ci * @param device_info Device info object handle.
170be168c0dSopenharmony_ci * @return provider's name.
171be168c0dSopenharmony_ci * @since 9
172be168c0dSopenharmony_ci */
173be168c0dSopenharmony_ciOH_AI_API const char *OH_AI_DeviceInfoGetProvider(const OH_AI_DeviceInfoHandle device_info);
174be168c0dSopenharmony_ci
175be168c0dSopenharmony_ci/**
176be168c0dSopenharmony_ci * @brief Set provider's device type.
177be168c0dSopenharmony_ci * @param device_info Device info object handle.
178be168c0dSopenharmony_ci * @param device define the provider's device type. EG: CPU.
179be168c0dSopenharmony_ci * @since 9
180be168c0dSopenharmony_ci */
181be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetProviderDevice(OH_AI_DeviceInfoHandle device_info, const char *device);
182be168c0dSopenharmony_ci
183be168c0dSopenharmony_ci/**
184be168c0dSopenharmony_ci * @brief Obtain provider's device type.
185be168c0dSopenharmony_ci * @param device_info Device info object handle.
186be168c0dSopenharmony_ci * @return provider's device type.
187be168c0dSopenharmony_ci * @since 9
188be168c0dSopenharmony_ci */
189be168c0dSopenharmony_ciOH_AI_API const char *OH_AI_DeviceInfoGetProviderDevice(const OH_AI_DeviceInfoHandle device_info);
190be168c0dSopenharmony_ci
191be168c0dSopenharmony_ci/**
192be168c0dSopenharmony_ci * @brief Obtain the device type of the device info.
193be168c0dSopenharmony_ci * @param device_info Device info object handle.
194be168c0dSopenharmony_ci * @return Device Type of the device info.
195be168c0dSopenharmony_ci * @since 9
196be168c0dSopenharmony_ci */
197be168c0dSopenharmony_ciOH_AI_API OH_AI_DeviceType OH_AI_DeviceInfoGetDeviceType(const OH_AI_DeviceInfoHandle device_info);
198be168c0dSopenharmony_ci
199be168c0dSopenharmony_ci/**
200be168c0dSopenharmony_ci * @brief Set enables to perform the float16 inference, Only valid for CPU/GPU.
201be168c0dSopenharmony_ci * @param device_info Device info object handle.
202be168c0dSopenharmony_ci * @param is_fp16 Enable float16 inference or not.
203be168c0dSopenharmony_ci * @since 9
204be168c0dSopenharmony_ci */
205be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetEnableFP16(OH_AI_DeviceInfoHandle device_info, bool is_fp16);
206be168c0dSopenharmony_ci
207be168c0dSopenharmony_ci/**
208be168c0dSopenharmony_ci * @brief Obtain enables to perform the float16 inference, Only valid for CPU/GPU.
209be168c0dSopenharmony_ci * @param device_info Device info object handle.
210be168c0dSopenharmony_ci * @return Whether enable float16 inference.
211be168c0dSopenharmony_ci * @since 9
212be168c0dSopenharmony_ci */
213be168c0dSopenharmony_ciOH_AI_API bool OH_AI_DeviceInfoGetEnableFP16(const OH_AI_DeviceInfoHandle device_info);
214be168c0dSopenharmony_ci
215be168c0dSopenharmony_ci/**
216be168c0dSopenharmony_ci * @brief Set the NPU frequency, Only valid for NPU.
217be168c0dSopenharmony_ci * @param device_info Device info object handle.
218be168c0dSopenharmony_ci * @param frequency Can be set to 1 (low power consumption), 2 (balanced), 3 (high performance), 4 (extreme
219be168c0dSopenharmony_ci *        performance), default as 3.
220be168c0dSopenharmony_ci * @since 9
221be168c0dSopenharmony_ci */
222be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetFrequency(OH_AI_DeviceInfoHandle device_info, int frequency);
223be168c0dSopenharmony_ci
224be168c0dSopenharmony_ci/**
225be168c0dSopenharmony_ci * @brief Obtain the NPU frequency, Only valid for NPU.
226be168c0dSopenharmony_ci * @param device_info Device info object handle.
227be168c0dSopenharmony_ci * @return NPU frequency
228be168c0dSopenharmony_ci * @since 9
229be168c0dSopenharmony_ci */
230be168c0dSopenharmony_ciOH_AI_API int OH_AI_DeviceInfoGetFrequency(const OH_AI_DeviceInfoHandle device_info);
231be168c0dSopenharmony_ci
232be168c0dSopenharmony_ci/**
233be168c0dSopenharmony_ci * @brief Obtain the all device descriptions in NNRT.
234be168c0dSopenharmony_ci * @param num Number of NNRT device description.
235be168c0dSopenharmony_ci * @return NNRT device description array.
236be168c0dSopenharmony_ci * @since 10
237be168c0dSopenharmony_ci */
238be168c0dSopenharmony_ciOH_AI_API NNRTDeviceDesc *OH_AI_GetAllNNRTDeviceDescs(size_t *num);
239be168c0dSopenharmony_ci
240be168c0dSopenharmony_ci/**
241be168c0dSopenharmony_ci * @brief Obtain the specified element in NNRt device description array.
242be168c0dSopenharmony_ci * @param descs NNRT device description array.
243be168c0dSopenharmony_ci * @param index Element index.
244be168c0dSopenharmony_ci * @return NNRT device description.
245be168c0dSopenharmony_ci * @since 10
246be168c0dSopenharmony_ci */
247be168c0dSopenharmony_ciOH_AI_API NNRTDeviceDesc *OH_AI_GetElementOfNNRTDeviceDescs(NNRTDeviceDesc *descs, size_t index);
248be168c0dSopenharmony_ci
249be168c0dSopenharmony_ci/**
250be168c0dSopenharmony_ci * @brief Destroy the NNRT device descriptions returned by OH_AI_NNRTGetAllDeviceDescs().
251be168c0dSopenharmony_ci * @param desc NNRT device description array.
252be168c0dSopenharmony_ci * @since 10
253be168c0dSopenharmony_ci */
254be168c0dSopenharmony_ciOH_AI_API void OH_AI_DestroyAllNNRTDeviceDescs(NNRTDeviceDesc **desc);
255be168c0dSopenharmony_ci
256be168c0dSopenharmony_ci/**
257be168c0dSopenharmony_ci * @brief Obtain the device id in NNRT device description.
258be168c0dSopenharmony_ci * @param desc pointer to the NNRT device description instance.
259be168c0dSopenharmony_ci * @return NNRT device id.
260be168c0dSopenharmony_ci * @since 10
261be168c0dSopenharmony_ci */
262be168c0dSopenharmony_ciOH_AI_API size_t OH_AI_GetDeviceIdFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
263be168c0dSopenharmony_ci
264be168c0dSopenharmony_ci/**
265be168c0dSopenharmony_ci * @brief Obtain the device name in NNRT device description.
266be168c0dSopenharmony_ci * @param desc pointer to the NNRT device description instance.
267be168c0dSopenharmony_ci * @return NNRT device name.
268be168c0dSopenharmony_ci * @since 10
269be168c0dSopenharmony_ci */
270be168c0dSopenharmony_ciOH_AI_API const char *OH_AI_GetNameFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
271be168c0dSopenharmony_ci
272be168c0dSopenharmony_ci/**
273be168c0dSopenharmony_ci * @brief Obtain the device type in NNRT device description.
274be168c0dSopenharmony_ci * @param desc pointer to the NNRT device description instance.
275be168c0dSopenharmony_ci * @return NNRT device type.
276be168c0dSopenharmony_ci * @since 10
277be168c0dSopenharmony_ci */
278be168c0dSopenharmony_ciOH_AI_API OH_AI_NNRTDeviceType OH_AI_GetTypeFromNNRTDeviceDesc(const NNRTDeviceDesc *desc);
279be168c0dSopenharmony_ci
280be168c0dSopenharmony_ci/**
281be168c0dSopenharmony_ci * @brief Create the NNRT device info by exactly matching the specific device name.
282be168c0dSopenharmony_ci * @param name NNRt device name.
283be168c0dSopenharmony_ci * @return Device info object handle.
284be168c0dSopenharmony_ci * @since 10
285be168c0dSopenharmony_ci */
286be168c0dSopenharmony_ciOH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByName(const char *name);
287be168c0dSopenharmony_ci
288be168c0dSopenharmony_ci/**
289be168c0dSopenharmony_ci * @brief Create the NNRT device info by finding the first device with the specific device type.
290be168c0dSopenharmony_ci * @param name NNRt device type.
291be168c0dSopenharmony_ci * @return Device info object handle.
292be168c0dSopenharmony_ci * @since 10
293be168c0dSopenharmony_ci */
294be168c0dSopenharmony_ciOH_AI_API OH_AI_DeviceInfoHandle OH_AI_CreateNNRTDeviceInfoByType(OH_AI_NNRTDeviceType type);
295be168c0dSopenharmony_ci
296be168c0dSopenharmony_ci/**
297be168c0dSopenharmony_ci * @brief Set the NNRT device id, Only valid for NNRT.
298be168c0dSopenharmony_ci * @param device_info Device info object handle.
299be168c0dSopenharmony_ci * @param device_id NNRT device id.
300be168c0dSopenharmony_ci * @since 10
301be168c0dSopenharmony_ci */
302be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetDeviceId(OH_AI_DeviceInfoHandle device_info, size_t device_id);
303be168c0dSopenharmony_ci
304be168c0dSopenharmony_ci/**
305be168c0dSopenharmony_ci * @brief Obtain the NNRT device id, Only valid for NNRT.
306be168c0dSopenharmony_ci * @param device_info Device info object handle.
307be168c0dSopenharmony_ci * @return NNRT device id.
308be168c0dSopenharmony_ci * @since 10
309be168c0dSopenharmony_ci */
310be168c0dSopenharmony_ciOH_AI_API size_t OH_AI_DeviceInfoGetDeviceId(const OH_AI_DeviceInfoHandle device_info);
311be168c0dSopenharmony_ci
312be168c0dSopenharmony_ci/**
313be168c0dSopenharmony_ci * @brief Set the NNRT performance mode, Only valid for NNRT.
314be168c0dSopenharmony_ci * @param device_info Device info object handle.
315be168c0dSopenharmony_ci * @param device_id NNRT performance mode.
316be168c0dSopenharmony_ci * @since 10
317be168c0dSopenharmony_ci */
318be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetPerformanceMode(OH_AI_DeviceInfoHandle device_info, OH_AI_PerformanceMode mode);
319be168c0dSopenharmony_ci
320be168c0dSopenharmony_ci/**
321be168c0dSopenharmony_ci * @brief Obtain the NNRT performance mode, Only valid for NNRT.
322be168c0dSopenharmony_ci * @param device_info Device info object handle.
323be168c0dSopenharmony_ci * @return NNRT performance mode.
324be168c0dSopenharmony_ci * @since 10
325be168c0dSopenharmony_ci */
326be168c0dSopenharmony_ciOH_AI_API OH_AI_PerformanceMode OH_AI_DeviceInfoGetPerformanceMode(const OH_AI_DeviceInfoHandle device_info);
327be168c0dSopenharmony_ci
328be168c0dSopenharmony_ci/**
329be168c0dSopenharmony_ci * @brief Set the NNRT priority, Only valid for NNRT.
330be168c0dSopenharmony_ci * @param device_info Device info object handle.
331be168c0dSopenharmony_ci * @param device_id NNRT priority.
332be168c0dSopenharmony_ci * @since 10
333be168c0dSopenharmony_ci */
334be168c0dSopenharmony_ciOH_AI_API void OH_AI_DeviceInfoSetPriority(OH_AI_DeviceInfoHandle device_info, OH_AI_Priority priority);
335be168c0dSopenharmony_ci
336be168c0dSopenharmony_ci/**
337be168c0dSopenharmony_ci * @brief Obtain the NNRT priority, Only valid for NNRT.
338be168c0dSopenharmony_ci * @param device_info Device info object handle.
339be168c0dSopenharmony_ci * @return NNRT priority.
340be168c0dSopenharmony_ci * @since 10
341be168c0dSopenharmony_ci */
342be168c0dSopenharmony_ciOH_AI_API OH_AI_Priority OH_AI_DeviceInfoGetPriority(const OH_AI_DeviceInfoHandle device_info);
343be168c0dSopenharmony_ci
344be168c0dSopenharmony_ci/**
345be168c0dSopenharmony_ci * @brief Add extension of key/value format to device info, Only valid for NNRT.
346be168c0dSopenharmony_ci * @param device_info Device info object handle.
347be168c0dSopenharmony_ci * @param name The content of key as a C string.
348be168c0dSopenharmony_ci * @param value The pointer to the value, which is a byte array.
349be168c0dSopenharmony_ci * @param value_size The size of the value, which is a byte array.
350be168c0dSopenharmony_ci * @return OH_AI_STATUS_SUCCESS if success, or detail error code if failed.
351be168c0dSopenharmony_ci * @since 10
352be168c0dSopenharmony_ci */
353be168c0dSopenharmony_ciOH_AI_API OH_AI_Status OH_AI_DeviceInfoAddExtension(OH_AI_DeviceInfoHandle device_info, const char *name, const char *value, size_t value_size);
354be168c0dSopenharmony_ci#ifdef __cplusplus
355be168c0dSopenharmony_ci}
356be168c0dSopenharmony_ci#endif
357be168c0dSopenharmony_ci#endif  // MINDSPORE_INCLUDE_C_API_CONTEXT_C_H
358