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:29:53 UTC

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

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