1. You are right, we actually tried to save the runtime.Module. We actually
also added the TIR export to the runtime.Module because the generated source
code is also put to it. We will try the different options you proposed as soon
as we can find the time.
2. In the meantime we have written an
@SebastianBoblestETAS I think this could be helpful for folks consuming TIR
outside of TVM itself. A couple of thoughts:
1. Right now a related problem is that there isn't currently a way for
`tvm.relay.build` to return the `IRModule`s which contain TIR itself. You can
see that in the
[BuildO
runtime.Module itself is a runtime object, which does not yet support full
serialization(due to the nature of some module not being able to
serialize(e.g. DSO)). There was a discussion about [Artifact
class](https://discuss.tvm.apache.org/t/introduce-artifact-a-container-for-generated-code/11
Hi,
thanks for the reference to this function. I was not aware of it.
However I tried it on a Module(c) and got this:
`{
"root": 1,
"nodes": [
{
"type_key": ""
},
{
"type_key": "runtime.Module"
}
],
"b64ndarrays": [],
"attrs": {"tvm_version": "0.9.dev0"
Thanks @SebastianBoblestETAS . TVM already have a reflection based mechanism
to serialize IR nodes (includin TIR and other functions) as [json
format](https://tvm.apache.org/docs/reference/api/python/ir.html?highlight=save_json#tvm.ir.save_json).
So it would be great to see if that functional
Thanks, @SebastianBoblestETAS. I agree that json is a great format for
serializing, but I have a few questions:
1. What are the pros and cons of json format compared with TVMScript (if we
have python env)
2. How to design a json format to store all TIR information for all possible
nodes? Do
We propose to implement an API to TVM that allows users to export the TIR
representation of the generated kernels as json.
**Motivation**
Json is a standard file format and can easily be processed in python, for
example. A json interface allows to analyze the generated kernels target
agnos