Specify more specific CPU dimensions.

This is required in order to add Skylake GCE machines, in order to
avoid existing Perf GCE tasks from switching between Haswell and
Skylake.

Bug: skia:6326
Change-Id: Ib05323f5476c7b9a40d9f752c5a7ee8731c4185d
Reviewed-on: https://skia-review.googlesource.com/50740
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
This commit is contained in:
Ben Wagner 2017-09-25 12:56:53 -04:00 committed by Skia Commit-Bot
parent 592273965a
commit 4c9842ec4b
2 changed files with 384 additions and 384 deletions

View File

@ -98,7 +98,8 @@ func internalHardwareLabel(parts map[string]string) *int {
// instances. // instances.
func linuxGceDimensions() []string { func linuxGceDimensions() []string {
return []string{ return []string{
"cpu:x86-64-avx2", // Specify CPU to avoid running builds on bots with a more unique CPU.
"cpu:x86-64-Haswell_GCE",
"gpu:none", "gpu:none",
fmt.Sprintf("os:%s", DEFAULT_OS_DEBIAN), fmt.Sprintf("os:%s", DEFAULT_OS_DEBIAN),
fmt.Sprintf("pool:%s", CONFIG.Pool), fmt.Sprintf("pool:%s", CONFIG.Pool),
@ -247,24 +248,23 @@ func defaultSwarmDimensions(parts map[string]string) []string {
d["device"] = device d["device"] = device
} else if parts["cpu_or_gpu"] == "CPU" { } else if parts["cpu_or_gpu"] == "CPU" {
d["gpu"] = "none" d["gpu"] = "none"
cpu, ok := map[string]string{ modelMapping, ok := map[string]map[string]string{
"AVX": "x86-64", "AVX": {
"AVX2": "x86-64-avx2", "MacMini7.1": "x86-64-E5-2697_v2",
"SSE4": "x86-64", "Golo": "x86-64-E5-2670",
},
"AVX2": {
"GCE": "x86-64-Haswell_GCE",
},
}[parts["cpu_or_gpu_value"]] }[parts["cpu_or_gpu_value"]]
if !ok { if !ok {
glog.Fatalf("Entry %q not found in CPU mapping.", parts["cpu_or_gpu_value"]) glog.Fatalf("Entry %q not found in CPU mapping.", parts["cpu_or_gpu_value"])
} }
cpu, ok := modelMapping[parts["model"]]
if !ok {
glog.Fatalf("Entry %q not found in %q model mapping.", parts["model"], parts["cpu_or_gpu_value"])
}
d["cpu"] = cpu d["cpu"] = cpu
if strings.Contains(parts["os"], "Win") && parts["cpu_or_gpu_value"] == "AVX2" {
// AVX2 is not correctly detected on Windows. Fall back on other
// dimensions to ensure that we correctly target machines which we know
// have AVX2 support.
d["cpu"] = "x86-64"
if parts["model"] != "GCE" {
glog.Fatalf("Please double-check that %q supports AVX2 and update this assertion.", parts["model"])
}
}
} else { } else {
if strings.Contains(parts["os"], "Win") { if strings.Contains(parts["os"], "Win") {
gpu, ok := map[string]string{ gpu, ok := map[string]string{

File diff suppressed because it is too large Load Diff