Skip to content

[Lane 2 · kotlin-core] ONNX importer — import ONNX Pad as a real op #1405

Open

Description

@michalharakal

Sub-issue of #1400 ([Feature]: ONNX importer — replace placeholder ops with real operations, stream tensors in OnnxModelReader).

Lane: 2 · Kotlin core
Skill needed: Kotlin. No ONNX-protobuf knowledge needed — the node is already parsed; you only map it.
Size: s (a few hours)
Blocked by: nothing

What to do

  1. In skainet-io/skainet-io-onnx/src/commonMain/kotlin/sk/ainet/io/onnx/OnnxImport.kt (toOperation()), Pad currently maps to OnnxPlaceholderOperation, which throws when the graph is executed. Map it to the SKaiNET pad2d operation for 4-D constant-mode padding (reject other modes with a clear error) instead, copying how RELU / CONV map to real operations.
  2. Read the ONNX operator spec for its attributes and defaults: https://onnx.ai/onnx/operators/
  3. Add a one-node import + execute test next to the existing importer tests in skainet-io/skainet-io-onnx/src/commonTest.
  4. Run ./gradlew :skainet-io:skainet-io-onnx:jvmTest.

Acceptance

  • A one-node Pad graph imports and executes with the expected values
  • 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

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