Skip to content

Commit 9b7ad98

Browse files
authored
[WX-1183] Ice Lake (#7252)
1 parent 2a93f28 commit 9b7ad98

File tree

6 files changed

+40
-19
lines changed

6 files changed

+40
-19
lines changed

centaur/src/main/resources/standardTestCases/papi_cpu_platform.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ files {
88

99
metadata {
1010
status: Succeeded
11-
"outputs.cpus.cascadeLake.cpuPlatform": "Intel Cascade Lake"
1211
"outputs.cpus.broadwell.cpuPlatform": "Intel Broadwell"
1312
"outputs.cpus.haswell.cpuPlatform": "Intel Haswell"
13+
"outputs.cpus.cascadeLake.cpuPlatform": "Intel Cascade Lake"
14+
"outputs.cpus.iceLake.cpuPlatform": "Intel Ice Lake"
1415
"outputs.cpus.rome.cpuPlatform": "AMD Rome"
1516
}
1617

centaur/src/main/resources/standardTestCases/papi_cpu_platform/papi_cpu_platform.wdl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ task cpu_platform {
2424
}
2525

2626
workflow cpus {
27-
call cpu_platform as haswell { input: cpu_platform = "Intel Haswell" }
28-
call cpu_platform as broadwell { input: cpu_platform = "Intel Broadwell" }
29-
call cpu_platform as cascadeLake { input: cpu_platform = "Intel Cascade Lake" }
30-
call cpu_platform as rome {input: cpu_platform = "AMD Rome" }
27+
call cpu_platform as haswell { input: cpu_platform = "Intel Haswell" }
28+
call cpu_platform as broadwell { input: cpu_platform = "Intel Broadwell" }
29+
call cpu_platform as cascadeLake { input: cpu_platform = "Intel Cascade Lake" }
30+
call cpu_platform as iceLake { input: cpu_platform = "Intel Ice Lake" }
31+
call cpu_platform as rome { input: cpu_platform = "AMD Rome" }
3132
}

docs/RuntimeAttributes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ runtime {
429429
Note that when this options is specified, make sure the requested CPU platform is [available](https://cloud.google.com/compute/docs/regions-zones/#available) in the `zones` you selected.
430430

431431
The following CPU platforms are currently supported by the Google Cloud backend:
432+
- `Intel Ice Lake`
432433
- `Intel Cascade Lake`
433434
- `Intel Skylake`
434435
- `Intel Broadwell`

supportedBackends/google/pipelines/common/src/main/scala/cromwell/backend/google/pipelines/common/MachineConstraints.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ object MachineConstraints {
1616
if (googleLegacyMachineSelection) {
1717
s"predefined-$cpu-${memory.to(MemoryUnit.MB).amount.intValue()}"
1818
} else {
19-
// If someone requests Intel Cascade Lake as their CPU platform then switch the machine type to n2.
20-
// Similarly, CPU platform of AMD Rome corresponds to the machine type n2d.
19+
// Users specify a CPU platform in their WDL, but GCP also needs to know which machine type to use.
20+
// The below logic infers the machine type from the requested CPU.
21+
// The heuristic we're using is: find the newest 'General Purpose' type that supports the given CPU.
22+
// https://cloud.google.com/compute/docs/machine-resource
23+
// For example, if someone requests Intel Cascade Lake as their CPU platform, then infer the n2 machine type.
24+
// Infer n2d from AMD Rome, etc.
2125
val customMachineType =
2226
cpuPlatformOption match {
27+
case Some(PipelinesApiRuntimeAttributes.CpuPlatformIntelIceLakeValue) => N2CustomMachineType
2328
case Some(PipelinesApiRuntimeAttributes.CpuPlatformIntelCascadeLakeValue) => N2CustomMachineType
2429
case Some(PipelinesApiRuntimeAttributes.CpuPlatformAMDRomeValue) => N2DCustomMachineType
2530
case _ => N1CustomMachineType

supportedBackends/google/pipelines/common/src/main/scala/cromwell/backend/google/pipelines/common/PipelinesApiRuntimeAttributes.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ object PipelinesApiRuntimeAttributes {
7878
// via `gcloud compute zones describe us-central1-a`
7979
val CpuPlatformIntelCascadeLakeValue = "Intel Cascade Lake"
8080
val CpuPlatformAMDRomeValue = "AMD Rome"
81+
val CpuPlatformIntelIceLakeValue = "Intel Ice Lake"
8182

8283
val UseDockerImageCacheKey = "useDockerImageCache"
8384
private val useDockerImageCacheValidationInstance = new BooleanRuntimeAttributesValidation(UseDockerImageCacheKey).optional

supportedBackends/google/pipelines/common/src/test/scala/cromwell/backend/google/pipelines/common/MachineConstraintsSpec.scala

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import wom.format.MemorySize
1414
class MachineConstraintsSpec extends AnyFlatSpec with CromwellTimeoutSpec with Matchers {
1515
behavior of "MachineConstraints"
1616

17-
private val n2Option = Option(PipelinesApiRuntimeAttributes.CpuPlatformIntelCascadeLakeValue)
17+
private val n2OptionCascade = Option(PipelinesApiRuntimeAttributes.CpuPlatformIntelCascadeLakeValue)
1818

19-
private val n2dOption = Option(PipelinesApiRuntimeAttributes.CpuPlatformAMDRomeValue)
19+
private val n2dOption = Option(PipelinesApiRuntimeAttributes.CpuPlatformAMDRomeValue)
20+
21+
private val n2OptionIceLake = Option(PipelinesApiRuntimeAttributes.CpuPlatformIntelIceLakeValue)
2022

2123
it should "generate valid machine types" in {
2224
val validTypes = Table(
@@ -40,7 +42,6 @@ class MachineConstraintsSpec extends AnyFlatSpec with CromwellTimeoutSpec with M
4042

4143
// Same tests as above but with legacy machine type selection (cpu and memory as specified. No 'custom machine
4244
// requirement' adjustments are expected this time, except float->int)
43-
4445
(MemorySize(1024, MemoryUnit.MB), refineMV[Positive](1), None, true, "predefined-1-1024"),
4546
(MemorySize(4, MemoryUnit.GB), refineMV[Positive](3), None, true, "predefined-3-4096"),
4647
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](1), None, true, "predefined-1-1024"),
@@ -52,15 +53,26 @@ class MachineConstraintsSpec extends AnyFlatSpec with CromwellTimeoutSpec with M
5253
(MemorySize(2, MemoryUnit.GB), refineMV[Positive](33), None, true, "predefined-33-2048"),
5354

5455
// Same tests but with cascade lake (n2)
55-
(MemorySize(1024, MemoryUnit.MB), refineMV[Positive](1), n2Option, false, "n2-custom-2-2048"),
56-
(MemorySize(4, MemoryUnit.GB), refineMV[Positive](3), n2Option, false, "n2-custom-4-4096"),
57-
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](1), n2Option, false, "n2-custom-2-2048"),
58-
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](4), n2Option, false, "n2-custom-4-4096"),
59-
(MemorySize(14, MemoryUnit.GB), refineMV[Positive](16), n2Option, false, "n2-custom-16-16384"),
60-
(MemorySize(13.65, MemoryUnit.GB), refineMV[Positive](1), n2Option, false, "n2-custom-2-14080"),
61-
(MemorySize(1520.96, MemoryUnit.MB), refineMV[Positive](1), n2Option, false, "n2-custom-2-2048"),
62-
(MemorySize(1024.0, MemoryUnit.MB), refineMV[Positive](1), n2Option, false, "n2-custom-2-2048"),
63-
(MemorySize(2, MemoryUnit.GB), refineMV[Positive](33), n2Option, false, "n2-custom-36-36864"),
56+
(MemorySize(1024, MemoryUnit.MB), refineMV[Positive](1), n2OptionCascade, false, "n2-custom-2-2048"),
57+
(MemorySize(4, MemoryUnit.GB), refineMV[Positive](3), n2OptionCascade, false, "n2-custom-4-4096"),
58+
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](1), n2OptionCascade, false, "n2-custom-2-2048"),
59+
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](4), n2OptionCascade, false, "n2-custom-4-4096"),
60+
(MemorySize(14, MemoryUnit.GB), refineMV[Positive](16), n2OptionCascade, false, "n2-custom-16-16384"),
61+
(MemorySize(13.65, MemoryUnit.GB), refineMV[Positive](1), n2OptionCascade, false, "n2-custom-2-14080"),
62+
(MemorySize(1520.96, MemoryUnit.MB), refineMV[Positive](1), n2OptionCascade, false, "n2-custom-2-2048"),
63+
(MemorySize(1024.0, MemoryUnit.MB), refineMV[Positive](1), n2OptionCascade, false, "n2-custom-2-2048"),
64+
(MemorySize(2, MemoryUnit.GB), refineMV[Positive](33), n2OptionCascade, false, "n2-custom-36-36864"),
65+
66+
// Same tests, but with ice lake. Should produce same results as cascade lake since they're both n2.
67+
(MemorySize(1024, MemoryUnit.MB), refineMV[Positive](1), n2OptionIceLake, false, "n2-custom-2-2048"),
68+
(MemorySize(4, MemoryUnit.GB), refineMV[Positive](3), n2OptionIceLake, false, "n2-custom-4-4096"),
69+
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](1), n2OptionIceLake, false, "n2-custom-2-2048"),
70+
(MemorySize(1, MemoryUnit.GB), refineMV[Positive](4), n2OptionIceLake, false, "n2-custom-4-4096"),
71+
(MemorySize(14, MemoryUnit.GB), refineMV[Positive](16), n2OptionIceLake, false, "n2-custom-16-16384"),
72+
(MemorySize(13.65, MemoryUnit.GB), refineMV[Positive](1), n2OptionIceLake, false, "n2-custom-2-14080"),
73+
(MemorySize(1520.96, MemoryUnit.MB), refineMV[Positive](1), n2OptionIceLake, false, "n2-custom-2-2048"),
74+
(MemorySize(1024.0, MemoryUnit.MB), refineMV[Positive](1), n2OptionIceLake, false, "n2-custom-2-2048"),
75+
(MemorySize(2, MemoryUnit.GB), refineMV[Positive](33), n2OptionIceLake, false, "n2-custom-36-36864"),
6476

6577
// Same tests but with AMD Rome (n2d) #cpu > 16 are in increments of 16
6678
(MemorySize(1024, MemoryUnit.MB), refineMV[Positive](1), n2dOption, false, "n2d-custom-2-1024"),

0 commit comments

Comments
 (0)