ConvTranspose support: capability, int8 requant, and compile-time fail-closed gate - #30
Merged
Conversation
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.
Summary
Adds the compiler side of ConvTranspose support and closes a compile-time gate
gap. When a graph contains a ConvTranspose, the compiler now declares it
supported, lays its weight out in the runtime's expected OHWI layout, computes
the correct int8 requant scale, and emits a plan the runtime executes bit-exact
against ONNX Runtime. Separately,
tigris compilenow fails closed for anyoperator that has no runtime kernel, instead of compiling and failing at device
load.
Pairs with the runtime change in raws-labs/tigris-runtime#32, which executes the
transposed convolution. Merge tigris-runtime#32 first.
What changed
ConvTransposeadded to the reference and s8 capability sets; the capabilitymatrix is regenerated (CMSIS-NN / ESP-NN resolve to the s8_ref fallback, as
for other reference-native ops). The already-present weight-layout transpose
(
IOHW -> OHWI) and attribute packing now take effect.ConvTransposeadded to the effective-scale operatorset so its per-output-channel output multiplier and shift use
input_scale * weight_scale / output_scale. ConvTranspose's weight is[C_in, C_out, kH, kW], so per-output-channel quantization uses axis 1; thisis verified end to end.
validate_operator_supportnowrejects any operator whose type has no runtime route on any backend, with an
actionable diagnostic, instead of encoding a plan that only fails at load.
ConvTranspose passes because it now has a route; MatMul, Pad, BatchNorm and
the other schema-known-but-unimplemented ops now fail at compile.
group == 1and
dilation == 1are enforced (mirroring the runtime loader guards);output_paddingis absorbed into the ONNX-inferred output shape.multi-output-channel), a kernel-greater-than-stride overlap case, an
output_padding case, an asymmetric-pad case, and a Conv-then-ConvTranspose
case, all asserted bit-exact against ONNX Runtime.
Testing
validation tests and the general-gate rejection test.
matches ONNX Runtime (float allclose 1e-5; int8 at the established 1-LSB QDQ
tolerance). The capability-to-runtime consistency check passes.