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/11/10 01:26:17 UTC

[GitHub] [tvm] vinx13 commented on pull request #13269: [Bugfix][TIR] Fix version conflict with `typing` for Python 3.9

vinx13 commented on PR #13269:
URL: https://github.com/apache/tvm/pull/13269#issuecomment-1309642482

   @sunggg I'm getting some errors in Python 3.10 after this PR. To reproduce, run 
   `tests/python/unittest/test_tir_schedule_split_fuse.py`
   
   Sample output:
   ```
   
       def test_split_int64_factors():
           sch = tir.Schedule(elementwise_symbolic, debug_mask="all")
           block_b = sch.get_block("B")
           _, _, k = sch.get_loops(block_b)
   >       sch.split(k, factors=[IntImm(dtype="int64", value=10), None])
   
   tests/python/unittest/test_tir_schedule_split_fuse.py:645: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   python/tvm/tir/schedule/_type_checker.py:335: in wrap
       error_msg = _type_check(
   python/tvm/tir/schedule/_type_checker.py:319: in _type_check
       return _TYPE_CHECK[key](v, name, *subtypes)
   python/tvm/tir/schedule/_type_checker.py:251: in _type_check_atomic
       return None if isinstance(v, type_) else _type_check_err(v, name, type_)
   /usr/lib/python3.10/typing.py:994: in __instancecheck__
       return self.__subclasscheck__(type(obj))
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   
   self = typing.List[typing.Union[int, tvm.ir.expr.PrimExpr, NoneType]], cls = <class 'list'>
   
       def __subclasscheck__(self, cls):
   >       raise TypeError("Subscripted generics cannot be used with"
                           " class and instance checks")
   E       TypeError: Subscripted generics cannot be used with class and instance checks
   
   /usr/lib/python3.10/typing.py:997: TypeError
   ```


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