diff options
author | 2017-06-05 09:13:06 -0700 | |
---|---|---|
committer | 2017-06-05 09:16:54 -0700 | |
commit | 69ba4d3d49bd5775131ae7f00830a41f478dbbf5 (patch) | |
tree | 93abc10f53ebdb68747766fd22622c6e93ced805 /tensorflow/tools/test | |
parent | a51a9846cf8bc92075adf5561b30109f8f296581 (diff) |
Fix #10371
cpuinfo.get_cpu_info() doesn't seem to include the l2_cache_size key on some
architectures.
PiperOrigin-RevId: 158021008
Diffstat (limited to 'tensorflow/tools/test')
-rw-r--r-- | tensorflow/tools/test/system_info_lib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/tools/test/system_info_lib.py b/tensorflow/tools/test/system_info_lib.py index c352abaa54..0cc261591b 100644 --- a/tensorflow/tools/test/system_info_lib.py +++ b/tensorflow/tools/test/system_info_lib.py @@ -96,7 +96,7 @@ def gather_cpu_info(): cpu_info.cpu_info = info['brand'] cpu_info.num_cores = info['count'] cpu_info.mhz_per_cpu = info['hz_advertised_raw'][0] / 1.0e6 - l2_cache_size = re.match(r'(\d+)', str(info['l2_cache_size'])) + l2_cache_size = re.match(r'(\d+)', str(info.get('l2_cache_size', ''))) if l2_cache_size: # If a value is returned, it's in KB cpu_info.cache_size['L2'] = int(l2_cache_size.group(0)) * 1024 |