auto-tune nanobench in all builds
I'm kind of getting bored of having to pass --loops 0 in optimized+asserts builds. We'd been defaulting to 1 loop in Debug and ASAN builds, and manually setting Valgrind builds to 1 loop with 1 sample. Remove the default so all builds auto-tune, but set Debug and ASAN bots like Valgrind bots. Change-Id: Ifedd98a11ea74a2c222fe59bd50b96683d12b98c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224816 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
c046ff0b10
commit
ac8f443f92
@ -77,17 +77,6 @@ GrContextOptions grContextOpts;
|
||||
|
||||
static const int kAutoTuneLoops = 0;
|
||||
|
||||
#if !defined(__has_feature)
|
||||
#define __has_feature(x) 0
|
||||
#endif
|
||||
|
||||
static const int kDefaultLoops =
|
||||
#if defined(SK_DEBUG) || __has_feature(address_sanitizer)
|
||||
1;
|
||||
#else
|
||||
kAutoTuneLoops;
|
||||
#endif
|
||||
|
||||
static SkString loops_help_txt() {
|
||||
SkString help;
|
||||
help.printf("Number of times to run each bench. Set this to %d to auto-"
|
||||
@ -102,7 +91,7 @@ static SkString to_string(int n) {
|
||||
return str;
|
||||
}
|
||||
|
||||
static DEFINE_int(loops, kDefaultLoops, loops_help_txt().c_str());
|
||||
static DEFINE_int(loops, kAutoTuneLoops, loops_help_txt().c_str());
|
||||
|
||||
static DEFINE_int(samples, 10, "Number of samples to measure for each bench.");
|
||||
static DEFINE_int(ms, 0, "If >0, run each bench for this many ms instead of obeying --samples.");
|
||||
|
@ -736,7 +736,7 @@
|
||||
"--json-output",
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --images --gpuStatsDump true --scales 1.0 1.1 --nocpu --config gles glessrgb glesmsaa4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
|
||||
"set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --images --gpuStatsDump true --scales 1.0 1.1 --nocpu --config gles glessrgb glesmsaa4 --loops 1 --samples 1 --keepAlive true --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
|
||||
"[START_DIR]/tmp/nanobench.sh"
|
||||
],
|
||||
"env": {
|
||||
@ -746,7 +746,7 @@
|
||||
"infra_step": true,
|
||||
"name": "write nanobench.sh",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@nanobench.sh@set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --images --gpuStatsDump true --scales 1.0 1.1 --nocpu --config gles glessrgb glesmsaa4 --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc@@@",
|
||||
"@@@STEP_LOG_LINE@nanobench.sh@set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --images --gpuStatsDump true --scales 1.0 1.1 --nocpu --config gles glessrgb glesmsaa4 --loops 1 --samples 1 --keepAlive true --match ~blurroundrect ~patch_grid ~desk_carsvg ~keymobi_shop_mobileweb_ebay_com.skp ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc@@@",
|
||||
"@@@STEP_LOG_END@nanobench.sh@@@"
|
||||
]
|
||||
},
|
||||
|
@ -674,7 +674,7 @@
|
||||
"--json-output",
|
||||
"/path/to/tmp/json",
|
||||
"copy",
|
||||
"set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --scales 1.0 1.1 --nogpu --purgeBetweenBenches --config 8888 nonrendering --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
|
||||
"set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --scales 1.0 1.1 --nogpu --purgeBetweenBenches --config 8888 nonrendering --loops 1 --samples 1 --keepAlive true --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc",
|
||||
"[START_DIR]/tmp/nanobench.sh"
|
||||
],
|
||||
"env": {
|
||||
@ -684,7 +684,7 @@
|
||||
"infra_step": true,
|
||||
"name": "write nanobench.sh",
|
||||
"~followup_annotations": [
|
||||
"@@@STEP_LOG_LINE@nanobench.sh@set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --scales 1.0 1.1 --nogpu --purgeBetweenBenches --config 8888 nonrendering --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc@@@",
|
||||
"@@@STEP_LOG_LINE@nanobench.sh@set -x; /data/local/tmp/nanobench -i /sdcard/revenge_of_the_skiabot/resources --skps /sdcard/revenge_of_the_skiabot/skps --images /sdcard/revenge_of_the_skiabot/images/nanobench --svgs /sdcard/revenge_of_the_skiabot/svgs --pre_log --scales 1.0 1.1 --nogpu --purgeBetweenBenches --config 8888 nonrendering --loops 1 --samples 1 --keepAlive true --match ~blurroundrect ~patch_grid ~desk_carsvg ~inc0.gif ~inc1.gif ~incInterlaced.gif ~inc0.jpg ~incGray.jpg ~inc0.wbmp ~inc1.wbmp ~inc0.webp ~inc1.webp ~inc0.ico ~inc1.ico ~inc0.png ~inc1.png ~inc2.png ~inc12.png ~inc13.png ~inc14.png ~inc0.webp ~inc1.webp; echo $? >/data/local/tmp/rc@@@",
|
||||
"@@@STEP_LOG_END@nanobench.sh@@@"
|
||||
]
|
||||
},
|
||||
|
@ -164,6 +164,12 @@
|
||||
"esrgb",
|
||||
"narrow",
|
||||
"enarrow",
|
||||
"--loops",
|
||||
"1",
|
||||
"--samples",
|
||||
"1",
|
||||
"--keepAlive",
|
||||
"true",
|
||||
"--match",
|
||||
"~^floor2int_undef$",
|
||||
"~inc0.gif",
|
||||
|
@ -160,6 +160,12 @@
|
||||
"--config",
|
||||
"8888",
|
||||
"nonrendering",
|
||||
"--loops",
|
||||
"1",
|
||||
"--samples",
|
||||
"1",
|
||||
"--keepAlive",
|
||||
"true",
|
||||
"--match",
|
||||
"~inc0.gif",
|
||||
"~inc1.gif",
|
||||
|
@ -162,6 +162,12 @@
|
||||
"--nocpu",
|
||||
"--config",
|
||||
"vk",
|
||||
"--loops",
|
||||
"1",
|
||||
"--samples",
|
||||
"1",
|
||||
"--keepAlive",
|
||||
"true",
|
||||
"--match",
|
||||
"~desk_carsvg.skp_1",
|
||||
"~desk_googlehome.skp",
|
||||
|
@ -133,8 +133,7 @@ def nanobench_flags(api, bot):
|
||||
if 'NoGPUThreads' in bot:
|
||||
args.extend(['--gpuThreads', '0'])
|
||||
|
||||
if 'Valgrind' in bot:
|
||||
# Don't care about Valgrind performance.
|
||||
if 'Debug' in bot or 'ASAN' in bot or 'Valgrind' in bot:
|
||||
args.extend(['--loops', '1'])
|
||||
args.extend(['--samples', '1'])
|
||||
# Ensure that the bot framework does not think we have timed out.
|
||||
|
Loading…
Reference in New Issue
Block a user