lixiaoquan opened a new issue #6913:
URL: https://github.com/apache/incubator-tvm/issues/6913


   Patch to reproduce:
   ```
   diff --git a/tests/python/unittest/test_arith_const_int_bound.py 
b/tests/python/unittest/test_arith_const_int_bound.py
   index 84fc7fd64..0bcdff487 100644
   --- a/tests/python/unittest/test_arith_const_int_bound.py
   +++ b/tests/python/unittest/test_arith_const_int_bound.py
   @@ -50,6 +50,15 @@ def test_cast_bound():
        assert bd.max_value == 2
    
    
   +def test_bound():
   +    import numpy as np
   +    analyzer = tvm.arith.Analyzer()
   +    x, y = te.var("x", "int64"), tvm.tir.const(-np.iinfo(np.int64).max, 
dtype="int64")
   +    bd = analyzer.const_int_bound(x + y)
   +    assert bd.min_value == bd.NEG_INF
   +    assert bd.max_value == bd.POS_INF
   +
   +
    def test_add_sub_bound():
        analyzer = tvm.arith.Analyzer()
        x, y = te.var("x", "int64"), te.var("y", "int64")
   ```
   
   Because the expr is  `(x + (int64)-9223372036854775807)`, it runs into this 
ICHECK
   ```
   E             File "/home/xiaoquan.li/tvm/src/arith/const_int_bound.cc", 
line 455
   E           TVMError: 
   E           ---------------------------------------------------------------
   E           An internal invariant was violated during the execution of TVM.
   E           Please read TVM's error reporting guidelines.
   E           More details can be found here: 
https://discuss.tvm.ai/t/error-reporting/7793.
   E           ---------------------------------------------------------------
   E             Check failed: y != kNegInf == false:
   ```
   
   Since -INT64_MAX is used as kNegInf in const_int_bound, does it mean this 
value shouldn't be used in TIR?


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


Reply via email to