Skip to content

Conversation

@jamesr66a
Copy link
Collaborator

@jamesr66a jamesr66a commented Nov 11, 2019

Stack from ghstack:

Fixes #27963

Differential Revision: D18436569

@jamesr66a jamesr66a requested a review from apaszke as a code owner November 11, 2019 21:53
jamesr66a pushed a commit that referenced this pull request Nov 11, 2019
ghstack-source-id: 996a136
Pull Request resolved: #29585
Copy link
Member

@jianyuh jianyuh left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for finishing this so quickly!

Comment on lines 1210 to 1215
if (use_miopen(data, dropout_p)) {
Tensor output, hy, cy;
lstm_packed_miopen_stub(data.type().device_type(), output, hy, cy, data, batch_sizes, hx,
_params, has_biases, num_layers, dropout_p, train, bidirectional);
return std::make_tuple(std::move(output), std::move(hy), std::move(cy));
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to add the same handler in Line 1160?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, not sure this should even be here. I just directly copy-pasted from the regular LSTM function

BTW do we actually support cudnn for these ops?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jianyuh I don't think those implementations (miopen and cudnn) actually support dynamic quantization

Copy link
Member

Choose a reason for hiding this comment

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

Oh I thought you were asking if lstm_packed_miopen has cuda/cudnn implementation. Yep, the dynamic quantization is only supported on the CPU side.

Copy link
Member

@jianyuh jianyuh left a comment

Choose a reason for hiding this comment

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

Check the BC issue:

Nov 11 23:15:22 processing existing schema:  aten::quantized_lstm(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, int? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor)
Nov 11 23:15:22 Can NOT find backward compatible schemas after changes for schema aten::quantized_lstm(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, int? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor) from the following candidates:
Nov 11 23:15:22 [
Nov 11 23:15:22 aten::quantized_lstm.data(Tensor data, Tensor batch_sizes, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, *, int? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor)
Nov 11 23:15:22 	aten::quantized_lstm.tensor(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, int? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor)
Nov 11 23:15:22 ]
Nov 11 23:15:22 The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not.

@jamesr66a
Copy link
Collaborator Author

@jianyuh I believe the BC issue is a false positive: the only difference from before is it has the .tensor tag at the end. @houseroad do you mind taking a look?

jamesr66a pushed a commit that referenced this pull request Nov 12, 2019
ghstack-source-id: 5641931
Pull Request resolved: #29585
@jamesr66a jamesr66a dismissed jianyuh’s stale review November 12, 2019 03:33

Changed schema back

jamesr66a pushed a commit that referenced this pull request Nov 12, 2019
ghstack-source-id: 5f416ff
Pull Request resolved: #29585
jamesr66a pushed a commit that referenced this pull request Nov 13, 2019
ghstack-source-id: 66a7820
Pull Request resolved: #29585
zdevito pushed a commit to zdevito/ATen that referenced this pull request Nov 13, 2019
Summary: Pull Request resolved: pytorch/pytorch#29585

Test Plan: Imported from OSS

Differential Revision: D18436569

Pulled By: jamesr66a

fbshipit-source-id: 0f32c0fcc897894e30d8e7ff203392c1a961ce60
@facebook-github-bot
Copy link
Contributor

@jamesr66a merged this pull request in 20fb8a8.

jianyuh added a commit that referenced this pull request Nov 14, 2019
jianyuh added a commit that referenced this pull request Nov 14, 2019
…ntized LSTM

As Title says. This is a follow-up for #29585. Check #27963

Differential Revision: [D18497319](https://our.internmc.facebook.com/intern/diff/D18497319/)

ghstack-source-id: 93883524
Pull Request resolved: #29786
@facebook-github-bot facebook-github-bot deleted the gh/jamesr66a/144/head branch November 16, 2019 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants