Skip to content

Commit

Permalink
Abjindal/torch api change gelu (microsoft#10833)
Browse files Browse the repository at this point in the history
* changing gelu backward op and adding required files

* cleaning up file and adding comments

* version comparison issue
  • Loading branch information
ajindal1 authored and lavanyax committed Mar 29, 2022
1 parent 2e394b3 commit 5958667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions orttraining/orttraining/eager/opgen/opgen/atenops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import torch
from packaging import version

TORCH_API_CHANGE_VERSION = "1.11.0"
TORCH_API_CHANGE_VERSION = "1.11.1"

kMSDomain = 'onnxruntime::kMSDomain'

Expand Down Expand Up @@ -101,7 +101,7 @@ def __init__(self, dY, X):

# Signature of gelu_backward was changed in this commit id 983ba5e585485ed61a0c0012ef6944f5685e3d97 and PR 61439
# This is done to make sure it is backward and future compatible
if version.parse(torch.__version__) <= version.parse(TORCH_API_CHANGE_VERSION):
if version.parse(torch.__version__) < version.parse(TORCH_API_CHANGE_VERSION):
hand_implemented['aten::gelu_backward'] = GeluGrad('grad', 'self')
else:
hand_implemented['aten::gelu_backward'] = GeluGrad('grad_output', 'self')
Expand Down

0 comments on commit 5958667

Please sign in to comment.