shingjan opened a new issue, #12617:
URL: https://github.com/apache/tvm/issues/12617

   Currently in TVMScript, float infinity is not supported in the TVMScript 
parser and printer. A minimal roundtrip repro of this problem looks like:
   ```
       import tvm
       from tvm.meta_schedule.relay_integration import extract_task_from_relay
       from tvm import relay
       
       # construct relay function
       data = relay.var("data", relay.TensorType((1, 512, 768), "float32"))
       res = relay.op.tensor.isinf(data)
       func = relay.Function([data], res)
       
       # create IRModule and extract task
       mod = tvm.IRModule.from_expr(func)
       tasks = extract_task_from_relay(mod, target, None)
       
       # doing roundtrip printer -> parser
       original = tasks[0].dispatched[0]
       after_roundtrip = tvm.script.from_source(original.script(show_meta=True))
       tvm.ir.assert_structural_equal(original, after_roundtrip, True)
   ```
   
   ### Expected behavior
   
   The assert_structural_equal check should pass
   
   ### Actual behavior
   
   `inf` printed by the printer is not recognized by the parser.
   
   cc: @zxybazh @junrushao 


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