Repository navigation
feat(io-onnx): import ONNX ConvTranspose as real convTranspose1d/2d ops - #1468
Merged
Merged
Conversation
…ps (#1406) Map ConvTranspose nodes to the convTranspose1d / convTranspose2d tensor ops (auto_pad=NOTSET, symmetric pads, no output_shape; other forms keep the fail-loud placeholder) and add the matching ComputeGraphExecutor dispatch arms, parsing stride/padding/outputPadding/dilation from both KSP-trace lists and importer parameters. Import + execute tests cover 1D, 2D default, stride+bias, symmetric pads and the unsupported fallbacks.
12 tasks
aharakal
approved these changes
Nov 5, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1406 (sub-issue of #1400).
What
OnnxImport.toOperation():ConvTransposenow maps to the realconvTranspose1d/convTranspose2dtensor ops instead ofOnnxPlaceholderOperation. Spatial rank is taken fromkernel_shape/strides/dilations/padsor the weight initializer's rank.auto_pad=NOTSET, symmetricpads(ONNX pads are[begins..., ends...]while the SKaiNET ops take one symmetric padding per axis), nooutput_shapeattribute. Anything else keeps the placeholder so execution fails loudly instead of producing wrong values.OnnxConvTranspose1dOperation/OnnxConvTranspose2dOperationcarry shape inference:out = (in − 1)·stride − 2·padding + dilation·(k − 1) + outputPadding + 1, withC_out = weight[1] · groups.ComputeGraphExecutor: newconvTranspose1d/convTranspose2ddispatch arms calling the TensorOps methods (merged in feat(ops): implement convTranspose2d — CPU kernel, backward and StableHLO lowering #1464), with a smallintPairhelper that accepts the per-axis parameters as aPair, a two-element list (KSP traces and the importer both record lists), or a single number.Tests
OnnxConvTransposeExecuteTest(jvmTest, CPU backend): one-node import + execute with value assertions for 2D default attributes, stride 2 + bias, symmetric pads, and 1D; placeholder + fail-loud paths forauto_pad=SAME_UPPERand asymmetric pads../gradlew :skainet-io:skainet-io-onnx:jvmTest :skainet-compile:skainet-compile-dag:jvmTest apiCheck checkUnmarkedStubs— green (no public API change).