diff --git a/runtime/onert/api/nnfw/src/nnfw_api.cc b/runtime/onert/api/nnfw/src/nnfw_api.cc index ea217c50e9f..fe2a21ec50d 100644 --- a/runtime/onert/api/nnfw/src/nnfw_api.cc +++ b/runtime/onert/api/nnfw/src/nnfw_api.cc @@ -14,9 +14,12 @@ * limitations under the License. */ -#include "nnfw_api_internal.h" +#include "nnfw.h" +#include "nnfw_experimental.h" #include "nnfw_version.h" +#include "nnfw_session.h" + // Double-check enum value changes #define STATIC_ASSERT_ENUM_CHECK(ENUM, VAL) static_assert((ENUM) == (VAL), #ENUM " has changed") @@ -334,18 +337,6 @@ NNFW_STATUS nnfw_query_info_u32(nnfw_session *session, NNFW_INFO_ID id, uint32_t return NNFW_STATUS_ERROR; } -NNFW_STATUS nnfw_load_circle_from_buffer(nnfw_session *session, uint8_t *buffer, size_t size) -{ - NNFW_RETURN_ERROR_IF_NULL(session); - return session->load_circle_from_buffer(buffer, size); -} - -NNFW_STATUS nnfw_load_model_from_modelfile(nnfw_session *session, const char *file_path) -{ - NNFW_RETURN_ERROR_IF_NULL(session); - return session->load_model_from_modelfile(file_path); -} - NNFW_STATUS nnfw_input_tensorindex(nnfw_session *session, const char *tensorname, uint32_t *index) { NNFW_RETURN_ERROR_IF_NULL(session); @@ -458,12 +449,6 @@ NNFW_STATUS nnfw_train_export_circle(nnfw_session *session, const char *path) return session->train_export_circle(path); } -NNFW_STATUS nnfw_train_export_circleplus(nnfw_session *session, const char *path) -{ - NNFW_RETURN_ERROR_IF_NULL(session); - return session->train_export_circleplus(path); -} - NNFW_STATUS nnfw_train_import_checkpoint(nnfw_session *session, const char *path) { NNFW_RETURN_ERROR_IF_NULL(session); diff --git a/runtime/onert/api/nnfw/src/nnfw_debug.cc b/runtime/onert/api/nnfw/src/nnfw_internal.cc similarity index 67% rename from runtime/onert/api/nnfw/src/nnfw_debug.cc rename to runtime/onert/api/nnfw/src/nnfw_internal.cc index 01e5bf8f22f..7208a77587a 100644 --- a/runtime/onert/api/nnfw/src/nnfw_debug.cc +++ b/runtime/onert/api/nnfw/src/nnfw_internal.cc @@ -14,7 +14,9 @@ * limitations under the License. */ -#include "nnfw_api_internal.h" +#include "nnfw_internal.h" + +#include "nnfw_session.h" #include @@ -36,3 +38,21 @@ NNFW_STATUS nnfw_get_config(nnfw_session *session, const char *key, char *value, NNFW_RETURN_ERROR_IF_NULL(session); return session->get_config(key, value, value_size); } + +NNFW_STATUS nnfw_load_circle_from_buffer(nnfw_session *session, uint8_t *buffer, size_t size) +{ + NNFW_RETURN_ERROR_IF_NULL(session); + return session->load_circle_from_buffer(buffer, size); +} + +NNFW_STATUS nnfw_load_model_from_modelfile(nnfw_session *session, const char *file_path) +{ + NNFW_RETURN_ERROR_IF_NULL(session); + return session->load_model_from_modelfile(file_path); +} + +NNFW_STATUS nnfw_train_export_circleplus(nnfw_session *session, const char *path) +{ + NNFW_RETURN_ERROR_IF_NULL(session); + return session->train_export_circleplus(path); +} diff --git a/runtime/onert/api/nnfw/src/nnfw_api_internal.cc b/runtime/onert/api/nnfw/src/nnfw_session.cc similarity index 99% rename from runtime/onert/api/nnfw/src/nnfw_api_internal.cc rename to runtime/onert/api/nnfw/src/nnfw_session.cc index 3a579c2ab59..b2c9c61f4da 100644 --- a/runtime/onert/api/nnfw/src/nnfw_api_internal.cc +++ b/runtime/onert/api/nnfw/src/nnfw_session.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "nnfw_api_internal.h" +#include "nnfw_session.h" #include "compiler/CompilerFactory.h" #include "exporter/CircleExporter.h" diff --git a/runtime/onert/api/nnfw/src/nnfw_api_internal.h b/runtime/onert/api/nnfw/src/nnfw_session.h similarity index 98% rename from runtime/onert/api/nnfw/src/nnfw_api_internal.h rename to runtime/onert/api/nnfw/src/nnfw_session.h index 56471c14b59..910ec71a6c1 100644 --- a/runtime/onert/api/nnfw/src/nnfw_api_internal.h +++ b/runtime/onert/api/nnfw/src/nnfw_session.h @@ -14,11 +14,10 @@ * limitations under the License. */ -#ifndef __API_NNFW_API_INTERNAL_H__ -#define __API_NNFW_API_INTERNAL_H__ +#ifndef __API_NNFW_SESSION_H__ +#define __API_NNFW_SESSION_H__ #include "nnfw.h" -#include "nnfw_experimental.h" #include "CustomKernelRegistry.h" #include "compiler/CompilerOptions.h" @@ -231,4 +230,4 @@ struct nnfw_session std::filesystem::path _model_path; }; -#endif // __API_NNFW_API_INTERNAL_H__ +#endif // __API_NNFW_SESSION_H__