Skip to content

[tmva][sofie] Fix convolution codegen with dilation#22475

Closed
pumarogie wants to merge 1 commit into
root-project:masterfrom
pumarogie:fix/sofie-conv-dilation
Closed

[tmva][sofie] Fix convolution codegen with dilation#22475
pumarogie wants to merge 1 commit into
root-project:masterfrom
pumarogie:fix/sofie-conv-dilation

Conversation

@pumarogie
Copy link
Copy Markdown

This fixes generated SOFIE convolution code for ONNX models that use dilation. The convolution operator already expands the filter tensor according to the dilation attributes, so the generated im2col call must scan the expanded filter contiguously instead of applying dilation a second time.

The change updates the generated 1D, 2D, and 3D im2col calls, including grouped convolutions, to use unit dilation after the filter expansion step. It also adds a compact ONNX regression model with a dilated 2D convolution and expected output coverage in TestCustomModelsFromONNX.

Verification:

  • Built emitFromONNX and TestCustomModelsFromONNX in /tmp/root-sofie-build5 using protobuf 28.3.
  • Passed: PYTHONPATH=/tmp/py311-numpy ctest --test-dir /tmp/root-sofie-build5 -R 'tmva-sofie-test-(emitFromONNX-build|SofieCompileModels_ONNX|TestCustomModelsFromONNX)' --output-on-failure

All 3 selected tests passed.

@pumarogie
Copy link
Copy Markdown
Author

Closing this in favor of #22474, which was opened first for the same issue and covers the same SOFIE convolution dilation bug.

@pumarogie pumarogie closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant