swift15: release the numpy view before closing the PLE audit mmap

This commit is contained in:
Frank
2026-10-06 20:35:51 -07:00
parent fee66187a1
commit 95219cf4c1
+1 -1
View File
@@ -48,10 +48,10 @@ for fname, keys in sorted(shards.items()):
for k in keys:
meta = header[k]
off, end = meta["data_offsets"]
assert meta["dtype"] == "BF16", f"{k}: dtype {meta['dtype']}"
a = np.frombuffer(mm, dtype=np.uint16, count=(end - off) // 2,
offset=base + off)
m = int((a & 0x7FFF).max())
del a
if m > gmax:
gmax = m
gfile = k