Halide icon indicating copy to clipboard operation
Halide copied to clipboard

[serialization] Add more metadata for traceability (eg LLVM version)

Open derek-gerstmann opened this issue 1 year ago • 3 comments

It'd be nice to add more metadata to the serialization format to enable tools to inject more specific details on where the serialization came from (eg. to enable caching of the data within a larger toolchain).

In particular, adding the LLVM version (particularly when Halide is built from source and not part of a release) would be super useful!

derek-gerstmann avatar Jun 19 '24 17:06 derek-gerstmann

What should the deserialization policy be for metadata differences? For instance, if someone builds Halide 18+LLVM 17 and then submits a reproducer, should we be able to deserialize it on our end with Halide 18+LLVM 18?

At the same time, caching scenarios might want a sort of "strict mode" where an error of some sort is returned (or an exception thrown) when attempting to deserialize a metadata-incompatible object (but one that would otherwise return a sensible result).

alexreinking avatar Jun 19 '24 17:06 alexreinking

I'm a bit skeptical about adding the LLVM version. Nothing in the serialized format depends on LLVM in any way. A serialized file should work with any LLVM version that Halide can compile against. Some backends don't even use LLVM.

abadams avatar Jun 19 '24 17:06 abadams

What about an arbitrary header section that allows the client generating the metadata to inject useful strings (that they would need to check for and verify)?

derek-gerstmann avatar Jun 19 '24 17:06 derek-gerstmann