feat(benchmark/benchncnn.cpp): support user defined case#4782
Merged
nihui merged 11 commits intoTencent:masterfrom Aug 11, 2023
Merged
feat(benchmark/benchncnn.cpp): support user defined case#4782nihui merged 11 commits intoTencent:masterfrom
nihui merged 11 commits intoTencent:masterfrom
Conversation
d542486 to
14edf38
Compare
Contributor
Author
|
rebase 一下 master. done. |
Member
|
参考 pnnx main.cpp,额外的高级参数采用 [(key=value)...] 的形式,有更好的扩展性,比如多输入 |
Contributor
Author
|
done. |
Contributor
Author
|
@nihui 每日一催 |
Contributor
Author
|
@nihui 每周一催 |
nihui
requested changes
Jul 20, 2023
Contributor
Author
|
@nihui 每月一催 |
Contributor
Author
|
@nihui 日催 |
Member
|
Thanks for your contribution ! @tpoisonooo 合并啦! |
4 tasks
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.
benchncnn支持指定 param 文件1. 兼容原行为
$ ./benchncnn $ ./benchncnn 8 .. $ ./benchncnn 1 8 0 -1 1 param=vgg16.param "shape=[112,112,3]" loop_count = 1 num_threads = 8 powersave = 0 gpu_device = -1 cooling_down = 1 vgg16.param min = 28.64 max = 28.64 avg = 28.642. 发现输入
-h或者--help打印 usage3. 增加指定 param 和 shape
shape 用 whc 格式
$ ./benchncnn 1 8 0 0 1 param=squeezenet.param "shape=[224,224,3]" loop_count = 1 num_threads = 8 powersave = 0 gpu_device = 0 cooling_down = 1 squeezenet.param min = 11.40 max = 11.40 avg = 11.404. 异常处理:没输入shape
$ ./benchncnn 1 8 0 0 1 param=squeezenet.param input tensor shape empty!5. 异常处理:shape 输入了 4 维
6. 模型只需要 1 个输入,输入了 2 个 shape
正常运行,此时取第一个 shape
$ ./benchncnn 1 8 0 0 1 param=squeezenet.param "shape=[224,224,3],[666]" loop_count = 1 num_threads = 8 powersave = 0 gpu_device = 0 cooling_down = 1 squeezenet.param min = 9.09 max = 9.09 avg = 9.09