This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1777 - Make scalar and packet paths consistent
Summary: Make scalar and packet paths consistent
Status: DECISIONNEEDED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - vectorization (show other bugs)
Version: 3.4 (development)
Hardware: All All
: Normal Accuracy Problem
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3.4
  Show dependency treegraph
 
Reported: 2019-11-14 14:29 UTC by Gael Guennebaud
Modified: 2019-12-04 18:55 UTC (History)
5 users (show)



Attachments
Patch to make the logistic function scalar-SIMD consistent (5.21 KB, patch)
2019-11-14 15:08 UTC, Gael Guennebaud
no flags Details | Diff

Description Gael Guennebaud 2019-11-14 14:29:55 UTC
Currently many functions return slightly different results for coefficients evaluated using a SIMD path or a scalar path. This includes exp, log, logistic_function, etc.

Since the SIMD implementation of those functions can also be called on scalar inputs, we could easily solve this inconsistency by plugging the respective functor call to the generic SIMD path.

Shall we do that unconditionally or only if vectorization is enabled?
Comment 1 Gael Guennebaud 2019-11-14 15:08:39 UTC
Created attachment 960 [details]
Patch to make the logistic function scalar-SIMD consistent

Here is a first patch for the logistic/sigmoid function.

See also: https://github.com/tensorflow/tensorflow/issues/33878

Please comment!
Comment 2 Christoph Hertzberg 2019-11-14 15:23:49 UTC
I agree, we should always call the same implementation. Having (even slightly) different results for the same input is not good.

For odd-sized inputs we should actually think about loading/storing partial packets (cf. Bug 692 comment 15), instead of doing a scalar loop at the end.

In Bug 1687 I suggested something like EIGEN_USE_SIMD_MATH_FUNCTIONS (but dropping EIGEN_FAST_MATH).
Comment 3 Nobody 2019-12-04 18:55:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1777.

Note You need to log in before you can comment on or make changes to this bug.