Skip int8 model on GPU and merge from upstream#6174
Merged
nihui merged 1 commit intoTencent:masterfrom Jul 12, 2025
Merged
Conversation
Contributor
c8s-wk
commented
Jul 11, 2025
- Added is_model_int8 to detect int8 models by filename or layer property.
- Refactored benchmarking to use run_benchmark_if_supported, which loads model files, checks for int8, and skips GPU benchmarking for int8 models with a clear message.
- Applies to both default and user-specified models(param).
Member
|
The binary size change of libncnn.so (bytes)
|
nihui
requested changes
Jul 12, 2025
nihui
reviewed
Jul 12, 2025
ec77068 to
c4efac2
Compare
nihui
requested changes
Jul 12, 2025
dc93d2f to
fc79978
Compare
nihui
requested changes
Jul 12, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
A concise summary of the purpose of the PR, followed by summarized bullets of changes
- Introduces logic to detect int8 models and skip GPU benchmarking when an int8 model is used
- Refactors benchmarking entry point to use
run_benchmark_if_supportedfor both default and user-specified models - Applies consistent skip behavior and messaging across model sources
Comments suppressed due to low confidence (2)
benchmark/benchncnn.cpp:52
- [nitpick] There are no tests verifying that GPU benchmarking is correctly skipped for int8 models; consider adding unit or integration tests for this branch.
if (opt.use_vulkan_compute && strstr(comment, "int8") != NULL)
benchmark/benchncnn.cpp:54
- [nitpick] The parameter
fixed_pathis ambiguous; renaming it to something likeis_user_specified_modeloruse_custom_modelwould clarify its purpose.
if (!fixed_path)
nihui
approved these changes
Jul 12, 2025
Member
|
Thanks for your contribution ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.