Mousius commented on PR #11159:
URL: https://github.com/apache/tvm/pull/11159#issuecomment-1122190312

   @pfk-beta you can use the example of how to invoke the CLI directly from 
here:
   
https://github.com/apache/tvm/blob/8d4f4dd73ff2d762ade38aa0f9e8e9fba5f933da/tests/python/driver/tvmc/test_command_line.py#L58-L60
   And mock `relay.build` as seen here:
   
https://github.com/apache/tvm/blob/8d4f4dd73ff2d762ade38aa0f9e8e9fba5f933da/tests/python/driver/tvmc/test_compiler.py#L517
   
   Which should give you a `mock_relay` that you can use 
[assert_called_with](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_called_with)
 to check that `target_host` is correctly being passed through. 


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