Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[onert] Update nnfw_load_model_from_file comment and parameter #14478

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions runtime/onert/api/nnfw/include/nnfw.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,16 @@ NNFW_STATUS nnfw_create_session(nnfw_session **session);
NNFW_STATUS nnfw_close_session(nnfw_session *session);

/**
* @brief Load model from model file or nnpackage directory
* @brief Load model from path to model or nnpackage
*
* The length of \p file_path must not exceed 1024 bytes including zero at the end.
* The length of \p path must not exceed 1024 bytes including zero at the end.
*
* @param[in] session nnfw_session loading the given file/dir
* @param[in] file_path Path to the model file or nnpackage directory to be loaded
* @param[in] session nnfw_session loading the given file/dir
* @param[in] path Path to the model file or nnpackage directory to be loaded
*
* @return @c NNFW_STATUS_NO_ERROR if successful
*/
NNFW_STATUS nnfw_load_model_from_file(nnfw_session *session, const char *file_path);
NNFW_STATUS nnfw_load_model_from_file(nnfw_session *session, const char *path);

/**
* @brief Apply i-th input's tensor info to resize input tensor
Expand Down
12 changes: 2 additions & 10 deletions runtime/onert/api/nnfw/src/nnfw_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,10 @@ NNFW_STATUS nnfw_close_session(nnfw_session *session)
return NNFW_STATUS_NO_ERROR;
}

/*
* Load model from nnpackage file or directory
*
* @param session nnfw_session loading the given file/dir
* @param file_path path to the model file or nnpackage directory to be loaded
*
* @return NNFW_STATUS_NO_ERROR if successful
*/
Comment on lines -78 to -85
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this because it is duplication with header.

NNFW_STATUS nnfw_load_model_from_file(nnfw_session *session, const char *file_path)
NNFW_STATUS nnfw_load_model_from_file(nnfw_session *session, const char *path)
{
NNFW_RETURN_ERROR_IF_NULL(session);
return session->load_model_from_path(file_path);
return session->load_model_from_path(path);
}

/*
Expand Down