Thanks @masahi for chiming in. The CCompiler example is only used for demonstration purpose. We intentionally made it simple to handle cases like constant. For real external codegen tools/compilers, you may have your own ways to handle the constant pool, and it is very backend compiler dependent. For example, you can serialize it in the codegen and deserialize it when you load the library as @masahi mentioned. TVM compilation tools for graph runtime and the VM are all doing this. The TensorRT work leverages the serialization facility of `ObjectRef` provided by TVM. Also, you can probably have something compatible to dlpack which would essentially be able to point to the constant data for in memory execution.
--- [Visit Topic](https://discuss.tvm.ai/t/external-codegen-constant-tensors-in-c-codegen/5890/21) 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/405a9b8c70bdea5796a14df06740e90a50cc476cd3cfb0b836fc3f9534ed68c2).