Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build fixes and instructions for OpenCL in windows
- Loading branch information
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
rd /s build | ||
|
||
rem set MSBuild="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" | ||
set MSBuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" | ||
|
||
rem call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 | ||
|
||
meson.py build --backend vs2017 --buildtype release ^ | ||
-Dmkl_include="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\include" ^ | ||
-Dmkl_libdirs="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\mkl\lib\intel64" ^ | ||
-Dopencl_libdirs="C:\Program Files (x86)\AMD APP SDK\3.0\lib\x86_64" ^ | ||
-Dopencl_include="C:\Program Files (x86)\AMD APP SDK\3.0\include" ^ | ||
-Ddefault_library=static | ||
|
||
pause | ||
|
||
cd build | ||
|
||
%MSBuild% /p:Configuration=Release /p:Platform=x64 ^ | ||
/p:PreferredToolArchitecture=x64 "subprojects\zlib-1.2.11\Windows resource for file 'win32_zlib1.rc'@cus.vcxproj" ^ | ||
/filelogger | ||
|
||
%MSBuild% /p:Configuration=Release /p:Platform=x64 ^ | ||
/p:PreferredToolArchitecture=x64 subprojects\zlib-1.2.11\subprojects@zlib-1.2.11@@z@sta.vcxproj ^ | ||
/filelogger | ||
|
||
%MSBuild% /p:Configuration=Release /p:Platform=x64 ^ | ||
/p:PreferredToolArchitecture=x64 lc0@exe.vcxproj ^ | ||
/filelogger | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Windows MKL/OpenCL | ||
|
||
0. Install Microsoft Visual Studio. For vs2017 make sure the option "Desktop development with C++" | ||
is installed (you can add it if not) | ||
|
||
1. Install git for windows - this can be used to get lc0 but also needed for meson | ||
|
||
2. Install MKL - dont forget to run `mklvars.bat intel64` to set up the paths to the dlls | ||
|
||
3. For OpenCL you also need to install: | ||
* Boost | ||
* OpenCL libraries | ||
|
||
4. Install Python3 - be sure to check the box to add python to the path | ||
|
||
5. Install Meson: `pip3 install --upgrade meson` | ||
|
||
6. Edit `build-cl.cmd`: | ||
|
||
* If you use MSVS other than 2017 community edition (or if it's installed into non-standard location) | ||
replace the path to vcvarsall.bat and MSBuild.exe. If you can't find vcvarsall.bat on VS2017, you | ||
need to install option "Desktop development with C++". Some example paths are in comments. | ||
* `--backend 2017` replace 2017 with the correct version. | ||
* `mkl_include` and `mkl_libdirs` should point to the MKL include and lib directories | ||
* If building with OpenCL `opencl_libdirs` and `opencl_include` should point to the OpenCL include and | ||
lib directories. The include directory is the one with the `CL` directory containing `opencl.h`, not | ||
directly the one containing `opencl.h`. | ||
|
||
7. Run `build-cl.cmd`. It will generate MSVS project and pause. | ||
|
||
8. Hit <Enter> to build it. | ||
|
||
9. Resulting binary will be `build/lc0.exe` | ||
|
||
Alternatively you can | ||
|
||
8. open generated solution `build/lc0.sln` in Visual Studio and build yourself. | ||
|
||
|