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
Check Arch overrides on Windows #311
Comments
@noc0lour do you mind to take care of this? |
@jdemel If I find time to test this on one of my few windows installations, sure. But don't count on it. |
Also this is best checked across a variety of architectures to make sure we are doing the correct thing here. I don't know which SIMD instructions are supported by which VS version. |
Let's start with the newest version available. If it works with that version, we can discuss if and which older versions we want to add. |
I've just checked the lastest I think I can see the issue there with the way Maybe this needs a rework now that we have |
From the 393 discussion We do not distinguish between x32 or x64 for our arch checks. Thus, it is currently difficult to reliably choose one or the other architecture. What we do is, we choose AVX for SSSE3 etc. kernels for MSVC. It would be great to be able to compile all kernels with MSVC. I wonder if we should set the minimum compile flag to /arch:AVX and be done with it. This exemplifies the problem: Lines 45 to 47 in 24c7c84
We require all those archs but MSVC fails to provide SSE archs. In the kernels, we rely on the assumption that these chains are valid. With cpu_features we should have a way to reliably detect all archs on runtime but this is a compiler issue.
I reopen this issue to make sure we don't forget about it. |
It seem that all x64 machines support SSE instructions and thus MSVC opted to remove these options from the commandline since they are always available? I have only found this: https://stackoverflow.com/questions/1067630/sse2-option-in-visual-c-x64 on the topic, but tbh evrything else would be a bit weird in terms of enabling speedups. |
ergo we can expect SSE2 but nothing further. Since MSVC goes directly from SSE2 to AVX, we can't use such fine grained controls like we do for other compilers. Further:
I assume that requirement holds up for later versions as well. Intel Celeron N4000 is a x64 CPU that only supports SSE4.2 and no AVX. It's released in Q4'17. I wonder how this is supposed to be handled? Ignore SSE4 or does the SSE2 flag enable it implicitly? Or are the intrinsics available but MSVC doesn't optimize for these archs? |
@jdemel Somehow I think we have to separate two issues here: Building as many intrinsics as possible for a given compiler only depends on this compilers ability to support extended notation for this instruction set. The second issue is then only loading intrinsics for a given CPU this is executed on. For MSVC we are testing with the flags if the compiler is able to generate the intrinsics, runtime detection is now done with cpu_features? |
Yeah. Runtime detection should work. At least we have every reason to believe that. Your PR #411 looks promising. |
Check if all arch overrides are still valid for windows. E.g. AVX should be available on Appveyor, but it's ruled out.
The text was updated successfully, but these errors were encountered: