You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Lane 2 · kotlin-core] TransposedConv2d — CPU kernel for convTranspose2d #1373
Sub-issue of #1371 ([Feature]: TransposedConv2d — convTranspose2d op, CPU kernel, backward and StableHLO lowering).
Lane: 2 · Kotlin core Skill needed: Kotlin; comfortable reading nested-loop tensor kernels. No autodiff or compiler knowledge needed. Size: m (1–2 days) Blocked by: nothing
What to do
Override convTranspose2d in DefaultCpuOps (skainet-backends/skainet-backend-cpu/src/commonMain/kotlin/sk/ainet/exec/tensor/ops/DefaultCpuOps.kt). Copy the structure of convTranspose1d in the same file and add the second spatial axis; take shape validation, bias handling and group indexing from conv2d.
Put @NotImplemented on nothing new — instead remove@NotImplemented from TensorOps.convTranspose2d (skainet-lang/skainet-lang-core/src/commonMain/kotlin/sk/ainet/lang/tensor/ops/TensorOps.kt) and from the TransposedConv2d class, and drop the now-stale comment in TransposedConv2d.forward.
Add tests in skainet-backends/skainet-backend-cpu/src/commonTest using the Lane-1 cases (or hand-computed tiny cases if Lane 1 is not done yet), plus a TransposedConv2d.forward test in lang-core next to AdvancedConvolutionsTest.
Run ./gradlew :skainet-backends:skainet-backend-cpu:jvmTest :skainet-lang:skainet-lang-core:jvmTest checkUnmarkedStubs, 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
TransposedConv2d.forward returns PyTorch-matching output on CPU
Matrix shows ✅ in the cpu column for convTranspose2d and ✅ for TransposedConv2d in the NN-layers table
apiCheck passes (run apiDump if the override changes the dump)
Result reported back on the parent issue
Notes
Non-FP32 dtypes: follow whatever conv2d does for dtype dispatch; do not copy the as Float casts blindly. If that turns out to be a bigger job, ship FP32 and open a follow-up.
Activity