|
53 | 53 | # Version 5, November 23rd, 2025, adds serialization for aval memory_space, |
54 | 54 | # upgrade num_devices to a 32 bit value. |
55 | 55 | # This version is backwards compatible with Version 2 to 4. |
56 | | -# TODO(necula): we cannot really store the actual serialization_version |
57 | | -# in the flatbuffer because prior to 11/25/2025 deserializers checked |
58 | | -# if the version is 2 or 3. I have now removed that check, but for the |
59 | | -# sake of old deserializers we can only store version 3. Starting |
60 | | -# on January 2026 we can store the actual version. |
61 | | -_SERIALIZATION_VERSION = 3 |
| 56 | +_SERIALIZATION_VERSION = 5 |
62 | 57 |
|
63 | 58 | def serialize(exp: _export.Exported, vjp_order: int = 0) -> bytearray: |
64 | 59 | """Serializes an Exported. |
@@ -125,7 +120,12 @@ def _serialize_exported( |
125 | 120 | vjp = _serialize_exported(builder, exp.vjp(), vjp_order - 1) |
126 | 121 |
|
127 | 122 | ser_flatbuf.ExportedStart(builder) |
128 | | - ser_flatbuf.ExportedAddSerializationVersion(builder, _SERIALIZATION_VERSION) |
| 123 | + # TODO(necula): we cannot really store the actual serialization_version |
| 124 | + # in the flatbuffer because prior to 11/25/2025 deserializers checked |
| 125 | + # if the version is 2 or 3. I have now removed that check, but for the |
| 126 | + # sake of old deserializers we can only store version 3. Starting |
| 127 | + # on January 2026 we can store the actual version. |
| 128 | + ser_flatbuf.ExportedAddSerializationVersion(builder, 3) |
129 | 129 | ser_flatbuf.ExportedAddFunctionName(builder, fun_name) |
130 | 130 | ser_flatbuf.ExportedAddInTree(builder, in_tree) |
131 | 131 | ser_flatbuf.ExportedAddInAvals(builder, in_avals) |
|
0 commit comments