Skip to content

Skip int8 model on GPU and merge from upstream#6174

Merged
nihui merged 1 commit intoTencent:masterfrom
c8s-wk:master
Jul 12, 2025
Merged

Skip int8 model on GPU and merge from upstream#6174
nihui merged 1 commit intoTencent:masterfrom
c8s-wk:master

Conversation

@c8s-wk
Copy link
Contributor

@c8s-wk 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).

@tencent-adm
Copy link
Member

tencent-adm commented Jul 11, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

The binary size change of libncnn.so (bytes)

architecture base size pr size difference
x86_64 15657272 15657272 0 😘
armhf 6653616 6653616 0 😘
aarch64 9989032 9989032 0 😘

@c8s-wk c8s-wk force-pushed the master branch 7 times, most recently from ec77068 to c4efac2 Compare July 12, 2025 07:15
@c8s-wk c8s-wk requested a review from nihui July 12, 2025 08:24
@c8s-wk c8s-wk force-pushed the master branch 2 times, most recently from dc93d2f to fc79978 Compare July 12, 2025 08:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_supported for 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_path is ambiguous; renaming it to something like is_user_specified_model or use_custom_model would clarify its purpose.
        if (!fixed_path)

@nihui nihui merged commit 4d8220c into Tencent:master Jul 12, 2025
6 checks passed
@nihui
Copy link
Member

nihui commented Jul 12, 2025

Thanks for your contribution !

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.

3 participants