Skip to content

[Lane 2 · kotlin-core] TransposedConv2d — StableHLO lowering for convTranspose2d #1375

Open

Description

@michalharakal

Sub-issue of #1371 ([Feature]: TransposedConv2d — convTranspose2d op, CPU kernel, backward and StableHLO lowering).

Lane: 2 · Kotlin core
Skill needed: Kotlin and basic MLIR/StableHLO reading. No CPU-kernel knowledge needed.
Size: s (a few hours)
Blocked by: nothing

What to do

  1. Add a convTranspose2d case to NeuralNetOperationsConverter (skainet-compile/skainet-compile-hlo/src/commonMain/kotlin/sk/ainet/compile/hlo/converters/), next to conv2d: emit stablehlo.convolution with lhs_dilation = stride, padding dilation*(k-1) - padding (+ outputPadding on the high side), the kernel spatially reversed and its I/O feature dims swapped.
  2. Add a converter test modelled on the existing conv2d export tests (e.g. DagConvGatherPoolExportTest).
  3. Run ./gradlew :skainet-compile:skainet-compile-hlo:jvmTest, regenerate the matrix (./gradlew :skainet-compile:skainet-compile-hlo:jvmTest --tests '*HloCoverageDumpTest' :skainet-compile:skainet-compile-dag:jvmTest --tests '*BackwardCoverageDumpTest' generateDocs) and commit it.

Acceptance

  • StableHLO column shows ✅ for convTranspose2d
  • Emitted MLIR for one stride-2 case is checked in the test
  • Result reported back on the parent issue

Notes

The same lowering with one spatial axis fixes convTranspose1d (also ❌ in the StableHLO column) — see the StableHLO coverage feature.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    codingImplementation task (DARC: C)size: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