-
Notifications
You must be signed in to change notification settings - Fork 258
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
Auto detection on MSVC 64bit issue with older CPUs #862
Comments
Thanks for reporting. Any hint on the actual instruction that generates the crash? That would greatly help tracking the origin of the issue. |
Yes, sure. It is template <class A>
inline batch<float, A> xsimd::kernel::select(batch_bool<float, A> const& cond, batch<float, A> const& true_br, batch<float, A> const& false_br, requires_arch<sse4_1>) noexcept
{
return _mm_blendv_ps(false_br, true_br, cond);
} |
This is a very unfortunate quirk of MSVC; it does run-time instruction set checking, but only on code it's assembled itself. You need to ensure you're constructing the batches after detecting the underlying architecture with As an example, for Krita I ported Vc's detection mechanism, and override |
Recently when upgrading from xsimd7 to xsimd8, I started seeing some crashes due to illegal instruction exceptions on older x64 CPUs with no SSE4.x instructions when compiling with MSVC. Unfortunately there's no way of disabling this instruction set from this compiler. I was wondering if the auto detection performed by xsimd takes into account this scenario and if it is the expected behaviour, perhaps due to unsupported older cpus.
The text was updated successfully, but these errors were encountered: