-
Notifications
You must be signed in to change notification settings - Fork 230
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
Couple of build issues on 32bit MSVC v143 build with /arch:SSE #1111
Comments
I was able to fix error 1.b by changing this check, which reenables native SVML for MSVC, while ignoring potential /arch:SSE: Lines 295 to 299 in e651ec3
to #if !defined(SIMDE_X86_SVML_NATIVE) && !defined(SIMDE_X86_SVML_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
#if defined(SIMDE_ARCH_X86) && (defined(__INTEL_COMPILER) || (HEDLEY_MSVC_VERSION_CHECK(14, 20, 0) && !defined(__clang__) && defined(SIMDE_X86_SSE2_NATIVE)))
#define SIMDE_X86_SVML_NATIVE
#endif
#endif Only the |
Hello @Epixu ; do you still have issues with 32bit MSVC builds using the latest SIMDe: v0.8.0? |
Hi, I will bump the version and check it in a couple of days, thanks for the notification! |
No change for this issue with the current master (517da84) |
According to Intel, So a guard can be added to not use the GCC asm syntax on MSVC |
@Epixu can you test |
With 2d498c8 I'm seeing the following SIMDe x86 test errors on 32-bit MSVC:
Which is pretty weird, the numbers look exactly the same to me except for line 2899; something about the float comparator isn't working? SSE2, no timeout, so we get a list of the failing function tests:
Again, all visually identical, except for one (line 4152); yet still |
Does ~= stand for some approximate comparison based on ULPs? Could these look the same due to bad print? Maybe if printed in scientific notation would be better? I will try __asm pause in a couple of days |
Could be, I didn't write that code and it feels well outside my area of expertise: Lines 729 to 748 in 8639fef
Lines 866 to 867 in 8639fef
Thanks! |
The single precision comparison function is not ULPs based, it uses a precision range, which if zero - does a perfect compare. The failing functions however seem to involve double precision, so some points of failure come to mind: is the proper double-precision compare used, and is precision specified properly to not be zero, because internal CPU float representation is always assumed to be a black box (while residing in the registers, they're usually with additional bits of precision, which get truncated later) - can be anything on different CPU architectures. Also, it would probably be better to use (%e ~= %e) to see if something changes at the back of the float |
Thanks for the explanation @Epixu , here are the same test failures using hexadecimal exponent notation. All affected tests do the float comparison using a precision of While all of these affected tests use
https://ci.appveyor.com/project/nemequ/simde/build/job/uhkyqxm6fogyagv1?fullLog=true |
This is super weird. Is it possible that the error somehow happens at the compare, but is fine by the time data is printed? Also, just to note, this wouldn't be the first time I've encountered nasty generated assembly bugs from MSVC. To give an example, I've even documented one involving AVX here: https://github.com/Epixu/msvc_but_repro I guess our last beacon of hope is to compare some healthy ASM with what the compiler generates... |
Agreed, but that it outside of my abilities and time availability :-( |
I will investigate more when I too get the time, Still, thanks a lot for narrowing it down |
In fc52a85 I tried crafting the test data for a single test differently, but I got the same error: Interestingly, the test SSE failures only are with the "native" code paths, but not the emulated one. The SSE2 failing tests are for both (this is for a build without https://ci.appveyor.com/project/nemequ/simde/build/job/u3cn62vsdvvua23o?fullLog=true
Thanks!
You are welcome! I think there are several fixes from this branch worth merging already, so I'm glad for that. |
One more question for you: are these issues a regression from a previous SIMDe release / commit? Or have they always been present from what you have seen? |
Honestly, I have no idea. It seems that the issues emerged in later version after introduction of more features, and the only reason the older version still works with me, is that the features are simply not available. So probably a regression. I can't really be sure, though. I still stick to one particular commit (5e7c4d4), because it passes all my tests and lets me continue work on more important stuff |
Hi again, I'm experiencing build errors with the current master (e651ec3)
Many issues have been fixed regarding my prior issue, including many of the failing tests involving precision discrepancies.
Here's the summary:
All my issues apply to MSVC v143 x86 builds - I have 5 such builds, each with a different
/arch:XXX
option:1. The two build issues apply only to MSVC v143 x86 with
/arch:SSE
enableda) The first build issue involves reaching line 4774 here:
simde_mm_pause (void) {
#if defined(SIMDE_X86_SSE2_NATIVE)
_mm_pause();
#elif defined(SIMDE_ARCH_X86)
__asm__ __volatile__("pause");
simde/simde/x86/sse2.h
Lines 4770 to 4774 in e651ec3
The line involves GCC syntax, it should be guarded. I can fix this build issue by doing:
But not sure if _mm_pause() won't cause invalid instruction at runtime, if the SIMDE_X86_SSE2_NATIVE isn't available. Is it available on SIMDE_X86_SSE_NATIVE?
b) The second build issue involves SVML
I can circumvent it by simply guard the include of the
svml.h
- not sure if that is intended though. There should be fallback alternatives in SIMDe? These errors seemingly involve only'simde__m128d' to '__m128d'
conversion issues.2. The test issues apply to all
/arch
options on MSVC v143 x86 builds:They seemingly affect only
pow
functions precision, but my tests aren't exhaustive, so not sure.The text was updated successfully, but these errors were encountered: