As an example for @ANSHUMAN.TRIPATHY for just using the C API, I generated the 
C# p/invoke (using [this lib](https://github.com/xoofx/CppAst.CodeGen)).  Since 
it's autogen'd don't rely on it 100%, so some of it will be wrong!
 
https://gist.github.com/jmorrill/0f65876c2a9b8b7c335e008393cbddbc

p/invoke code like above would then be wrapped with C# classes to hide away all 
the p/invoke smell.

**API Choices:**
I understand the reasoning behind keeping a similarity with the python APIs, 
but I think you might want to balance that with being a .NET API & conventions. 

Consider:

`IReadOnlyList<NDArray> outputs = runtime.Outputs;`

or

`var output = runtime.Outputs[0];`

or

`var output = runtime.GetOutput(0);`

vs

`var output = runtime.get_output(0);`

The [java 
impl](https://github.com/apache/incubator-tvm/blob/1dcf8a16ee3a93dff5ffc1ad1a66892eda03ef13/jvm/core/src/main/java/org/apache/tvm/contrib/GraphModule.java)
 has a nice balance of java conventions and discoverable tvm api.

In any case, these are just my opinions :)





---
[Visit 
Topic](https://discuss.tvm.ai/t/introducing-tvm-net-for-bringing-tvm-features-into-net-world/6213/6)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/26db92153f865f31012f2718acfd34e422b26c4f27cbea9681347ee5796d75d4).

Reply via email to