From f5b2bb4e5ea48167a22b5b4774277e4c47cf2e4e Mon Sep 17 00:00:00 2001 From: Michal Harakal Date: Mon, 13 Apr 2026 12:35:48 +0200 Subject: [PATCH] Drop vestigial skainet-backend-cpu dep from compile-hlo jvmMain (#472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HloGenerator records traces with VoidTensorOps() from skainet-lang-core. Its jvmMain sources never import anything from sk.ainet.backend.cpu.*, and the generateHlo Gradle task runs cleanly without the CPU backend on its classpath. The jvmMain dependency on skainet-backends:skainet-backend-cpu was dead code left over from earlier iterations. Removing it demonstrates that skainet-lang-core alone is sufficient for the production HLO export path and reduces the transitive closure of anything pulling in compile-hlo. The commonTest dep on backend-cpu stays — tests genuinely need a real execution context. Verified: - :skainet-compile:skainet-compile-hlo:compileKotlinJvm green - :skainet-compile:skainet-compile-hlo:jvmTest green - :skainet-compile:skainet-compile-hlo:generateHlo runs and prints the expected `--model is required` usage message with no classpath errors Co-Authored-By: Claude Opus 4.6 (1M context) --- skainet-compile/skainet-compile-hlo/build.gradle.kts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/skainet-compile/skainet-compile-hlo/build.gradle.kts b/skainet-compile/skainet-compile-hlo/build.gradle.kts index 8d64638c3..bc5f74e80 100644 --- a/skainet-compile/skainet-compile-hlo/build.gradle.kts +++ b/skainet-compile/skainet-compile-hlo/build.gradle.kts @@ -54,8 +54,10 @@ kotlin { } jvmMain.dependencies { + // HloGenerator records traces with VoidTensorOps from + // skainet-lang-core — the JVM production path never needs a + // real backend implementation. No CPU-specific imports here. implementation(project(":skainet-lang:skainet-lang-models")) - implementation(project(":skainet-backends:skainet-backend-cpu")) implementation(libs.kotlinx.coroutines) }