Fix preprocessor condition on when to use fast float logistic implementation.
Reference issue
What does this implement/fix?
This fixes an issue introduced by a30ecb72, which effectively disabled the fast float implementation for the logistic function for all build configurations (including those using a compiler targeting GPU). This commit probably got through unnoticed because two cancelling issues: EIGEN_CPU_CC
should really be EIGEN_CPUCC
, whereas #ifdef
should have been #ifndef
.
As a result, recent Tensorflow Lite libraries suffer from this, in the sense that the generic float implementation is always chosen over the preferred fast implementation. As of today, the Tensorflow repository seems completely oblivious to this issue, as can be deduced from this comment: https://github.com/tensorflow/tensorflow/blob/b8867cbc656c3b65998b42b907b8d00515f8f681/tensorflow/lite/kernels/internal/reference/logistic.h#L42. EDIT: I also opened an issue there.