Last active
April 5, 2020 10:25
-
-
Save alimuldal/eb0f4eea8af331b2a890 to your computer and use it in GitHub Desktop.
test script for numpy BLAS linkage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import numpy | |
from numpy.distutils.system_info import get_info | |
import sys | |
import timeit | |
print("version: %s" % numpy.__version__) | |
print("maxint: %i\n" % sys.maxsize) | |
info = get_info('blas_opt') | |
print('BLAS info:') | |
for kk, vv in info.items(): | |
print(' * ' + kk + ' ' + str(vv)) | |
setup = "import numpy; x = numpy.random.random((1000, 1000))" | |
count = 10 | |
t = timeit.Timer("numpy.dot(x, x.T)", setup=setup) | |
print("\ndot: %f sec" % (t.timeit(count) / count)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment