-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[inductor] add conv_transpose2d unary fusion for cpu in inference mode #90265
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/90265
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 FailuresAs of commit 88e7c73: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
ghstack-source-id: 5cc3977 Pull Request resolved: pytorch#90265
[ghstack-poisoned]
…ference mode" cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
torch/_inductor/ir.py
Outdated
@@ -3411,6 +3411,70 @@ def _prepare_convolution_fusion_create( | |||
return inputs, constant_args, kernel_layout, req_stride_order | |||
|
|||
|
|||
def _prepare_convolution_transpose_fusion_create( | |||
cls, |
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.
Could we combine this code with convolution?
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.
Updated the code to reuse the _prepare_convolution_fusion_create
function for ConvTranspose
.
…ference mode" cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
test/inductor/test_torchinductor.py
Outdated
[1, 3], | ||
[1, 2], | ||
[1, 4], | ||
[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this c 8000 omment to others. Learn more.
Cover non-zero padding as well?
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.
Changed padding from [0]
to [0, 1]
to covert the non-zero padding case.
…ference mode" cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
ghstack-source-id: c019aa2 Pull Request resolved: pytorch#90265
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
@pytorchbot revert -c ghfirst -m "earlier pr on stack got yanked, this one needs to go too" |
@pytorchbot successfully started a revert job. Check the current status here. |
@chunyuan-w your PR has been successfully reverted. |
…ence mode (#90265)" This reverts commit d6fe983. Reverted #90265 on behalf of https://github.com/ezyang due to earlier pr on stack got yanked, this one needs to go too
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ference mode" An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063. The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor. The fusion of ConvTranspose2d with the below OPs is supported: - relu - sigmoid - tanh - hardswish - leaky_relu - hardtanh - gelu cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
ghstack-source-id: a8958be Pull Request resolved: pytorch#90265
Re-opened in #91954 |
…ose2d unary fusion for cpu in inference mode" Re-land #90265. Depend on internal ideep upgrade. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…on for cpu in inference mode" Re-land #90265. Depend on internal ideep upgrade. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ose2d unary fusion for cpu in inference mode" Re-land #90265. Depend on internal ideep upgrade. [Update]: internal ideep upgrade issue is resolved in #92239. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…on for cpu in inference mode" Re-land #90265. Depend on internal ideep upgrade. [Update]: internal ideep upgrade issue is resolved in #92239. cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang Guobing-Chen zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…in inference mode (#91954) Re-land #90265. Depend on internal ideep upgrade. [Update]: internal ideep upgrade issue is resolved in #92239. Pull Request resolved: #91954 Approved by: https://github.com/jgong5, https://github.com/desertfire
Stack from ghstack (oldest at bottom):
An FX transformation is added to fuse ConvTranspose2d with eltwise OPs in torchinductor for CPU in inference mode, following the implementation in #87063.
The fusion OP is implemented in #90264 and will be treated as an extern kernel call in torchinductor.
The fusion of ConvTranspose2d with the below OPs is supported:
cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire