You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/01 23:17:48 UTC

[GitHub] [tvm] CircleSpin opened a new pull request #7788: [TVMC] Allow direct numpy inputs to run_module

CircleSpin opened a new pull request #7788:
URL: https://github.com/apache/tvm/pull/7788


   When using TVMC from python it more convenient to pass numpy arrays as inputs rather than saved files. This PR moves the file reading into drive_run to maintain the existing behavior for command line TVMC while making the python API cleaner. 


-- 
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:
users@infra.apache.org



[GitHub] [tvm] comaniac commented on a change in pull request #7788: [TVMC] Allow direct numpy inputs to run_module

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #7788:
URL: https://github.com/apache/tvm/pull/7788#discussion_r605997417



##########
File path: python/tvm/driver/tvmc/runner.py
##########
@@ -230,8 +235,8 @@ def make_inputs_dict(inputs_file, shape_dict, dtype_dict, fill_mode):
 
     Parameters
     ----------
-    inputs_file : str
-        Path to a .npz file containing the inputs.
+    inputs : dict

Review comment:
       ```suggestion
       inputs : dict, or None
   ```
   I'm actually not quite sure how this type should be in numpy-style...in Python style I'll just write `Optional[Dict]`, but an argument with this type is usually `inputs=None`. Meanwhile, a function called "make_inputs_dict" but having `inputs=None` is also weird...
   
   Another direction is keeping `inputs` to be `dict`, and it becomes user's resposibility to pass `{}` when no inputs. In this case, you don't need the None checker.




-- 
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:
users@infra.apache.org



[GitHub] [tvm] jwfromm merged pull request #7788: [TVMC] Allow direct numpy inputs to run_module

Posted by GitBox <gi...@apache.org>.
jwfromm merged pull request #7788:
URL: https://github.com/apache/tvm/pull/7788


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] jwfromm commented on pull request #7788: [TVMC] Allow direct numpy inputs to run_module

Posted by GitBox <gi...@apache.org>.
jwfromm commented on pull request #7788:
URL: https://github.com/apache/tvm/pull/7788#issuecomment-812803868


   Thanks @CircleSpin and @comaniac. This is now merged.


-- 
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:
users@infra.apache.org



[GitHub] [tvm] CircleSpin commented on pull request #7788: [TVMC] Allow direct numpy inputs to run_module

Posted by GitBox <gi...@apache.org>.
CircleSpin commented on pull request #7788:
URL: https://github.com/apache/tvm/pull/7788#issuecomment-812227453


   @jwfromm @leandron @comaniac @mdw-octoml 
   
   Thoughts?


-- 
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:
users@infra.apache.org



[GitHub] [tvm] CircleSpin commented on a change in pull request #7788: [TVMC] Allow direct numpy inputs to run_module

Posted by GitBox <gi...@apache.org>.
CircleSpin commented on a change in pull request #7788:
URL: https://github.com/apache/tvm/pull/7788#discussion_r606390878



##########
File path: python/tvm/driver/tvmc/runner.py
##########
@@ -230,8 +235,8 @@ def make_inputs_dict(inputs_file, shape_dict, dtype_dict, fill_mode):
 
     Parameters
     ----------
-    inputs_file : str
-        Path to a .npz file containing the inputs.
+    inputs : dict

Review comment:
       Hi Cody,
   Thanks for the feedback. Just pushed an updated version as you suggested. 




-- 
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:
users@infra.apache.org