-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e7cbce
commit 81ad5f9
Showing
24 changed files
with
645 additions
and
58 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
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 |
---|---|---|
@@ -1,24 +1,61 @@ | ||
@rem Uncomment if you want to enable assersions | ||
rem set ENABLE_ASSERT_AOBA=1 | ||
|
||
@rem Uncomment if you want to use OpenCL | ||
set USE_OpenCL_AOBA=1 | ||
|
||
@rem uncomment if you want to use IntelMKL | ||
rem set USE_CPUBLAS_AOBA=IntelMKL | ||
|
||
@rem uncomment if you want to use OpenBLAS | ||
set USE_CPUBLAS_AOBA=OpenBLAS | ||
|
||
@cd /d %~dp0 | ||
@del /q *~ bin\*.dll bin\*.exe src\common\tbl_*.inc 2> nul | ||
@rmdir /s /q objs 2> nul | ||
@if "%~1" == "clean" (exit /b 0) | ||
@if "%~2" neq "" (echo Usage: %~n0 [clean] && exit /b 1) | ||
@set CXXFLAGS=/nologo /W4 /EHsc /Foobjs\ /Febin\ /Ox /fp:fast | ||
@set CPPFLAGS=/DUSE_SSE4 /DUSE_MKL /DUSE_WINAPI /DUSE_OPENCL_AOBA /DNDEBUG /Isrc\common /Iwin\include | ||
@set LDFLAGS=/link /LIBPATH:win\lib64 | ||
|
||
@mkdir objs | ||
|
||
lib /nologo /machine:x64 /def:win\def\OpenCL.def /out:objs\OpenCL.lib | ||
@if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
@set CXXFLAGS=/nologo /W4 /EHsc /Foobjs\ /Febin\ /Ox /fp:fast | ||
@set CPPFLAGS=/DUSE_SSE4 /DUSE_WINAPI /Isrc\common /Iwin\include | ||
@set LDFLAGS=/link /LIBPATH:win\lib64 liblzma.lib | ||
@if "%ENABLE_ASSERT_AOBA%"=="1" ( | ||
set CPPFLAGS=%CPPFLAGS% /DDEBUG | ||
) else ( | ||
set CPPFLAGS=%CPPFLAGS% /DNDEBUG | ||
) | ||
@if "%USE_OpenCL_AOBA%"=="1" ( | ||
set CPPFLAGS=%CPPFLAGS% /DUSE_OPENCL_AOBA | ||
set LDFLAGS=%LDFLAGS% objs\OpenCL.lib | ||
lib /nologo /machine:x64 /def:win\def\OpenCL.def /out:objs\OpenCL.lib | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
) | ||
@if "%USE_CPUBLAS_AOBA%"=="IntelMKL" ( | ||
set CPPFLAGS=%CPPFLAGS% /DUSE_MKL | ||
set LDFLAGS=%LDFLAGS% mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib | ||
copy win\lib64\libiomp5md.dll bin\ | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
) | ||
@if "%USE_CPUBLAS_AOBA%"=="OpenBLAS" ( | ||
set CPPFLAGS=%CPPFLAGS% /DUSE_OPENBLAS | ||
set LDFLAGS=%LDFLAGS% libopenblas.dll.a | ||
copy win\lib64\libopenblas.dll bin\ | ||
copy win\lib64\libgcc_s_seh-1.dll bin\ | ||
copy win\lib64\libgfortran-3.dll bin\ | ||
copy win\lib64\libquadmath-0.dll bin\ | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
) | ||
|
||
copy win\lib64\libiomp5md.dll bin\ | ||
cl %CPPFLAGS% %CXXFLAGS% src\gencode\gencode.cpp | ||
@if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
|
||
bin\gencode | ||
@if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
|
||
cl %CPPFLAGS% %CXXFLAGS% src\net-test\net-test.cpp src\common\opencl.cpp src\common\nnet.cpp src\common\nnet-cpu.cpp src\common\nnet-ocl.cpp src\common\err.cpp src\common\iobase.cpp src\common\shogibase.cpp src\common\xzi.cpp src\common\osi.cpp src\common\option.cpp %LDFLAGS% Ws2_32.lib liblzma.lib mkl_intel_lp64.lib mkl_intel_thread.lib mkl_core.lib libiomp5md.lib objs\OpenCL.lib | ||
@if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
cl %CPPFLAGS% %CXXFLAGS% src\net-test\net-test.cpp src\common\opencli.cpp src\common\nnet.cpp src\common\nnet-cpu.cpp src\common\nnet-ocl.cpp src\common\err.cpp src\common\iobase.cpp src\common\shogibase.cpp src\common\xzi.cpp src\common\osi.cpp src\common\option.cpp Ws2_32.lib %LDFLAGS% | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) | ||
|
||
cl %CPPFLAGS% %CXXFLAGS% src\ocldevs\ocldevs.cpp src\common\err.cpp src\common\opencl.cpp %LDFLAGS% objs\OpenCL.lib | ||
@if %ERRORLEVEL% neq 0 exit /b %ERRORLEVEL% | ||
cl %CPPFLAGS% %CXXFLAGS% src\ocldevs\ocldevs.cpp src\common\err.cpp src\common\opencli.cpp %LDFLAGS% | ||
@if %ERRORLEVEL% neq 0 (exit /b %ERRORLEVEL%) |
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,19 @@ | ||
Copyright (c) 2012 MinGW.org project | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of this software and associated documentation files (the "Software"), | ||
to deal in the Software without restriction, including without limitation | ||
the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
and/or sell copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice, this permission notice and the below disclaimer | ||
shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
DEALINGS IN THE SOFTWARE. |
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,29 @@ | ||
Copyright (c) 2011-2014, The OpenBLAS Project | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
1. Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in | ||
the documentation and/or other materials provided with the | ||
distribution. | ||
3. Neither the name of the OpenBLAS project nor the names of | ||
its contributors may be used to endorse or promote products | ||
derived from this software without specific prior written | ||
permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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
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
File renamed without changes.
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
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
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
Oops, something went wrong.