MCPcopy Create free account
hub / github.com/numpy/numpy / show_cpu_features

Function show_cpu_features

benchmarks/benchmarks/__init__.py:5–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import os
4
5def show_cpu_features():
6 from numpy.lib.utils import _opt_info
7 info = _opt_info()
8 info = "NumPy CPU features: " + (info if info else 'nothing enabled')
9 # ASV wrapping stdout & stderr, so we assume having a tty here
10 if 'SHELL' in os.environ and sys.platform != 'win32':
11 # to avoid the red color that imposed by ASV
12 print(f"\033[33m{info}\033[0m")
13 else:
14 print(info)
15
16def dirty_lock(lock_name, lock_on_count=1):
17 # this lock occurred before each round to avoid duplicate printing

Callers 1

__init__.pyFile · 0.85

Calls 2

_opt_infoFunction · 0.90
printFunction · 0.85

Tested by

no test coverage detected