Skip to content

C++ API TransformerEncoderLayer#42633

Closed
glaringlee wants to merge 4 commits intogh/glaringlee/25/basefrom
gh/glaringlee/25/head
Closed

C++ API TransformerEncoderLayer#42633
glaringlee wants to merge 4 commits intogh/glaringlee/25/basefrom
gh/glaringlee/25/head

Conversation

@glaringlee
Copy link
Copy Markdown
Contributor

@glaringlee glaringlee commented Aug 5, 2020

Stack from ghstack:

Differential Revision: D22994332

[ghstack-poisoned]
@glaringlee glaringlee requested review from zhangguanheng66 and removed request for ebetica and goldsborough August 5, 2020 21:21
@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Aug 5, 2020

💊 CI failures summary and remediations

As of commit 0f1e68f (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


1 failure confirmed as flaky and can be ignored:

  • pytorch_bazel_test

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 12 times.

@glaringlee
Copy link
Copy Markdown
Contributor Author

@zhangguanheng66 Can you take a look at the logic in this C++ impl? thx
@yf225 Can you take a look at the c++ impl or point me to someone can look into this? thx

glaringlee pushed a commit that referenced this pull request Aug 6, 2020
ghstack-source-id: 78b6a1f
Pull Request resolved: #42633

// gelu test case 2
encoder_input = torch::tensor({
{{0.7462, 0.6653, 0.5679, 0.4891}, {0.5387, 0.1655, 0.3565, 0.0471}},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A quick question. Are those deterministic tests consistent with those in python version?

Copy link
Copy Markdown
Contributor Author

@glaringlee glaringlee Aug 6, 2020

Choose a reason for hiding this comment

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

@zhangguanheng66 yes, I copied them from python test directly, same number, same precision.

glaringlee pushed a commit that referenced this pull request Aug 7, 2020
ghstack-source-id: ecef567
Pull Request resolved: #42633
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@glaringlee merged this pull request in 98de150.

@facebook-github-bot facebook-github-bot deleted the gh/glaringlee/25/head branch August 11, 2020 14:16
@EddieMataEwy
Copy link
Copy Markdown

TransformerEncoderLayer options do not match current Pytorch options, particularly batch_first and norm_first.
Is there any plan to add the options to the C++ API?
Thank you!

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary: Pull Request resolved: pytorch#42633

Test Plan: Imported from OSS

Reviewed By: ezyang

Differential Revision: D22994332

Pulled By: glaringlee

fbshipit-source-id: 873abdf887d135fb05bde560d695e2e8c992c946
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