Skip to content

Commit b4a1600

Browse files
michalharakalclaude
andcommitted
test(gemma): default integration test heap to 12g; merge duplicate Test blocks
The real-model FunctionGemma-270M integration tests (-PincludeIntegration) OOM'd with `Java heap space` at the previous 8g default once the model file is present: GemmaQ5KPackedParityTest holds the FP32 baseline plus both packed decode networks at once, and the bake-to-irpa test holds weights + serialized bytes simultaneously. - Bump the `gemmaTestMaxHeap` default 8g -> 12g. - Merge the two overlapping `tasks.withType<Test>().configureEach { }` blocks into one — the second silently overrode the first's maxHeapSize (so jvmArgs ran with 6g declared but 8g effective). Now jvmArgs, heap, and the seqLen system property live in a single block. CI is unaffected: without the model file the integration tests self-skip and never allocate the headroom. Verified: `:llm-inference:gemma:jvmTest -PincludeIntegration` green with no -P override (87 tests, 6 skipped, 0 failures); GemmaQ5KPackedParityTest runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 78cc1d0 commit b4a1600

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

llm-inference/gemma/build.gradle.kts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ kotlin {
8888
}
8989
}
9090

91+
// Real-model (FunctionGemma-270M) integration tests (run with -PincludeIntegration)
92+
// dequantize ~270M params to FP32, and GemmaQ5KPackedParityTest holds the FP32
93+
// baseline plus both packed decode networks at once; the bake-to-irpa test holds
94+
// weights + serialized bytes simultaneously. 8g OOMs once the real model is
95+
// present, so default to 12g — override via -PgemmaTestMaxHeap (CI without the
96+
// model file self-skips these and never needs the headroom).
9197
tasks.withType<Test>().configureEach {
9298
jvmArgs("--enable-preview", "--add-modules", "jdk.incubator.vector")
93-
maxHeapSize = (findProperty("gemmaTestMaxHeap") as? String) ?: "6g"
99+
maxHeapSize = (findProperty("gemmaTestMaxHeap") as? String) ?: "12g"
100+
(findProperty("seqLen") as? String)?.let { systemProperty("seqLen", it) }
94101
}
95102

96103
// Kotlin/JS + Kotlin/WASM browser test runners have two separate problems on
@@ -109,11 +116,3 @@ tasks.matching { it.name == "jsBrowserTest" || it.name == "wasmJsBrowserTest" }.
109116
?.failOnNoDiscoveredTests = false
110117
enabled = includeBrowserTests
111118
}
112-
113-
// Real-model (FunctionGemma-270M) tests dequantize ~270M params to FP32 and the
114-
// bake-to-irpa test holds weights + serialized bytes simultaneously; allow an
115-
// override via -PgemmaTestMaxHeap (default 8g).
116-
tasks.withType<Test>().configureEach {
117-
maxHeapSize = (findProperty("gemmaTestMaxHeap") as? String) ?: "8g"
118-
(findProperty("seqLen") as? String)?.let { systemProperty("seqLen", it) }
119-
}

0 commit comments

Comments
 (0)