mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-18 10:23:43 +08:00
validate compiled model (#38855)
* validate serialized models after writing
This commit is contained in:
@@ -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)")
|
||||
|
||||
Reference in New Issue
Block a user