junrushao commented on code in PR #15670:
URL: https://github.com/apache/tvm/pull/15670#discussion_r1319170102


##########
python/tvm/relax/frontend/nn/spec.py:
##########
@@ -105,17 +126,28 @@ def from_raw(spec: MethodSpecType, method: Callable) -> 
"MethodSpec":
         method_signature = inspect.signature(method)
         arg_names = list(method_signature.parameters.keys())
         arg_specs = []
+
+        def _convert_arg_spec(arg_spec, arg_name):
+            if arg_spec is Int or arg_spec is int:
+                return Int()
+            elif isinstance(arg_spec, str) and arg_spec == "int":
+                return Int()
+            elif isinstance(arg_spec, (Int, Tensor)):

Review Comment:
   ```suggestion
               elif isinstance(arg_spec, (Int, Tensor, Tuple)):
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to