mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Abjindal/torch api change gelu (#10833)
* changing gelu backward op and adding required files * cleaning up file and adding comments * version comparison issue
This commit is contained in:
parent
1d545dfe87
commit
3ae2bfaefe
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ from opgen.onnxops import *
|
|||
import torch
|
||||
from packaging import version
|
||||
|
||||
TORCH_API_CHANGE_VERSION = "1.11.0"
|
||||
TORCH_API_CHANGE_VERSION = "1.11.1"
|
||||
|
||||
kMSDomain = 'onnxruntime::kMSDomain'
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ hand_implemented = {
|
|||
|
||||
# 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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue