Skip to content

[Lane 2 · kotlin-core] GroupNormalization — implement GroupNormalization.forward #1381

Closed

Description

@michalharakal

Sub-issue of #1379 ([Feature]: GroupNormalization forward pass (groupNorm {} DSL currently crashes)).

Lane: 2 · Kotlin core
Skill needed: Kotlin. You do not need to know SKaiNET internals beyond the tensor ops used in LayerNormalization.kt.
Size: s (a few hours)
Blocked by: nothing

What to do

  1. Open skainet-lang/skainet-lang-core/src/commonMain/kotlin/sk/ainet/lang/nn/normalization/GroupNormalization.kt and LayerNormalization.kt side by side.
  2. Replace the four TODO() helpers: reshape [N, C, H, W] → [N, G, C/G*H*W], take mean/variance over the last dim, normalize with eps, reshape back.
  3. Replace the VoidOpsTensor gamma/beta placeholders with real parameters the way LayerNormalization creates them, and apply them per channel.
  4. Remove @NotImplemented from the class.
  5. Add a test next to the existing normalization tests using the Lane-1 values (or values you compute with PyTorch yourself).
  6. Run ./gradlew :skainet-lang:skainet-lang-core:jvmTest checkUnmarkedStubs, then regenerate the matrix with ./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

  • Forward matches PyTorch within 1e-5 for all Lane-1 cases
  • checkUnmarkedStubs passes with the TODOs gone
  • Matrix NN-layers table shows ✅ for GroupNormalization
  • 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

Activity

  1. added
    good first issueGood for newcomers; no prior SKaiNET codebase knowledge assumed
    sub-issueSub-issue of a tracking issue
    codingImplementation task (DARC: C)
    on Oct 19, 2026
  2. added a commit that references this issue on Oct 31, 2026
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