Fix embedding_ops_test on AVX512 builds
This commit modifies the embedding_ops_test unit test so that it
passes on AVX512 builds. The test compares the result of an embedding
operation to a precomputed expected result, both of which are computed
using square roots. The test appears to fail on AVX512 builds as the
embedding operation makes use of Eigen's fast vectorized square root
algorithm for doubles, which can return slightly different results to
those computed using numpy. As the test expects both results to be
identical it fails on AVX512 builds, even though the difference
between the results is insignificant. This commit fixes the issue by
modifying the equality tests to use assertAllClose instead of
assertAllEqual. Note that the test passes in its current form on AVX2
builds as Eigen does not implement an AVX2 version of the fast
square root algorithm for doubles.
Signed-off-by:
Mark Ryan <mark.d.ryan@intel.com>
Loading
Please sign in to comment