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/odc] Auto-compilation. Tests #14435

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

Torrero
Copy link
Contributor

@Torrero Torrero commented Dec 6, 2024

This PR introduces tests for odc:auto-compilation.

For Issue.
From Draft.

ONE-DCO-1.0-Signed-off-by: Evgenii Maltsev [email protected]

@Torrero Torrero force-pushed the onert_odc_autocompilation_test branch from da0dbc9 to d4c449c Compare December 6, 2024 17:20
Comment on lines 66 to 71
set(NNPACKAGE_MODEL_DIR ${NNAS_PROJECT_SOURCE_DIR}/runtime/contrib/TFLiteSharp/TFLiteTestApp/res/)
install(DIRECTORY ${NNPACKAGE_MODEL_DIR} DESTINATION ${NNPACKAGE_INSTALL_TARGET}/mobilenet_v1_1.0_224)

# Install nnpackage test model (conv2d)
set(NNPACKAGE_MODEL_DIR ${NNAS_PROJECT_SOURCE_DIR}/runtime/contrib/autocompilation/res/)
install(DIRECTORY ${NNPACKAGE_MODEL_DIR} DESTINATION ${NNPACKAGE_INSTALL_TARGET}/conv2d)
Copy link
Contributor

Choose a reason for hiding this comment

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

Using ${NNAS_PROJECT_SOURCE_DIR}/runtime/contrib/TFLiteSharp/TFLiteTestApp/res/ is workaround to use large size model - mobilenet. TFLiteSharp was introduced as C# API PoC project. And all directories under contrib is not maintained.

Please use different place. (ex. tests/nnfw_api/res)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hseok-oh Thank you for explanation,
I changed the location for the model.

This PR introduces tests for `odc:auto-compilation`.
For [Issue]( Samsung#13288).
From [Draft](Samsung#13530).

ONE-DCO-1.0-Signed-off-by: Evgenii Maltsev [email protected]
@Torrero Torrero force-pushed the onert_odc_autocompilation_test branch from d4c449c to 43a47cc Compare December 9, 2024 10:06
Copy link
Contributor

@stamalakhov stamalakhov left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@SlavikMIPT SlavikMIPT left a comment

Choose a reason for hiding this comment

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

LGTM (optional changes in suggestions)


nnfw_set_codegen_model_path(session, compiled_model_name.c_str());

const int RUNS_COUNT_FOR_QUANTIZATION = input_tensors.size();
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const int RUNS_COUNT_FOR_QUANTIZATION = input_tensors.size();
const auto RUNS_COUNT_FOR_QUANTIZATION = input_tensors.size();

// Delete minmax file
nnfw_odc_delete_minmax_file(session);

const int RUNS_COUNT_FOR_QUANTIZATION = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const int RUNS_COUNT_FOR_QUANTIZATION = 1;
const auto RUNS_COUNT_FOR_QUANTIZATION = 1;

@hseok-oh
Copy link
Contributor

We may updates all tests under tests/nnfw_api/ to use @SlavikMIPT 's suggestion.

@hseok-oh hseok-oh merged commit c73dd4c into Samsung:master Dec 11, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants