@@ -69,6 +69,12 @@ NNFW_STATUS nnfw_close_session(nnfw_session *session)
6969 return NNFW_STATUS_NO_ERROR;
7070}
7171
72+ NNFW_STATUS nnfw_get_last_error_message (nnfw_session *session, char *buffer, size_t length)
73+ {
74+ NNFW_RETURN_ERROR_IF_NULL (session);
75+ return reinterpret_cast <Session *>(session)->get_last_error_message (buffer, length);
76+ }
77+
7278NNFW_STATUS nnfw_load_model_from_file (nnfw_session *session, const char *path)
7379{
7480 NNFW_RETURN_ERROR_IF_NULL (session);
@@ -170,9 +176,10 @@ NNFW_STATUS nnfw_register_custom_op_info(nnfw_session *session, const char *id,
170176 return reinterpret_cast <Session *>(session)->register_custom_operation (id, info->eval_function );
171177}
172178
173- NNFW_STATUS nnfw_apply_tensorinfo (nnfw_session *, uint32_t , nnfw_tensorinfo)
179+ NNFW_STATUS nnfw_apply_tensorinfo (nnfw_session *session , uint32_t , nnfw_tensorinfo)
174180{
175- return Session::deprecated (" nnfw_apply_tensorinfo: Deprecated" );
181+ NNFW_RETURN_ERROR_IF_NULL (session);
182+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_apply_tensorinfo: Deprecated" );
176183}
177184
178185NNFW_STATUS nnfw_set_input_tensorinfo (nnfw_session *session, uint32_t index,
@@ -188,9 +195,10 @@ NNFW_STATUS nnfw_set_available_backends(nnfw_session *session, const char *backe
188195 return reinterpret_cast <Session *>(session)->set_available_backends (backends);
189196}
190197
191- NNFW_STATUS nnfw_set_op_backend (nnfw_session *, const char *, const char *)
198+ NNFW_STATUS nnfw_set_op_backend (nnfw_session *session , const char *, const char *)
192199{
193- return Session::deprecated (" nnfw_set_op_backend: Deprecated" );
200+ NNFW_RETURN_ERROR_IF_NULL (session);
201+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_set_op_backend: Deprecated" );
194202}
195203
196204NNFW_STATUS nnfw_query_info_u32 (nnfw_session *session, NNFW_INFO_ID id, uint32_t *val)
@@ -230,19 +238,22 @@ NNFW_STATUS nnfw_set_backends_per_operation(nnfw_session *session, const char *b
230238 return reinterpret_cast <Session *>(session)->set_backends_per_operation (backend_settings);
231239}
232240
233- NNFW_STATUS nnfw_prepare_pipeline (nnfw_session *, const char *)
241+ NNFW_STATUS nnfw_prepare_pipeline (nnfw_session *session , const char *)
234242{
235- return Session::deprecated (" nnfw_prepare_pipeline: Deprecated" );
243+ NNFW_RETURN_ERROR_IF_NULL (session);
244+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_prepare_pipeline: Deprecated" );
236245}
237246
238- NNFW_STATUS nnfw_push_pipeline_input (nnfw_session *, void *, void *)
247+ NNFW_STATUS nnfw_push_pipeline_input (nnfw_session *session , void *, void *)
239248{
240- return Session::deprecated (" nnfw_push_pipeline_input: Deprecated" );
249+ NNFW_RETURN_ERROR_IF_NULL (session);
250+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_push_pipeline_input: Deprecated" );
241251}
242252
243- NNFW_STATUS nnfw_pop_pipeline_output (nnfw_session *, void *)
253+ NNFW_STATUS nnfw_pop_pipeline_output (nnfw_session *session , void *)
244254{
245- return Session::deprecated (" nnfw_pop_pipeline_output: Deprecated" );
255+ NNFW_RETURN_ERROR_IF_NULL (session);
256+ return reinterpret_cast <Session *>(session)->deprecated (" nnfw_pop_pipeline_output: Deprecated" );
246257}
247258
248259NNFW_STATUS nnfw_set_workspace (nnfw_session *session, const char *dir)
0 commit comments