tqchen commented on PR #283:
URL: https://github.com/apache/tvm-ffi/pull/283#issuecomment-3566726032

   API-wise, i think we can streamline it a bit further
   
   ```python
   cpp_source = """
   #include <tvm/ffi/extra/cuda/cubin_launcher.h>
   
   TVM_FFI_EMBED_CUBIN(env);
   
   void AddTwo(TensorView a, TensorView b) {
      static ffi::CubinKernel kernel = TVM_FFI_EMBED_CUBIN_GET_KERNEL(env, 
"add_two");
      kernel.launch(...);
   }
   """
   
   cubin : bytes = compile_cubin_from_nvrtc(cuda_source);
   
   cubin : bytes = compile_cubin_from_triton();
   tvm.cpp.load_inline(cpp_source, embed_cubin={"env": cubin});
   ```


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