This commit is contained in:
2026-05-09 16:31:36 +08:00
commit 9f785a17f5
8 changed files with 340 additions and 0 deletions

21
mat_cal.py Normal file
View File

@@ -0,0 +1,21 @@
from multiprocessing import Process
import numpy as np
import os
def burn():
a = np.random.rand(2000, 2000)
b = np.random.rand(2000, 2000)
while True:
# 浮点 + SIMD + 内存访问
np.dot(a, b)
if __name__ == "__main__":
procs = []
for _ in range(os.cpu_count()):
p = Process(target=burn)
p.start()
procs.append(p)
for p in procs:
p.join()