[BYOC-DNNL] Support DNNL optimal layout#10421
Merged
Merged
Conversation
added 9 commits
March 1, 2022 17:07
57e24e5 to
56ef1a1
Compare
56ef1a1 to
a9314df
Compare
329dcab to
0190376
Compare
masahi
reviewed
Mar 4, 2022
| // infer weight's shape for group convolution | ||
| wshape = {{param->groups, indexdiv(param->channels, param->groups), | ||
| indexdiv(dshape_nchw[1], param->groups), param->kernel_size[0], | ||
| param->kernel_size[1]}}; |
Member
There was a problem hiding this comment.
I'm pretty sure we already support group convolution and this one looks unusual. If this is DNNL specific, can you come up with a better name than is_group?
Author
There was a problem hiding this comment.
DNNL prefer to use GOIHWxg layout for group conv's weights. It seems that the layout cannot be transformed from OIHW to GOIHWxg directly. Because the dims are not matched for this two layout. Have this kind of transformation already been supported? If not, how about use is_dnnl_group_conv instead of is_group?
Member
There was a problem hiding this comment.
I don't think such transform is possible now. Yeah, is_dnnl_group_conv sounds better.
0190376 to
0357162
Compare
masahi
approved these changes
Mar 7, 2022
ziqiangxu8457
pushed a commit
to ziqiangxu8457/tvm
that referenced
this pull request
Mar 9, 2022
* enable dnnl optimal layout for supported ops * verfied cv models with onednnv1.7 * rebase to the latest main branch * fix format related comments * remove unnecessary layout transformation * change deconv into conv_transpose * rename some variables and functions * simplify query_layout * add checkes for query_layout * fix lint * move partition_for_dnnl from dnnl.py to test_dnnl.py * remove unnecessary model test * add more dnnl layout * rename flag in convolution.cc * enhance dnnl layout
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
* enable dnnl optimal layout for supported ops * verfied cv models with onednnv1.7 * rebase to the latest main branch * fix format related comments * remove unnecessary layout transformation * change deconv into conv_transpose * rename some variables and functions * simplify query_layout * add checkes for query_layout * fix lint * move partition_for_dnnl from dnnl.py to test_dnnl.py * remove unnecessary model test * add more dnnl layout * rename flag in convolution.cc * enhance dnnl layout
liaopeiyuan
added a commit
to zk-ml/tachikoma
that referenced
this pull request
Sep 19, 2022
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.
This PR aims to support BYOC-DNNL run in the dnnl optimal layout. There are two changes needed to be noticed.
GOIHWfirst, so that it can run in optimal dnnl layout like HWOIG16g. Changes inConvolution.ccis needed to enable group conv run in GOIHW layout.get_optimal_layout_for_convandget_optimal_layout_for_deconvfunctions are registered intvm.relay.contribto query the optimal dnnl layout.The related test cases has been added as well.