comaniac commented on pull request #7823:
URL: https://github.com/apache/tvm/pull/7823#issuecomment-817976580


   Thanks for the proposal. I like the OOP approach in general since it clearly 
represents the available APIs and relationship between objects. I'll spend 
sometime on reviewing this PR in this week. Meanwhile, for the example, it 
seems to me that the following design is more OOP style:
   
   ```python
   tvmc_model = tvmc.load(onnx_resnet50)
   tvmc_model.tune(target="llvm")
   tvmc_package = tvmc_model.compile(target="llvm")
   result = tvmc_package.run(device="cpu")
   ```
   
   In this way, we can clearly see `tvmc_model` is the basic and the most 
instance in TVMC, and most features can be easily found out by looking at its 
methods. In addition, we can also learn from the method `compile` and `run` 
that `tvmc_package` is the compiled result of `tvmc_model`; `tvmc_result` is 
the execution result of `tvmc_package`.


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