Skip to content
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

From master #1

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
170e830
clean up onnx casts (#2084)
borg323 Oct 28, 2024
b725fb2
onnx make alt_mish work with other data types (#2082)
borg323 Oct 28, 2024
96f98af
fix xla with multiple devices (#2081)
borg323 Oct 28, 2024
dfcd1c3
chore: update configfile.cc (#2085)
eltociear Nov 24, 2024
9239021
Move to C++20 (#2088)
borg323 Dec 16, 2024
3c2db95
code reorganization (#2041)
borg323 Dec 16, 2024
242ddf5
Spinlock warning fix (#2095)
mooskagh Dec 21, 2024
4692791
speed up position and history (#1761)
borg323 Dec 23, 2024
c3a160c
Make EncodePositionForNN accept span<Position> (#2097)
mooskagh Dec 24, 2024
2123284
Decoupling EngineLoop from EngineController (#2102)
mooskagh Dec 28, 2024
82dd466
Minor changes to proto generation (#2025)
mooskagh Dec 28, 2024
0ba125d
Move src/mcts/ to src/search/classic/, and to classic namespace (#2094)
mooskagh Dec 29, 2024
8ccae03
New backend API and wrapper for old networks. (#2098)
mooskagh Dec 30, 2024
fc0abdc
Move backend-specific options out of search params.cc (#2104)
mooskagh Jan 1, 2025
d5c6638
fix rescorer build with newer meson (#2089)
borg323 Jan 2, 2025
548267c
Introduce new search API, add a sample "policy head" algorithm (#2100)
mooskagh Jan 2, 2025
ae7b22a
Adding BackendManager functions to create a backend. (#2106)
mooskagh Jan 3, 2025
ffd2419
Implement node cache as a backend layer. (#2108)
mooskagh Jan 4, 2025
4c1f63e
Plug new Search and Backend APIs to the engine (#2107)
mooskagh Jan 4, 2025
7b0ef8d
fix appveyor build (#2110)
borg323 Jan 11, 2025
6d578c0
Add a makefile for OpenBench (#2113)
mooskagh Jan 24, 2025
2da3a5b
Fix openbench-specific issues (#2115)
mooskagh Jan 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,41 @@ version: 2
jobs:
build:
docker:
- image: danieluranga/leela_chess_zero-lc0_ubuntu_builder:0.0.8
- image: nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04
steps:
- checkout
- run:
name: Install build tools
command: |
apt-get update
apt-get -y install git python3-pip gcc-10 g++-10 clang-12 zlib1g zlib1g-dev
pip3 install meson==0.63
pip3 install ninja
- run:
name: "Pull Submodules"
command: git submodule update --init
- run:
name: Update Meson
command: pip3 install --upgrade meson==0.58.1
- run:
name: Meson GCC
environment:
CC: gcc-8
CXX: g++-8
CC: gcc-10
CXX: g++-10
command: meson build-gcc -Dgtest=false
- run:
name: Meson Clang
environment:
CC: clang-12
CXX: clang++-12
command: meson build-clang -Dgtest=false
- run:
name: Build GCC
command: |
cd build-gcc
ninja -j 4
- run:
name: Build Clang
command: |
cd build-clang
ninja -j 4
"mac":
macos:
xcode: 14.1.0
Expand All @@ -34,7 +49,7 @@ jobs:
- run:
name: Install build tools
command: |
pip3 install meson==0.63
pip3 install meson==1.3.0
pip3 install ninja
curl -LJOs https://github.com/ispc/ispc/releases/download/v1.21.0/ispc-v1.21.0-macOS.universal.tar.gz
tar xf ispc-v1.21.0-macOS.universal.tar.gz
Expand Down
13 changes: 13 additions & 0 deletions OpenBench/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ifndef EXE
EXE = $(CURDIR)/lc0
endif

all:
ifdef EVALFILE
../build.sh -Dembed=true && mv ../build/release/lc0 $(EXE)
cat $(EVALFILE) >> $(EXE)
perl -e "printf '%sLc0!', pack('V', -s '$(EVALFILE)')" >> $(EXE)
else
../build.sh && mv ../build/release/lc0 $(EXE)
endif

38 changes: 19 additions & 19 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '{build}'
configuration: Release
platform: x64
image:
- Visual Studio 2017
- Visual Studio 2019
environment:
matrix:
- NAME: gpu-nvidia-cudnn
Expand Down Expand Up @@ -47,7 +47,7 @@ install:
- cmd: set NET_HASH=3e3444370b9fe413244fdc79671a490e19b93d3cca1669710ffeac890493d198
- cmd: IF NOT %OPENCL%==true IF NOT %DX%==true set NET=791556
- cmd: IF NOT %OPENCL%==true IF NOT %DX%==true set NET_HASH=f404e156ceb2882470fd8c032b8754af0fa0b71168328912eaef14671a256e34
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
#- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
- cmd: set DNNL_NAME=dnnl_win_1.5.0_cpu_vcomp
- cmd: IF %NAME%==cpu-dnnl IF NOT EXIST C:\cache\%DNNL_NAME% appveyor DownloadFile https://github.com/oneapi-src/oneDNN/releases/download/v1.5/dnnl_win_1.5.0_cpu_vcomp.zip
- cmd: IF %NAME%==cpu-dnnl IF NOT EXIST C:\cache\%DNNL_NAME% 7z x dnnl_win_1.5.0_cpu_vcomp.zip -oC:\cache
Expand All @@ -65,26 +65,26 @@ install:
- cmd: IF %ISPC%==true IF NOT EXIST C:\cache\ispc-v1.13.0-windows appveyor DownloadFile https://github.com/ispc/ispc/releases/download/v1.13.0/ispc-v1.13.0-windows.zip
- cmd: IF %ISPC%==true IF NOT EXIST C:\cache\ispc-v1.13.0-windows 7z x ispc-v1.13.0-windows.zip -oC:\cache\ispc-v1.13.0-windows
- cmd: IF %ISPC%==true set PATH=C:\cache\ispc-v1.13.0-windows\bin;%PATH%
- cmd: set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0"
- cmd: set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1"
- cmd: IF %CUDNN%==true IF NOT EXIST "%CUDA_PATH%\cuda" set CUDNN_INSTALL=1
- cmd: IF DEFINED CUDNN_INSTALL appveyor DownloadFile https://developer.nvidia.com/compute/cuda/10.0/Prod/network_installers/cuda_10.0.130_win10_network
- cmd: IF DEFINED CUDNN_INSTALL cuda_10.0.130_win10_network -s nvcc_10.0 cublas_dev_10.0 cublas_10.0 cudart_10.0
- cmd: IF DEFINED CUDNN_INSTALL appveyor DownloadFile http://developer.download.nvidia.com/compute/redist/cudnn/v7.4.2/cudnn-10.0-windows10-x64-v7.4.2.24.zip
- cmd: IF DEFINED CUDNN_INSTALL 7z x cudnn-10.0-windows10-x64-v7.4.2.24.zip -o"%CUDA_PATH%"
- cmd: IF DEFINED CUDNN_INSTALL appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/10.1/Prod/network_installers/cuda_10.1.243_win10_network.exe
- cmd: IF DEFINED CUDNN_INSTALL cuda_10.1.243_win10_network -s nvcc_10.1 cublas_dev_10.1 cublas_10.1 cudart_10.1
- cmd: IF DEFINED CUDNN_INSTALL appveyor DownloadFile https://developer.download.nvidia.com/compute/redist/cudnn/v7.5.1/cudnn-10.1-windows10-x64-v7.5.1.10.zip
- cmd: IF DEFINED CUDNN_INSTALL 7z x cudnn-10.1-windows10-x64-v7.5.1.10.zip -o"%CUDA_PATH%"
- cmd: IF %CUDNN%==false set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1"
- cmd: IF %CUDA%==true IF NOT EXIST "%CUDA_PATH%" set CUDA_INSTALL=1
- cmd: IF DEFINED CUDA_INSTALL appveyor DownloadFile https://developer.download.nvidia.com/compute/cuda/11.1.0/network_installers/cuda_11.1.0_win10_network.exe
- cmd: IF DEFINED CUDA_INSTALL cuda_11.1.0_win10_network.exe -s nvcc_11.1 cublas_dev_11.1 cublas_11.1 cudart_11.1 documentation_11.1
- cmd: IF %CUDA%==true set PATH=%CUDA_PATH%\bin;%PATH%
- cmd: set PATH=C:\Python36;C:\Python36\scripts;%PATH%
- cmd: pip3 install --upgrade meson==0.55.3
- cmd: set MIMALLOC_PATH=C:\cache\mimalloc-1.7.1
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%" appveyor DownloadFile https://github.com/microsoft/mimalloc/archive/refs/tags/v1.7.1.zip
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%" 7z x v1.7.1.zip -oC:\cache\
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%"\out msbuild "%MIMALLOC_PATH%"\ide\vs2017\mimalloc-override.vcxproj /p:Configuration=Release /m
- cmd: IF %NAME%==android IF NOT EXIST C:\ndk\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64 appveyor DownloadFile https://dl.google.com/android/repository/android-ndk-r19c-windows-x86_64.zip
- cmd: IF %NAME%==android IF NOT EXIST C:\ndk\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64 7z x android-ndk-r19c-windows-x86_64.zip -oC:\ndk
- cmd: IF %NAME%==android set PATH=C:\ndk\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64\bin;%PATH%
- cmd: set PATH=C:\Python310;C:\Python310\scripts;%PATH%
#- cmd: pip3 install --upgrade meson==0.55.3
- cmd: set MIMALLOC_PATH=C:\cache\mimalloc-1.8.7
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%" appveyor DownloadFile https://github.com/microsoft/mimalloc/archive/refs/tags/v1.8.7.zip
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%" 7z x v1.8.7.zip -oC:\cache\
- cmd: IF %ANDROID%==false IF NOT EXIST "%MIMALLOC_PATH%"\out msbuild "%MIMALLOC_PATH%"\ide\vs2019\mimalloc-override.vcxproj /p:Configuration=Release /m
- cmd: IF %NAME%==android IF NOT EXIST C:\ndk\android-ndk-r27c\toolchains\llvm\prebuilt\windows-x86_64 appveyor DownloadFile https://dl.google.com/android/repository/android-ndk-r27c-windows.zip
- cmd: IF %NAME%==android IF NOT EXIST C:\ndk\android-ndk-r27c\toolchains\llvm\prebuilt\windows-x86_64 7z x android-ndk-r27c-windows.zip -oC:\ndk
- cmd: IF %NAME%==android set PATH=C:\ndk\android-ndk-r27c\toolchains\llvm\prebuilt\windows-x86_64\bin;%PATH%
- cmd: IF %NAME%==android sed "s/clang+*/&.cmd/" cross-files/aarch64-linux-android >crossfile-aarch64
- cmd: IF %NAME%==android IF NOT EXIST C:\cache\OpenBLAS\android-aarch64 appveyor DownloadFile https://github.com/borg323/OpenBLAS/releases/download/android-0.3.27/openblas-android-aarch64.zip
- cmd: IF %NAME%==android IF NOT EXIST C:\cache\OpenBLAS\android-aarch64 7z x openblas-android-aarch64.zip -oC:\cache\OpenBLAS
Expand All @@ -103,10 +103,10 @@ install:
- cmd: cd C:\projects\lc0
cache:
- C:\cache
- 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0'
- 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1'
- 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1'
- C:\projects\lc0\subprojects\packagecache
- C:\ndk\android-ndk-r19c\toolchains\llvm\prebuilt\windows-x86_64
- C:\ndk\android-ndk-r27c\toolchains\llvm\prebuilt\windows-x86_64
before_build:
- cmd: git submodule update --init --recursive
- cmd: IF %BLAS%==true (echo.#define DEFAULT_MAX_PREFETCH 0 & echo.#define DEFAULT_TASK_WORKERS 0) > params_override.h
Expand All @@ -124,7 +124,7 @@ before_build:
- cmd: SET EXTRA=
- cmd: IF %ANDROID%==false SET EXTRA=-Db_vscrt=md
- cmd: IF %ONNX_DML%==true SET EXTRA=-Db_vscrt=md -Donnx_libdir=C:\cache\%ONNX_NAME%\lib -Donnx_include=C:\cache\%ONNX_NAME%\include
- cmd: IF %ANDROID%==false meson build --backend vs2017 --buildtype release -Dgtest=%GTEST% -Dopencl=%OPENCL% -Dblas=%BUILD_BLAS% -Ddnnl=true -Ddx=%DX% -Dcudnn=%CUDNN% -Donednn=%ONEDNN% -Dispc_native_only=false -Dnative_cuda=false -Dpopcnt=%POPCNT% -Df16c=%F16C% -Dcudnn_include="%CUDA_PATH%\include","%CUDA_PATH%\cuda\include" -Dcudnn_libdirs="%CUDA_PATH%\lib\x64","%CUDA_PATH%\cuda\lib\x64" -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\dist64\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\dist64\lib" -Ddnnl_dir="%PKG_FOLDER%\%DNNL_NAME%" -Dopencl_include="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\include" -Dopencl_libdirs="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\lib\x64" -Ddefault_library=static -Dmalloc=mimalloc -Dmimalloc_libdir="%MIMALLOC_PATH%"\out\msvc-x64\Release %EXTRA%
- cmd: IF %ANDROID%==false meson build --backend vs2019 --buildtype release -Dgtest=%GTEST% -Dopencl=%OPENCL% -Dblas=%BUILD_BLAS% -Ddnnl=true -Ddx=%DX% -Dcudnn=%CUDNN% -Donednn=%ONEDNN% -Dispc_native_only=false -Dnative_cuda=false -Dpopcnt=%POPCNT% -Df16c=%F16C% -Dcudnn_include="%CUDA_PATH%\include","%CUDA_PATH%\cuda\include" -Dcudnn_libdirs="%CUDA_PATH%\lib\x64","%CUDA_PATH%\cuda\lib\x64" -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\dist64\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\dist64\lib" -Ddnnl_dir="%PKG_FOLDER%\%DNNL_NAME%" -Dopencl_include="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\include" -Dopencl_libdirs="%PKG_FOLDER%\opencl-nug.0.777.77\build\native\lib\x64" -Ddefault_library=static -Dmalloc=mimalloc -Dmimalloc_libdir="%MIMALLOC_PATH%"\out\msvc-x64\Release %EXTRA%
- cmd: IF %ANDROID%==true meson arm64-v8a --buildtype release -Dgtest=false -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\android-aarch64\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\android-aarch64\lib" -Dembed=%EMBED% -Ddefault_library=static --cross-file crossfile-aarch64
- cmd: IF %ANDROID%==true meson armeabi-v7a --buildtype release -Dgtest=false -Dopenblas_include="%PKG_FOLDER%\OpenBLAS\android-armv7a\include" -Dopenblas_libdirs="%PKG_FOLDER%\OpenBLAS\android-armv7a\lib" -Dembed=%EMBED% -Ddefault_library=static --cross-file crossfile-armv7a -Dispc=false -Dneon=false
build_script:
Expand Down
12 changes: 6 additions & 6 deletions cross-files/aarch64-linux-android
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Tested with Android NDK r19c, default toolchain
# Tested with Android NDK r27c, default toolchain
# Targeting API level 21

# Set the toolchain path on your environment
Expand All @@ -17,8 +17,8 @@ cpp_link_args = ['-llog', '-static-libstdc++']
[binaries]
c = 'aarch64-linux-android21-clang'
cpp = 'aarch64-linux-android21-clang++'
ar = 'aarch64-linux-android-ar'
strip = 'aarch64-linux-android-strip'
ld = 'aarch64-linux-android-ld'
ranlib = 'aarch64-linux-android-ranlib'
as = 'aarch64-linux-android-as'
ar = 'llvm-ar'
strip = 'llvm-strip'
ld = 'ld'
ranlib = 'llvm-ranlib'
as = 'aarch64-linux-android21-clang'
12 changes: 6 additions & 6 deletions cross-files/armv7a-linux-android
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Tested with Android NDK r19c, default toolchain
# Tested with Android NDK r27c, default toolchain
# Targeting API level 21

# When targeting API levels < 24 the build fails unless _FILE_OFFSET_BITS is unset.
Expand All @@ -24,8 +24,8 @@ cpp_link_args = ['-llog', '-static-libstdc++']
[binaries]
c = 'armv7a-linux-androideabi21-clang'
cpp = 'armv7a-linux-androideabi21-clang++'
ar = 'arm-linux-androideabi-ar'
strip = 'arm-linux-androideabi-strip'
ld = 'arm-linux-androideabi-ld'
ranlib = 'arm-linux-androideabi-ranlib'
as = 'arm-linux-androideabi-as'
ar = 'llvm-ar'
strip = 'llvm-strip'
ld = 'ld'
ranlib = 'llvm-ranlib'
as = 'armv7a-linux-androideabi21-clang'
Loading