swift15: release the numpy view before closing the PLE audit mmap
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user