zhiics commented on a change in pull request #6963:
URL: https://github.com/apache/tvm/pull/6963#discussion_r530490107



##########
File path: tests/python/frontend/darknet/test_forward.py
##########
@@ -59,6 +70,10 @@ def _get_tvm_output(net, data, build_dtype="float32", 
states=None):
     """Compute TVM output"""
     dtype = "float32"
     mod, params = relay.frontend.from_darknet(net, data.shape, dtype)
+    # verify that from_darknet creates a valid, parsable relay program
+    mod = relay.transform.InferType()(mod)
+    astext(mod)

Review comment:
       yeah, I was saying we probably want to explicitly catch the failure and 
assert for unit test. Something like the following,
   
   ```
   test_pass = True
   try:
      astext(mod)
   except:
      print("fail")
     test_pass = False
   
   assert test_pass
   ```
   
   But anyway, it is not mandatory since this is unit test 
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to