tp-nan commented on issue #264:
URL: https://github.com/apache/tvm-ffi/issues/264#issuecomment-3635188756

   How about making `tvm_ffi.cpp.load_inline` use long-lived loading by 
default, but providing an API to manually unload it? That way, at least it 
wouldn't crash in the following simple case when the program finishes:
   
   ```python
   import tvm_ffi
   mod = tvm_ffi.cpp.load_inline(name='hello',
                            cpp_sources="""
   tvm::ffi::Any example_func() {
      // return 1;
      return tvm::ffi::Array<float>({1.0,2.0,3.0});
   }""", functions=['example_func'])
   result = mod.example_func()
   ```
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to