Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@GMNGeoffrey
Copy link
Contributor

@GMNGeoffrey GMNGeoffrey commented Nov 17, 2021

This is not the prettiest Python I've ever written, but it does allow
restarting benchmark runs rather than losing all progress after a
single failure. This makes the workflow of starting a benchmarking run
and then coming back when it is finished far more workable.

I tried out incremental output of the final json results and reloading
from that, but decided against it because I had to manually construct
json (no native incremental support) and use context handlers to ensure
structures were closed even on a failure exit. Overall it ended up
being pretty gross. Since we were already using temporary files for
captures, this seemed like a reasonable way to go.

@google-cla google-cla bot added the cla: yes label Nov 17, 2021
@GMNGeoffrey GMNGeoffrey force-pushed the benchmark-scripting branch 7 times, most recently from 25c621a to 3822e6b Compare November 17, 2021 01:49
@iree-github-actions-bot
Copy link
Contributor

iree-github-actions-bot commented Nov 17, 2021

Abbreviated Benchmark Summary

@ commit f791bf46d159d54e0933d191e54f39ef9dd943cb (vs. base 727d793f354ae4b68a0a7ef6920ee0993fe050db)

Regressed Benchmarks 🚩

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
MobileNetV3Small [fp32,imagenet] (TensorFlow) 1-thread,little-core,full-inference,experimental-flags with IREE-Dylib @ SM-G980F (CPU-ARMv8.2-A) 228 (vs. 186, 22.58%↑) 228 2
MobileBertSquad [fp16] (TensorFlow) full-inference,experimental-flags with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 339 (vs. 288, 17.71%↑) 340 2
MobileNetV3Small [fp32,imagenet] (TensorFlow) 3-thread,little-core,full-inference,experimental-flags with IREE-VMVX @ Pixel-4 (CPU-ARMv8.2-A) 10562 (vs. 9187, 14.97%↑) 10560 9

[Top 3 out of 9 benchmark results showed]

Improved Benchmarks 🎉

Benchmark Name Average Latency (ms) Median Latency (ms) Latency Standard Deviation (ms)
DeepLabV3 [fp32] (TFLite) kernel-execution,experimental-flags with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 23 (vs. 35, 34.29%↓) 23 0
DeepLabV3 [fp32] (TFLite) full-inference,default-flags with IREE-Vulkan @ SM-G980F (GPU-Mali-G77) 51 (vs. 72, 29.17%↓) 51 0
MobileSSD [fp32] (TFLite) little-core,full-inference,experimental-flags with IREE-Dylib-Sync @ SM-G980F (CPU-ARMv8.2-A) 1441 (vs. 1685, 14.48%↓) 1356 142

[Top 3 out of 4 benchmark results showed]

For more information:

Copy link
Contributor

@antiagainst antiagainst left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding this! But given this keep going feature does not have some count down, I assume it's only meant for local usage.

My main comment is mostly around having more comments explaining the intent. I know it's an art as when/where to comment to avoid being excessive; but generally if the logic is too branchy and lengthy I'd suggest to put more to keep following the logic. :)

@GMNGeoffrey
Copy link
Contributor Author

LGTM, thanks for adding this! But given this keep going feature does not have some count down, I assume it's only meant for local usage.

Not sure what you mean by a countdown? My main use case was for running locally, although I think it would also be nice to be able to do this on CI so you could see the results. It would require plumbing more things through though, so I wouldn't do it right now.

My main comment is mostly around having more comments explaining the intent. I know it's an art as when/where to comment to avoid being excessive; but generally if the logic is too branchy and lengthy I'd suggest to put more to keep following the logic. :)

Yeah, like I said, I don't really love this. There are a lot of switches and parameters all over the place 😕 I'll add some more comments and docstrings.

@GMNGeoffrey
Copy link
Contributor Author

AttributeError: 'Namespace' object has no attribute 'tmpdir'

(╯°□°)╯︵ ┻━┻

I hate dynamic languages

@GMNGeoffrey GMNGeoffrey merged commit 2c6281b into iree-org:main Nov 18, 2021
@GMNGeoffrey GMNGeoffrey deleted the benchmark-scripting branch November 18, 2021 05:47
@antiagainst
Copy link
Contributor

FYI: this breaks uploading to dashboard: https://buildkite.com/iree/iree-benchmark/builds/1534#68e90f49-9c6e-4c4a-81ff-36d8a4895f57. Looks we missed one place that should be updated. Fix here: #7694.

@GMNGeoffrey
Copy link
Contributor Author

Argh, thanks for fixing

@KoolJBlack KoolJBlack mentioned this pull request Nov 18, 2021
gpetters94 pushed a commit to gpetters94/iree that referenced this pull request Nov 24, 2021
This is not the prettiest Python I've ever written, but it does allow
restarting benchmark runs rather than losing all progress after a
single failure. This makes the workflow of starting a benchmarking run
and then coming back when it is finished far more workable.

I tried out incremental output of the final json results and reloading
from that, but decided against it because I had to manually construct
json (no native incremental support) and use context handlers to ensure
structures were closed even on a failure exit. Overall it ended up
being pretty gross. Since we were already using temporary files for
captures, this seemed like a reasonable way to go.
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