-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize x86 conv3d_ndhwc using data packing approach. #4866
Conversation
@anijain2305 Please take a look |
13d4ecf
to
eca65c1
Compare
Thank you for this work! It would be great if you can provide benchmarking data comparing tvm conv3d performance VS existing solution(tensorflow + mkldnn?) to see where current implementation stands. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments.
Overall looks good to me. Currently, you have used NCHW schedule of Conv2D. you should also try Conv2d NCHWc schedule. That schedule gives best performance for Conv2D, and has potential here as well.
https://github.com/apache/incubator-tvm/blob/master/topi/python/topi/nn/conv2d.py#L421
eca65c1
to
89c72d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go from my side! If you can, please add some TF comparison.
Add tuneable conv3d_ndhwc schedule
89c72d8
to
d7f5d50
Compare
@kevinthesun TVM: 0.007 sec; X: 1.645; TF: 0.011 sec; input_shape=(1, 16, 256, 256, 1) ; kernel_shape=(1, 3, 3, 1, 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. As suggestion from @anijain2305, we might also want to try similar data layout as conv2d_NCHWc to see whether we can get more performance improvement.
Thanks @alexgl-github @anijain2305 |
Add tuneable conv3d_ndhwc schedule
Add tuneable conv3d_ndhwc schedule
Add tuneable conv3d_ndhwc schedule
Add tuneable conv3d_ndhwc schedule
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.