SaveToFile is more of a low-level API, that is not very consistently defined.

For most multiple module case, we use `mod.export_library` instead.

And the logic is used as follows:
- LLVM/C module use SaveToFile to save the right source code.
- Other modules, use SaveToBinary to serialize the ptx/opencl into the binary 
segment of the source code.

My take is that given we encourage  `mod.export_library`  in most of the time. 
We do not have to complicate the SaveToFile API and can keep things.

We can try to make things consistent, by only supporting the correct format, 
and report error when file format is not supported.

User should always use `mod.export_library` to get a packaged version of the 
output.





---
[Visit 
Topic](https://discuss.tvm.ai/t/rfc-savetofile-file-name-format-expected-behavior/7741/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/4db5be591810216767c68d1f8f59322cc11b02cb145e102b4f520e9fe7a73d81).

Reply via email to