-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[quant][core][improvements] Removed reflection_pad1d_quantized_cpu, dimension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu #74755
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
…-quantized reflection_pad1d_out_template Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit c6a3219 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
…zed and non-quantized reflection_pad1d_out_template" Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` [ghstack-poisoned]
…-quantized reflection_pad1d_out_template Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: 7a9b135 Pull Request resolved: #74755
…zed and non-quantized reflection_pad1d_out_template" Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` [ghstack-poisoned]
…-quantized reflection_pad1d_out_template Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: 03cc045 Pull Request resolved: #74755
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…zed and non-quantized reflection_pad1d_out_template" Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…-quantized reflection_pad1d_out_template Summary: This PR is part of a series of PRs addressing #54150, related to using dispatcher for calls to quantized backends as opposed to if/else conditionals. This particular PR separates the quantized and non-quantized implementation for reflection_pad1d_out_template and reflection_pad1d_out_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: 342ac73 Pull Request resolved: #74755
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
jerryzh168
left a comment
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.
Looks good, thanks!
| pad_l = padding[0]; | ||
| pad_r = padding[1]; | ||
| nplane = input_.size(dim_plane); | ||
| input_w = input_.size(dim_w); | ||
| output_w = input_w + pad_l + pad_r; |
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.
actually I don't feel it's a good practice to pass in reference and modify them in the function, can we just copy around this code or have a function that returns these things?
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.
does structured kernel help here as well? cc @ezyang
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.
I have no idea what this code is trying to do, but yes, structured kernels let you precompute quantities like this so they are passed in directly to the function.
…ized_cpu and" Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template (this code already present in reflection_pad1d), as well as the implementation for reflection_pad1d_quantized_cpu. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…ized_cpu, dimension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu" Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…imension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: 0fb6446 Pull Request resolved: #74755
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ized_cpu, dimension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu" Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…imension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: 3ba98d0 Pull Request resolved: #74755
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ized_cpu, dimension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu" Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…ized_cpu, dimension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu" Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` Differential Revision: [D35148152](https://our.internmc.facebook.com/intern/diff/D35148152) [ghstack-poisoned]
…imension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu Summary: With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test plan: ``` python run_test.py ``` ghstack-source-id: e81672a Pull Request resolved: #74755
|
@dzdang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…imension and output resizing code in reflection_pad1d_out_template and implemented reflection_pad1d_out_quantized_cpu (#74755) Summary: Pull Request resolved: #74755 With the introduction of structured kernel support for quantized tensors in #74560, we are able to remove the dimension and output resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d. reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d after the changes in the linked PR. reflection_pad1d_out_quantized_cpu was implemented for quantized tensors. This PR should introduce no functional changes. Test Plan: ``` python run_test.py ``` ``` python run_test.py ``` Differential Revision: D35148152 D35148152 Reviewed By: mruberry Pulled By: dzdang fbshipit-source-id: aa41e0704655f9b97ca6032159662ea86609a964
Stack from ghstack:
Summary: With the introduction of structured kernel support for quantized tensors in
#74560, we are able to remove the dimension and output
resizing code in reflection_pad1d_out_template. This code is already present in reflection_pad1d.
reflection_pad1d_quantized_cpu has also been removed as quantized tensors can now use reflection_pad1d
after the changes in the linked PR.
reflection_pad1d_out_quantized_cpu was implemented for quantized tensors.
This PR should introduce no functional changes.
Test plan:
Differential Revision: D35148152