Drop vestigial cpu dep from skainet-compile-hlo jvmMain (#472)#474
Merged
michalharakal merged 1 commit intodevelopfrom Apr 13, 2026
Merged
Drop vestigial cpu dep from skainet-compile-hlo jvmMain (#472)#474michalharakal merged 1 commit intodevelopfrom
michalharakal merged 1 commit intodevelopfrom
Conversation
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) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #472.
Summary
Removes an unused `implementation(project(":skainet-backends:skainet-backend-cpu"))` from `skainet-compile/skainet-compile-hlo/build.gradle.kts`'s `jvmMain.dependencies` block. `HloGenerator` records traces with `VoidTensorOps()` from `skainet-lang-core` and the jvmMain Kotlin sources contain zero imports from `sk.ainet.backend.cpu.*` — the dependency was dead.
Why this is the right first "migration" in the P0-2 track
Grepping every `build.gradle.kts` in the repo for `skainet-backend-cpu` showed that every production-code dependency on the CPU backend is either a test source set (tests actually execute ops), an application runtime, or the BOM — with one exception: `skainet-compile-hlo`'s jvmMain, where the dep was declared but unused. The originally-scoped candidate (`skainet-compile-json`) turned out not to be migratable: its CPU dep is in `jvmTest`, where tests genuinely need a real execution context, and `skainet-backend-api` is interface-only.
So the useful first step in P0-2 isn't "migrate a consumer from CPU to api" — it's removing the one place where CPU is on a production classpath without being referenced. That strictly shrinks the transitive closure of anything pulling in `compile-hlo` and demonstrates that `skainet-lang-core` alone is enough for the production HLO export path.
Test plan
Out of scope
🤖 Generated with Claude Code