aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/test
diff options
context:
space:
mode:
authorGravatar Asim Shankar <ashankar@google.com>2017-06-05 09:13:06 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-05 09:16:54 -0700
commit69ba4d3d49bd5775131ae7f00830a41f478dbbf5 (patch)
tree93abc10f53ebdb68747766fd22622c6e93ced805 /tensorflow/tools/test
parenta51a9846cf8bc92075adf5561b30109f8f296581 (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.py2
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