[tmva][sofie] fix double-counted dilation in Conv im2col and adding regression test#22474
Open
harz05 wants to merge 1 commit into
Open
[tmva][sofie] fix double-counted dilation in Conv im2col and adding regression test#22474harz05 wants to merge 1 commit into
harz05 wants to merge 1 commit into
Conversation
Contributor
Author
|
kindly review @guitargeek ,thanks |
Test Results 22 files 22 suites 3d 10h 2m 9s ⏱️ Results for commit a6c3952. ♻️ This comment has been updated with latest results. |
Contributor
Author
|
can we try a clean build once? @guitargeek |
Contributor
Author
|
tests are passing, only clang formatting is failing |
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.
Changes or fixes:
Conv generated invalid code and crashed (segfault) for dilation > 1. The operator builds a dilated
_fweight buffer and expandsfAttrKernelShapeto the effective kernel size, but the im2col call was still passed the real dilation, so dilation was applied twice (expanded kernel + dilation). This produced a negative output dimension and an out-of-bounds write.Fix: after the dilated
_fis built, the dense im2col must use dilation 1, since the dilation is already folded into the expanded kernel shape and the_flayout. This is a no-op for dilation 1, so existing Conv tests are unaffected.Also adds a
ConvWithDilationtest (3x3 kernel, dilation 2) with reference output. The suite had no dilation > 1 case before, which is why this was never caught. The full SOFIE test suite passes locally on master.Checklist:
This PR fixes #22473