masahi commented on a change in pull request #4964: [Torch] Add initial control 
flow support 
URL: https://github.com/apache/incubator-tvm/pull/4964#discussion_r385931158
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -123,7 +124,8 @@ def _impl(inputs, input_types):
         else:
             assert "data type {} could not be parsed in ones op" % (type(data))
 
-        return _op.full(_expr.const(1), shape, 
dtype=_convert_data_type(input_types[0]))
+        dtype = "float32"
 
 Review comment:
   It is "more correct" than the current implementation which uses 
`input_types[0]`. `inputs[0]` is size, so `input_types[0]` is always int.
   
   but right, one of the inputs should be dtype, we should choose relay dtype 
accordingly

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to