-
Notifications
You must be signed in to change notification settings - Fork 114
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
AVX2 disabled on Windows as workaround for gcc bug #295
Comments
Looks like the 4600 HD doesn't support 64-bit integer arithmetic (GL_ARB_gpu_shader_int64). Do you have a machine with a discrete graphics card you can try? Intel integrated cards have been lagging in support for a while, but even fairly old NVidia/AMD discrete GPUs should work. |
Yes, I'm afraid I will need to upgrade.. |
Yes, that was that, i managed to start it, Now I get other error: |
This is on Windows, I assume? Can you post a screenshot of the error showing both the glscopeclient window and the console? |
I confirm on my side glscopeclient "crash" with FFT too with Windows build it seems related to alignment to be confirmed... |
Yes it crashes with Segmentation fault: sinisa@t440p MINGW64 ~ sinisa@t440p MINGW64 ~ Main screen closes, nothing to see there. I tried FFT, histograms, and few more and it crashes. |
This issue shall be probably renamed as it is an issue with FFTS for Windows with MSYS2 mingw64 it seems it does not affect GNU/Linux to be confirmed
|
Compute next highest power of 2 to fix issues when using code (in different parts): const size_t npoints = pow(2, ceil(log2(depth))); (see scopehal\TestWaveformSource.cpp => TestWaveformSource::DegradeSerialData()...) The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts. This implementation fix issue ngscopeclient/scopehal-apps#295 The function next_pow2() shall replace pow(2, ceil(log2())) in following code: scopehal\TestWaveformSource.cpp Line 282: //const size_t npoints = pow(2, ceil(log2(depth))); scopeprotocols\DeEmbedFilter.cpp Line 230: const size_t npoints = pow(2, ceil(log2(npoints_raw))); scopeprotocols\FFTFilter.cpp Line 179: const size_t npoints = pow(2, ceil(log2(npoints_raw))); scopeprotocols\JitterSpectrumFilter.cpp Line 195: const size_t npoints = pow(2, ceil(log2(npoints_raw)));
Compute next highest power of 2 to fix issues when using code (in different parts): const size_t npoints = pow(2, ceil(log2(depth))); (see scopehal\TestWaveformSource.cpp => TestWaveformSource::DegradeSerialData()...) The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts. This implementation fix issue ngscopeclient/scopehal-apps#295
Compute next highest power of 2 to fix issues when using code (in different parts): const size_t npoints = pow(2, ceil(log2(npoints_raw))); The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts. This implementation fix issue ngscopeclient/scopehal-apps#295
Compute next highest power of 2 to fix issues when using code: const size_t npoints = pow(2, ceil(log2(npoints_raw))); The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts. This implementation fix issue ngscopeclient/scopehal-apps#295
…uild Compute next highest power of 2 to fix issues when using code: const size_t npoints = next_pow2(npoints_raw); The original code (pow(2, ceil(log2())) has some border effects when built with MSYS2 mingw64 "Release" mode as it does not compute correctly the highest power of 2 for example with parameter 100000 it was returning 131071 (instead of 131072) which crashed ffts. This implementation fix issue ngscopeclient/scopehal-apps#295
I confirm this issue is fixed now with latest master since 27078c0 |
@sbabic44 can you please test and confirm this is fixed? Also, I added a backward compatibility version of the shaders which does not require GL_ARB_gpu_shader_int64, please test on your 4600 HD and see if it works there too? |
Andrew, `sinisa@WKS MINGW64 ~/ffts/build/scopehal-apps/build Warning: Warning: Can't parse preference value 13,370000 for preference hidden_s But shaders work with 4600HD on win10 now just fine.. Best regards |
So looks like we still have a problem. Additionally, it seems like the preference parsing is getting messed up by locales that uses commas as a decimal separator. Let me file a separate ticket for that. |
@sbabic44 Can you try with latest code and see how it works? Try with and without the --noopencl command line argument. |
On rev 3e9523c (current master) / Windows segfault happens immediately after doing RF->FFT on any demo scope waveform (see call stack below) Console output: Detecting CPU features... * AVX2 OpenCL support: not present at compile time. GPU acceleration disabled. Context: OpenGL 4.2 compatibility profile GL_VENDOR = NVIDIA Corporation GL_RENDERER = Quadro T1000/PCIe/SSE2 GL_VERSION = 4.2.0 NVIDIA 452.66 GL_SHADING_LANGUAGE_VERSION = 4.20 NVIDIA via Cg compiler Initial GL error code = 0 GL_ARB_gpu_shader_int64 = supported Call stack: libscopeprotocols.dll!FFTFilter::CosineSumWindowAVX2(const float * data, size_t len, float * out, float alpha0) (c:\apps\msys64\home\root\gls\scopehal-apps\lib\scopeprotocols\FFTFilter.cpp:714) |
Turning off AVX2 via g_hasAvx2 solves the problem Might be related to this: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 |
Rather than turning off AVX2 on Windows, what happens if you add -mavx to the compile command line? AVX1 should be pretty well supported and it might change the ABI enough to make stuff align correctly. |
Same segfault with -mavx I think using clang instead of gcc might help, but not sure how to set CMake up for it to test |
Just checking in on this: after ngscopeclient/scopehal#484, is this issue still relevant or can we close it? |
Linked GCC issue seems to be still open, so turning AVX off on Windows as a temp workaround is still relevant and shouldn't be reverted. Perhaps we can have a separate issue dedicated to reverting it when GCC is fixed? There is also a way to fix this without fixing GCC by moving all relevant stack variables to classes or heap and aligning them manually, but I don't know if it's worth it since code quality will suffer as a result |
Hmm. Let me rename this issue then to reflect the true situation. |
On Keysight 3000T, software throws shader error and quits.
PC is Windows, Intel 4600 HD, OpenGL 4.3. latest driver..
Errors in att..
Error 450.txt
Tried changing GLSL version: 450 to 430
Error 430.txt
The text was updated successfully, but these errors were encountered: