KEMBAR78
Inductor cpp wrapper: support MkldnnRnnLayer by chunyuan-w · Pull Request #107858 · pytorch/pytorch · GitHub
Skip to content

Conversation

@chunyuan-w
Copy link
Collaborator

@chunyuan-w chunyuan-w commented Aug 24, 2023

Stack from ghstack (oldest at bottom):

  1. Directly use the codegen function of the parent class which already supported both python and cpp wrapper.
  2. The output of the at::mkldnn_rnn_layer OP is actually a std::tuple
    std::tuple<Tensor, Tensor, Tensor, Tensor> mkldnn_rnn_layer(const Tensor& input,
    Fix the type when calling MultiOutput.

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @ngimel

@pytorch-bot
Copy link

pytorch-bot bot commented Aug 24, 2023

🔗 Helpful Links

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

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

✅ No Failures

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

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

chunyuan-w added a commit that referenced this pull request Aug 24, 2023
ghstack-source-id: 81f4802
Pull Request resolved: #107858
@chunyuan-w chunyuan-w added the topic: not user facing topic category label Aug 24, 2023
1. Directly use the `codegen` function of the parent class which already supported both python and cpp wrapper.
2. The output of the `at::mkldnn_rnn_layer` OP is actually a `std::tuple` https://github.com/pytorch/pytorch/blob/1491bae277668fac459937c874a49c3bb8adedcb/aten/src/ATen/native/mkldnn/RNN.cpp#L218 Fix the type when calling `MultiOutput`.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov

[ghstack-poisoned]
chunyuan-w added a commit that referenced this pull request Sep 26, 2023
ghstack-source-id: f65f0e8
Pull Request resolved: #107858
1. Directly use the `codegen` function of the parent class which already supported both python and cpp wrapper.
2. The output of the `at::mkldnn_rnn_layer` OP is actually a `std::tuple` https://github.com/pytorch/pytorch/blob/1491bae277668fac459937c874a49c3bb8adedcb/aten/src/ATen/native/mkldnn/RNN.cpp#L218 Fix the type when calling `MultiOutput`.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov

[ghstack-poisoned]
chunyuan-w added a commit that referenced this pull request Sep 26, 2023
ghstack-source-id: 68af341
Pull Request resolved: #107858
@chunyuan-w
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

1. Directly use the `codegen` function of the parent class which already supported both python and cpp wrapper.
2. The output of the `at::mkldnn_rnn_layer` OP is actually a `std::tuple` https://github.com/pytorch/pytorch/blob/1491bae277668fac459937c874a49c3bb8adedcb/aten/src/ATen/native/mkldnn/RNN.cpp#L218 Fix the type when calling `MultiOutput`.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/chunyuan-w/33/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/107858)

pytorchmergebot pushed a commit that referenced this pull request Sep 27, 2023
ghstack-source-id: d167d8a
Pull Request resolved: #107858
@chunyuan-w chunyuan-w requested a review from jgong5 September 27, 2023 06:25
1. Directly use the `codegen` function of the parent class which already supported both python and cpp wrapper.
2. The output of the `at::mkldnn_rnn_layer` OP is actually a `std::tuple` https://github.com/pytorch/pytorch/blob/1491bae277668fac459937c874a49c3bb8adedcb/aten/src/ATen/native/mkldnn/RNN.cpp#L218 Fix the type when calling `MultiOutput`.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov

[ghstack-poisoned]
@chunyuan-w chunyuan-w requested a review from jgong5 September 28, 2023 06:17
output_code_log.removeHandler(ch)
config.debug = old_debug_config
# We use the patch context manager instead of using it as a decorator.
# In this way, we can ensure that the attribute is patched and unpacted correctly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo

Suggested change
# In this way, we can ensure that the attribute is patched and unpacted correctly
# In this way, we can ensure that the attribute is patched and unpatched correctly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the typo.

1. Directly use the `codegen` function of the parent class which already supported both python and cpp wrapper.
2. The output of the `at::mkldnn_rnn_layer` OP is actually a `std::tuple` https://github.com/pytorch/pytorch/blob/1491bae277668fac459937c874a49c3bb8adedcb/aten/src/ATen/native/mkldnn/RNN.cpp#L218 Fix the type when calling `MultiOutput`.


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov

[ghstack-poisoned]
chunyuan-w added a commit that referenced this pull request Sep 28, 2023
ghstack-source-id: 266ed21
Pull Request resolved: #107858
@chunyuan-w chunyuan-w added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 28, 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

@facebook-github-bot facebook-github-bot deleted the gh/chunyuan-w/33/head branch October 2, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants