Skip to content

Remove restriction on IGEMM lowering for dilated convolutions - #21011

Merged
nirvedhmeshram merged 2 commits into
mainfrom
dilated_igemm
Jun 5, 2025
Merged

nirvedhmeshram merged 2 commits into
mainfrom
dilated_igemm

Conversation

@yzhang93

@yzhang93 yzhang93 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

The IGEMM works out of the box for the dilated convolutions by removing the previous guard condition. The output numerics are correct for forward convs. The performance can be improved from 475us to 195us with IGEMM for the following conv kernel.

convbfp16 -n 16 -c 144 -H 24 -W 16 -k 144 -y 3 -x 3 -p 2 -q 2 -u 1 -v 1 -l 2 -j 2 -m conv -g 1 -F 1 -t 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --iter 100

@benvanik

benvanik commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

(when pushing branches to the main repository you need to follow the branch naming policy of users/[github username]/branch-name: https://iree.dev/developers/general/contributing/#branch-naming - or, submit PRs from your own fork where anything goes :)

@nirvedhmeshram nirvedhmeshram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we should add a test. Could just adapt an existing test if that's easier, I think there is one for strides.

@yzhang93

yzhang93 commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

(when pushing branches to the main repository you need to follow the branch naming policy of users/[github username]/branch-name: https://iree.dev/developers/general/contributing/#branch-naming - or, submit PRs from your own fork where anything goes :)

Oh, my bad, I thought I pushed to my forked branch. Thanks for pointing this out.

@benvanik

benvanik commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

(no worries, just fyi for the future :)

Signed-off-by: yzhang93 <[email protected]>
@nirvedhmeshram
nirvedhmeshram merged commit 4889cb5 into main Jun 5, 2025
@nirvedhmeshram
nirvedhmeshram deleted the dilated_igemm branch June 5, 2025 14:38
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
The IGEMM works out of the box for the dilated convolutions by removing
the previous guard condition. The output numerics are correct for
forward convs. The performance can be improved from 475us to 195us with
IGEMM for the following conv kernel.
```
convbfp16 -n 16 -c 144 -H 24 -W 16 -k 144 -y 3 -x 3 -p 2 -q 2 -u 1 -v 1 -l 2 -j 2 -m conv -g 1 -F 1 -t 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --iter 100
```

---------

Signed-off-by: yzhang93 <[email protected]>
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.

3 participants