Skip to content

Commit

Permalink
[PYTORCH]ImplicitTensorToNum support added (apache#5603)
Browse files Browse the repository at this point in the history
  • Loading branch information
siju-samuel authored and Trevor Morris committed Jun 18, 2020
1 parent 7851ad5 commit 529c869
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 529c869

Please sign in to comment.