Skip to content

Add data-type promotion to gelu_backward.#7090

Merged
ysiraichi merged 1 commit intomasterfrom
ysiraichi/fix-gelu-backward-dtype-promotion
May 22, 2024
Merged

Add data-type promotion to gelu_backward.#7090
ysiraichi merged 1 commit intomasterfrom
ysiraichi/fix-gelu-backward-dtype-promotion

Conversation

@ysiraichi
Copy link
Copy Markdown
Collaborator

Fix: #7084

This PR adds data-type promotion to gelu_backward operation. Previously, there was none. So, the kernel implicitly expected the arguments to be of the same data-type. This might not be the case when using AMP.

cc @miladm @JackCaoG

@ysiraichi ysiraichi requested a review from JackCaoG May 21, 2024 23:52
@vanbasten23
Copy link
Copy Markdown
Collaborator

Curious, how did you find out it was gelu_backward based on the error message in #7084 (comment) (which I don't see any hint of gelu_backward)?

@ysiraichi
Copy link
Copy Markdown
Collaborator Author

Since it was a non-dynamo bug, it was thanks to XLA_USE_EAGER_DEBUG_MODE=1 that I found the bug.

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.

[torchbench] timm_nfnet training failing on non-dynamo.

3 participants