swift15: release the numpy view before closing the PLE audit mmap
This commit is contained in:
1 parent
fee66187a1
commit
95219cf4c1
1 file changed
+1
-1
@@ -48,10 +48,10 @@ for fname, keys in sorted(shards.items()):
|
|||||||
for k in keys:
|
for k in keys:
|
||||||
meta = header[k]
|
meta = header[k]
|
||||||
off, end = meta["data_offsets"]
|
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,
|
a = np.frombuffer(mm, dtype=np.uint16, count=(end - off) // 2,
|
||||||
offset=base + off)
|
offset=base + off)
|
||||||
m = int((a & 0x7FFF).max())
|
m = int((a & 0x7FFF).max())
|
||||||
|
del a
|
||||||
if m > gmax:
|
if m > gmax:
|
||||||
gmax = m
|
gmax = m
|
||||||
gfile = k
|
gfile = k
|
||||||
|
|||||||
Reference in new issue
Block a user