Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PYTORCH]ImplicitTensorToNum support added #5603

Merged
merged 1 commit into from
May 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,13 @@ def _impl(inputs, input_types):
return arr
return _impl


def _tensortonum():
def _impl(inputs, input_types):
return inputs[0]
return _impl


def _view():
def _impl(inputs, input_types):
data = inputs[0]
Expand Down Expand Up @@ -1699,6 +1706,7 @@ def _get_convert_map(prelude):
"aten::expand" : _expand(),
"aten::Int" : _int(),
"prim::NumToTensor" : _numtotensor(),
"prim::ImplicitTensorToNum" : _tensortonum(),
"aten::constant_pad_nd" : _pad(),
"aten::permute" : _transpose(prelude),
"aten::sum" : _reduce("sum"),
Expand Down