KEMBAR78
Inductor cpp wrapper: fix QMaxPool by chunyuan-w · Pull Request #112379 · pytorch/pytorch · GitHub
Skip to content

Conversation

@chunyuan-w
Copy link
Collaborator

@chunyuan-w chunyuan-w commented Oct 30, 2023

Stack from ghstack (oldest at bottom):

Based on the Argument types section in this file, for non-inplace Tensor type in schema, it should be mapped to C++ argument of type const Tensor&.

For quantized_max_pool1d and quantized_max_pool2d, the type of the qx input is Tensor type in the schema, thus modified the C++ type to be const Tensor&:

m.def(TORCH_SELECTIVE_SCHEMA("quantized::max_pool1d(Tensor qx, int[] kernel_size, int[] stride, int[] padding, int[] dilation, bool ceil_mode) -> Tensor"));
m.def(TORCH_SELECTIVE_SCHEMA("quantized::max_pool2d(Tensor qx, int[] kernel_size, int[] stride, int[] padding, int[] dilation, bool ceil_mode) -> Tensor"));

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @voznesenskym @penguinwu @EikanWang @Guobing-Chen @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 30, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112379

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 51a0f38 with merge base bbd5b93 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: quantization release notes category label Oct 30, 2023
@github-actions github-actions bot added module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor labels Oct 30, 2023
cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
@chunyuan-w chunyuan-w marked this pull request as draft October 30, 2023 14:05
cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
chunyuan-w added a commit that referenced this pull request Oct 30, 2023
ghstack-source-id: 618df2e
Pull Request resolved: #112379
@chunyuan-w chunyuan-w marked this pull request as ready for review October 31, 2023 05:52
@chunyuan-w chunyuan-w requested a review from jgong5 October 31, 2023 05:52
@chunyuan-w chunyuan-w added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 1, 2023
@chunyuan-w
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
Based on the `Argument types` section in this [file](https://github.com/pytorch/pytorch/tree/cb942ef2b12134bfaa1727295380fe00ebb537c0/aten/src/ATen/native#func), for non-inplace `Tensor` type in schema, it should be mapped to C++ argument of type `const Tensor&`.

For `quantized_max_pool1d` and `quantized_max_pool2d`, the type of the `qx` input is `Tensor` type in the schema, thus modified the C++ type to be `const Tensor&`:
https://github.com/pytorch/pytorch/blob/cb942ef2b12134bfaa1727295380fe00ebb537c0/aten/src/ATen/native/quantized/library.cpp#L222-L223

Pull Request resolved: pytorch#112379
Approved by: https://github.com/jgong5, https://github.com/jansel
ghstack dependencies: pytorch#112373, pytorch#112378
@facebook-github-bot facebook-github-bot deleted the gh/chunyuan-w/4/head branch November 9, 2023 15:24
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
Based on the `Argument types` section in this [file](https://github.com/pytorch/pytorch/tree/cb942ef2b12134bfaa1727295380fe00ebb537c0/aten/src/ATen/native#func), for non-inplace `Tensor` type in schema, it should be mapped to C++ argument of type `const Tensor&`.

For `quantized_max_pool1d` and `quantized_max_pool2d`, the type of the `qx` input is `Tensor` type in the schema, thus modified the C++ type to be `const Tensor&`:
https://github.com/pytorch/pytorch/blob/cb942ef2b12134bfaa1727295380fe00ebb537c0/aten/src/ATen/native/quantized/library.cpp#L222-L223

Pull Request resolved: pytorch#112379
Approved by: https://github.com/jgong5, https://github.com/jansel
ghstack dependencies: pytorch#112373, pytorch#112378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor open source release notes: quantization release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants