From 6c410eee37fed231a2d61c0b8d24edb3c90cb5ec Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Thu, 10 Sep 2026 21:06:22 -0700 Subject: [PATCH] validate compiled model (#38855) * validate serialized models after writing --- openpilot/selfdrive/modeld/compile_modeld.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openpilot/selfdrive/modeld/compile_modeld.py b/openpilot/selfdrive/modeld/compile_modeld.py index d851c3cc86..52be6897c0 100755 --- a/openpilot/selfdrive/modeld/compile_modeld.py +++ b/openpilot/selfdrive/modeld/compile_modeld.py @@ -329,4 +329,7 @@ if __name__ == "__main__": with open(args.output, "wb") as f: dump_oob(out, f) + with open(args.output, "rb") as f: + load_oob(f) + assert not f.read(1), "unexpected model buffer data" print(f"Saved JITs to {args.output} ({os.path.getsize(args.output) / 1e6:.2f} MB)")