Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA

8,166 views
Skip to first unread message

Abhimanyu Aryan

unread,
Aug 26, 2018, 2:28:32 AM8/26/18
to TensorFlow.js Discussion
Hi I wrote a simple program on my macbook 

const tf = require('@tensorflow/tfjs');
require('@tensorflow/tfjs-node');

let a
= tf.scalar(2);
let b
= tf.scalar(3);

console
.log('a: '+a.dataSync()[0]+', b: '+b.dataSync()[0]);





and I got this output

2018-08-26 11:53:53.167258: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
a
: 2, b: 3
(node:14232) Warning: N-API is an experimental feature and could change at any time.

What is this warning and what is trying to explain? Will tfjs-node won't work on my CPU? 

Shanqing Cai

unread,
Aug 26, 2018, 1:35:32 PM8/26/18
to abhiman...@gmail.com, TensorFlow.js Discussion
Abhimanyu,

This warning message is printed by the shared library of TensorFlow. As the message indicates, the shared library doesn't include the kind of instructions that your CPU could use. Using such instructions may speed up certain math operations in tfjs-node. This doesn't mean tfjs-node won't work for you. It just means that you could compile the TensorFlow source code yourself with those instructions added, if you want the fastest possible performance on your CPU. The distributed version of the shared library downloaded by tfjs-node (and also by the Python version of TensorFlow) excludes these instructions in order to avoid compability issues on older CPUs. The top answer in this StackOverflow question is pretty accurate and contains more info:

Shanqing



--
You received this message because you are subscribed to the Google Groups "TensorFlow.js Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tfjs+uns...@tensorflow.org.
Visit this group at https://groups.google.com/a/tensorflow.org/group/tfjs/.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/tfjs/c53397f5-f971-4938-9f55-88e9d561c12f%40tensorflow.org.


--
---
Shanqing Cai
Software Engineer
Google
Reply all
Reply to author
Forward
0 new messages