tqchen edited a comment on issue #4280: [TVM][RUNTIME] A minimum example to 
generate external library wrappers for DSOModule
URL: https://github.com/apache/incubator-tvm/pull/4280#issuecomment-554580370
 
 
   The current interfacing example already looks great. For the JSONModule 
usecase, i was thinking about something like
   
   ```c++
   ExampleJSONModule : runtime::Module {
       void SaveToBinary();
       void LoadFromFile();
       PackedFunc GetFunction(name) {
          if (name="tensortrun") {
            for each elem in json:
                if (elem.name == "func1") {
                   run_trt_func1(func, elem.args);
                }  
               ...
         }
       }
   };
   ```
   In this case, because JSONModule directly interprets the json and calls into 
the runtime API, we no longer needs the gcc related components. This is an 
approach that will work better say if the serialized code is a TF blob plus 
some meta data and we just want to call into TF runtime.

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


With regards,
Apache Git Services

Reply via email to