Skip to content

Building with Visual Studio 2022 (v143) and CUDA 11.8 and protobuf 3.14.0 via vcpkg #11

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

Merged
merged 26 commits into from
Jun 15, 2023

Conversation

nietras
Copy link
Owner

@nietras nietras commented Jun 6, 2023

  • Update to CUDA 11.8 and cuDNN 8.9.1.23
  • Update from PlatformToolset v141 to v143 (Visual Studio 2022 MSVC)
  • Support compute_61,sm_61;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90. That is add Ada Lovelace (RTX 40xx).
  • Use protobuf 3.14.0 via vcpkg.
  • Add protobuf generated code to git.
  • Add Save overload that takes ModelFormat to FunctionShim.cs, to enable saving as onnx from C#.
  • Add zlibwapi.dll to CUDA nuget package since new dependency.
  • Split cublasLt.dll out into separate nuget package since package size otherwise > 512 MB.
  • Disable various warnings to avoid build breaking as those warnings treated as errors. Mostly data conversion warnings.

@@ -256,6 +255,11 @@ public void Save(string filepath)
this._Save(filepath);
}

public void Save(string filepath, ModelFormat format)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdabros @LarsPellarin perhaps we can get rid of some python ;)

@sigfrid696
Copy link

Hi nietras, just managed to compile on CUDA 11.8 a couple of days ago :)
I share with you some problems I had, maybe you already encountered and fixed them.
I don't know why but CUDA 11.8 package come with CUB 1.15 and not last one version of CUB 1.17.2
Just download this version from CUB page and put the define on CNTK props file to ignore the version check that cuda is doing. Then substitute the cub directory inside installation of CUDA 11.8 with new cub files.
In this way I compiled without any problems. I tested it and so far is working good...
I see that you have an ongoing version for CUDA 11.8 that is also ported to last visual studio 2022, I'll give it a try.
Thanks!

@nietras
Copy link
Owner Author

nietras commented Jun 8, 2023

Hey @sigfrid696, ha, well of course you did, just as I did. I got everything working too, incl. with CUB 1.15 which required a minor change to stdafx.h to reduce windows.h includes. So no issue there I think.

To get VS22 working I had to upgrade protobuf lib and I have tried using vcpkg for that. I am still struggling with getting this to link in the library to Cntk.Core instead of having a dependency on libprotobuf.dll, which is only an issue for Release build. I have no idea why, and can't get it to remove that, if I can't resolve I'll just have to ship that dll as part of package, but had hoped to get it linked in directly.

@nietras
Copy link
Owner Author

nietras commented Jun 8, 2023

Weird thing is it does appear to link with right libs, but still there is this dll dependency, which might be due to vcpkg issues?

8>    Searching C:\git\oss\CNTK\vcpkg_installed\x64-windows-static-md\x64-windows-static-md\lib\libprotobuf-lite.lib:
8>    Searching C:\git\oss\CNTK\vcpkg_installed\x64-windows-static-md\x64-windows-static-md\lib\libprotobuf.lib:
8>    Searching C:\git\oss\CNTK\vcpkg_installed\x64-windows-static-md\x64-windows-static-md\lib\libprotoc.lib:

@nietras
Copy link
Owner Author

nietras commented Jun 8, 2023

Appears I got it solved. No idea how, though.

image

@nietras nietras changed the title Building with Visual Studio 2022 (v143) and CUDA 11.8 and new protobuf library Building with Visual Studio 2022 (v143) and CUDA 11.8 and protobuf 3.14.0 via vcpkg Jun 12, 2023
@sigfrid696
Copy link

sigfrid696 commented Jun 13, 2023

@nietras a question about the porting to Visual Studio 2022.
CNTK relies on a compiled version of BOOST library, that is quite old (v 1.60, built with vc140) and is delivered as a pre-requirement to be installed before building the project.
Does porting to last version break this dependency or is it still consistent ?
Thanks

@nietras
Copy link
Owner Author

nietras commented Jun 15, 2023

Does porting to last version break this dependency or is it still consistent ?

@sigfrid696 same version is used. I believe v140 libs are compatible with v143 not? At least it works. We have successfully run the new build on NVidia RTX 4060, 3070, 2080 Ti. Packages are available at https://github.com/nietras?tab=packages and will be in the upcoming release after merging now.

@nietras nietras merged commit 9e5cb01 into master Jun 15, 2023
@nietras nietras deleted the refresh-40-series branch June 15, 2023 10:11
@nietras
Copy link
Owner Author

nietras commented Jun 15, 2023

Release can be found at https://github.com/nietras/CNTK/releases/tag/v2.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants