Skip to content

[Lane 2 · kotlin-core] StableHLO coverage — lower logSoftmax to StableHLO #1394

Open

Description

@michalharakal

Sub-issue of #1389 ([Feature]: StableHLO converter coverage — lower every TensorOps op).

Lane: 2 · Kotlin core
Skill needed: Kotlin; reading a little MLIR text. No SKaiNET runtime or kernel knowledge needed — converters only emit text.
Size: s (a few hours)
Blocked by: nothing

What to do

  1. Open skainet-compile/skainet-compile-hlo/src/commonMain/kotlin/sk/ainet/compile/hlo/converters/ActivationOperationsConverter.kt and find an op it already lowers that is similar.
  2. Add logSoftmax to its supportedOperations and emit: the numerically stable form x - max - log(sum(exp(x - max))) along the op's dim — reuse the reduce structure softmax already emits.
  3. Add a one-node export test next to the converter's existing tests in skainet-compile/skainet-compile-hlo/src/commonTest (copy one of its tests).
  4. Run ./gradlew :skainet-compile:skainet-compile-hlo:jvmTest, then regenerate the matrix: ./gradlew :skainet-compile:skainet-compile-hlo:jvmTest --tests '*HloCoverageDumpTest' :skainet-compile:skainet-compile-dag:jvmTest --tests '*BackwardCoverageDumpTest' generateDocs and commit the changed docs/modules/ROOT/pages/reference/ files.

Acceptance

  • StableHLO column shows ✅ for logSoftmax
  • Export test passes
  • Result reported back on the parent issue

Notes

If something here turns out to be wrong or much bigger than the size label, comment on this issue or open a specific bug instead of blocking the parent.

Coverage matrix: docs/modules/ROOT/pages/reference/ops-status-matrix.adoc · How lanes work: Issue taxonomy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codingImplementation task (DARC: C)good first issueGood for newcomers; no prior SKaiNET codebase knowledge assumedsize:sA few hoursskill:kotlin-coreKotlin implementation in commonMainsub-issueSub-issue of a tracking issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions