Skip to content

Commit 6065f9d

Browse files
michalharakalclaude
andcommitted
fix(gemma): write MLIR dump tests to portable build dir, not a hardcoded local path
GemmaMlirDumpTest and RealGemmaMlirDumpTest defaulted their StableHLO dump output to /home/miso/projects/coral/build-mlir/, the original author's local checkout. On CI (home is /home/runner) parentFile.mkdirs() can't create that tree, so writeText throws FileNotFoundException and :llm-inference:gemma:allTests fails — turning develop (and every PR branched off it) red. The Gemma3 -> StableHLO lowering itself is healthy (0 unsupported ops, 0 arity gaps); only the final file write was broken. Default to the module's build/ dir (build/build-mlir/*.mlir), which both tests already mkdirs and which is writable everywhere. The -DgemmaMlirOut=<path> override is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent feed359 commit 6065f9d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

llm-inference/gemma/src/jvmTest/kotlin/sk/ainet/models/gemma/GemmaMlirDumpTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class GemmaMlirDumpTest {
5656
val graph = (tape as DefaultExecutionTape).toComputeGraph(synthesizeExternalInputs = true)
5757
val mlir = sk.ainet.compile.hlo.toStableHlo(graph, "gemma").content
5858

59-
val out = File(System.getProperty("gemmaMlirOut") ?: "/home/miso/projects/coral/build-mlir/gemma.mlir")
59+
val out = File(System.getProperty("gemmaMlirOut") ?: "build/build-mlir/gemma.mlir")
6060
out.parentFile?.mkdirs()
6161
out.writeText(mlir)
6262
println("WROTE_MLIR ${out.absolutePath} (${mlir.lines().size} lines)")

llm-inference/gemma/src/jvmTest/kotlin/sk/ainet/models/gemma/RealGemmaMlirDumpTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class RealGemmaMlirDumpTest {
8383
val unsupported = mlir.lines().count { it.contains("Unsupported op", ignoreCase = true) }
8484
val arity = mlir.lines().count { it.contains("arity", ignoreCase = true) }
8585
println("MLIR lines=${mlir.lines().size} unsupported=$unsupported arity=$arity")
86-
val out = File(System.getProperty("gemmaMlirOut") ?: "/home/miso/projects/coral/build-mlir/gemma-real.mlir")
86+
val out = File(System.getProperty("gemmaMlirOut") ?: "build/build-mlir/gemma-real.mlir")
8787
out.parentFile?.mkdirs()
8888
out.writeText(mlir)
8989
println("WROTE_MLIR ${out.absolutePath}")

0 commit comments

Comments
 (0)