-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Revert "Removed AlignedArray (#1657)" #1838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 72ec121. A bug was detected that resulted in non-deterministic calculation, since the underlying C++ code was written in a way apparently that required alignment to produce consistent results, so of course just removing the alignment and calling an only slightly modified algorithm compromised determinism, resulting in test failure for RFF in particular.
Discussion in PR #1829 |
we may have to remove certain more things(dead code) to completely remove this change. i can put the pr if we decide that we want to continue our previous approach |
Now that we've taken the "internalize all unnecessary public API" approach, I think it is much more acceptable to keep AlignedArray in ML.NET, and only use it in the limited situations where it is deemed necessary. As long as we don't expose AlignedArray, we can remove it whenever we want in the future. So keeping it around for now (if that's what we decide makes the most sense) would be acceptable IMO. |
Ugh. I really, really hate the AlignedArray code, even internally. Are we certain that its presence is the only way to achieve determinism? |
As mentioned in teams, for our SseIntrinsic and AvxIntrinsic code, it should be fairly trivial to add a new parameter that allows choosing between However, for external dependencies that have similar optimizations, but which don't provide some switch for choosing between
|
No, but my point is that we can ship it internally, even up to and after v1. And we can remove it at any point we'd like. The uber point is that it isn't critical to remove it right now. |
Fair enough! |
This reverts commit 72ec121.
A bug was detected that resulted in non-deterministic calculation, since the
underlying C++ code was written in a way apparently that required alignment
to produce consistent results, so of course just removing the alignment and
calling an only slightly modified algorithm compromised determinism, resulting
in test failure for RFF in particular.
If we can fix that bug by other means that would be preferable, since removing
AlignedArray
is a desirable outcome. Not if it means nondeterminism though, obviously. 😉