-
Notifications
You must be signed in to change notification settings - Fork 997
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
cpu: make local zero_val const, to avoid internal compiler error vs2019 #805
Conversation
Declared the local variable `zero_val` within the function body of `im2col` const, to avoid the following error from a Release build of Visual Studio 2019 version 16.7.1 (compiler version 19.27.29111 for x64): > D:\oneDNN\src\cpu\gemm_convolution_utils.cpp(401): fatal error C1001: Internal compiler error. > (compiler file 'd:\agent\_work\7\s\src\vctools\Compiler\Utc\src\p2\main.c', line 195) > To work around this problem, try simplifying or changing the program near the locations listed above. > If possible please provide a repro here: https://developercommunity.visualstudio.com > Please choose the Technical Support command on the Visual C++ > Help menu, or open the Technical Support help file for more information > CL!RaiseException()+0x69 > CL!RaiseException()+0x69 > CL!CloseTypeServerPDB()+0x22e6b > CL!CloseTypeServerPDB()+0xcd30a > Done building project "dnnl_cpu.vcxproj" -- FAILED. Related compiler problem report: "VS2019 Internal compiler error using __restrict keyword in Release build" https://developercommunity.visualstudio.com/content/problem/1145942/vs2019-internal-compiler-error-using-restrict-keyw.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Not sure why GitHub CI is unhappy.
Will check and merge this PR along with the changes from #580
Thank you!
Thanks @emfomenk ! The changes from #580? I guess you mean #801 😃 Did you or anyone else also get this internal compiler error in gemm_convolution_utils.cpp? It seems to me that it is a compiler bug introduced with a very recent update of VS2019 (Version 16.7 or 16.7.1, Compiler Version 19.27.29110 or 19.27.29111) The compiler error could also be avoided by removing the |
Oops, yeah, you are right.
No, we haven't seen such issue. But maybe we would once updated the version of
Yeah, restrict helps with performance a bit. Let's keep it! |
By the way, this PR might even improve the runtime performance, as
|
Merged! |
You're welcome @emfomenk! By the way, the current vs2019 version also gets an internal compiler error on the latest oneDNN release, v.1.6.1. If you're intending to still maintain oneDNN 1.6.x for a while, you might as well cherry-pick this very little commit onto your rls-v1.6 branch :) And of course, if you agree that this is a serious compiler bug, you may vote or leave a comment at Visual Studio problem 1145942 - VS2019 Internal compiler error using __restrict keyword in Release build |
Yeah, will do (I am currently working on some other fix for master and v1.6, so will cherry-pick your fix along with mine). |
As far as I can see, the compiler bug Visual Studio problem 1145942 - VS2019 Internal compiler error using __restrict keyword in Release build is fixed now, with VS2019 version 16.8.0, released on November 10, 2020. I think so, because I just did a successful Release build of oneDNN-1.6.1 by VS2019 version 16.8.0. 😃 oneDNN-1.6.1 did not yet include this pull request, so it got an internal compiler error from VS2019 version 16.7.x. Note that the compiler bug fix is not yet officially confirmed by Microsoft. |
Declared the local variable
zero_val
within the function body ofim2col
const, to avoid the following error from a Release build ofVisual Studio 2019 version 16.7.1 (compiler version 19.27.29111 for x64):
Related compiler problem report: "VS2019 Internal compiler error using
__restrict keyword in Release build"
https://developercommunity.visualstudio.com/content/problem/1145942/vs2019-internal-compiler-error-using-restrict-keyw.html