import numpy as np # 使用标准numpy,运算将在CPU上执行。
import time
start = time.perf_counter()
x = np.random.random([5000, 5000]).astype(np.float32)
k = np.matmul(x, x)
end = time.perf_counter()
elapsed = end - start
print(‘Time used:‘,elapsed)
原文:https://www.cnblogs.com/chuqianyu/p/14402293.html