YuchenJin edited a comment on pull request #8586:
URL: https://github.com/apache/tvm/pull/8586#issuecomment-889229301


   Thanks @ganler for finding the issue and the fix! Do you think it would be 
better to still have the `.evaluate()` in a separate statement, but put it 
inside the PassContext scope in the following style? And maybe it's worth 
adding a comment in the API and also the tutorial to note that `.evaluate` 
needs to be inside the PassContext manager.
   
   ```
   with tvm.transform.PassContext(opt_level=3):
       executor = build_module.create_executor("graph", mod=mod, device=cpu(0))
       tvm_out = executor.evaluate()(**data)
   ```
   
   And this will be consistent with code elsewhere: 
https://github.com/apache/tvm/blob/main/tutorials/dev/bring_your_own_datatypes.py#L137.
   


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