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 2022/08/03 10:34:05 UTC

[GitHub] [tvm] wrongtest-intellif opened a new pull request, #12288: [TIR][Schedule] Support annotate dict typed value

wrongtest-intellif opened a new pull request, #12288:
URL: https://github.com/apache/tvm/pull/12288

   Allow  `s.annotate(loop_rv, pragma_key, {"cfg0":  1, "cfg1": 2, ...})` .
   
   
   
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] wrongtest-intellif commented on a diff in pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
wrongtest-intellif commented on code in PR #12288:
URL: https://github.com/apache/tvm/pull/12288#discussion_r939458597


##########
tests/python/unittest/test_type_annotation_checker.py:
##########
@@ -16,7 +16,8 @@
 # under the License.
 """Test type checker based on python's type annotations"""
 
-from typing import List, Tuple, Union
+import sys

Review Comment:
   ```python
   if __name__ == "__main__":
       sys.exit(pytest.main(sys.argv))
   ```



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] vinx13 merged pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
vinx13 merged PR #12288:
URL: https://github.com/apache/tvm/pull/12288


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] vinx13 commented on a diff in pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
vinx13 commented on code in PR #12288:
URL: https://github.com/apache/tvm/pull/12288#discussion_r939019578


##########
tests/python/unittest/test_type_annotation_checker.py:
##########
@@ -16,7 +16,8 @@
 # under the License.
 """Test type checker based on python's type annotations"""
 
-from typing import List, Tuple, Union
+import sys

Review Comment:
   this is not used



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] vinx13 commented on a diff in pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
vinx13 commented on code in PR #12288:
URL: https://github.com/apache/tvm/pull/12288#discussion_r936993409


##########
python/tvm/tir/schedule/_type_checker.py:
##########
@@ -177,6 +197,19 @@ def _type_check_list(v: List[Any], name: str, type_: Any) -> Optional[str]:
                 return error_msg
         return None
 
+    def _type_check_dict(dict_obj: Dict[Any, Any], name: str, *types: Any) -> Optional[str]:
+        ktype_, vtype_ = types
+        if not isinstance(dict_obj, dict):
+            return _type_check_err(dict_obj, name, dict)
+        for k, v in dict_obj.items():
+            error_msg = _type_check(k, f"{name}[{k}]", ktype_)
+            if error_msg is not None:
+                return error_msg
+            error_msg = _type_check(v, f"{name}[{k}]", vtype_)
+            if error_msg is not None:
+                return error_msg
+        return None
+

Review Comment:
   need test case in https://github.com/apache/tvm/blob/main/tests/python/unittest/test_type_annotation_checker.py



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] vinx13 commented on a diff in pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
vinx13 commented on code in PR #12288:
URL: https://github.com/apache/tvm/pull/12288#discussion_r939458782


##########
tests/python/unittest/test_type_annotation_checker.py:
##########
@@ -16,7 +16,8 @@
 # under the License.
 """Test type checker based on python's type annotations"""
 
-from typing import List, Tuple, Union
+import sys

Review Comment:
   ah didn't see this usage



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] junrushao1994 commented on pull request #12288: [TIR][Schedule] Support annotate dict typed value

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on PR #12288:
URL: https://github.com/apache/tvm/pull/12288#issuecomment-1204306600

   CC: @vinx13 


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org