junrushao opened a new pull request, #15416:
URL: https://github.com/apache/tvm/pull/15416

   This PR introduces ModuleSpec and SpecBuilder, which are key classes to 
export an nn.Module to TVM's IRModule.
   
   Example:
   
   ```python
   model.export_tvm(
     spec={
       "prefill": {
         "inputs": spec.Tensor([batch_size, "seq_len"], "int32"),
         "total_seq_len": int,
       },
       "decode": {
         "inputs": spec.Tensor([batch_size, 1], "int32"),
         "total_seq_len": int,
       },
       "softmax_with_temperature": {
         "logits": spec.Tensor([1, 1, vocab_size], "float32"),
         "temperature": spec.Tensor([], "float32"),
       },
     },
   )
   ```


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

Reply via email to