Skip to content

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.

License

Notifications You must be signed in to change notification settings

jnewlin12345/lc0

 
 

Repository files navigation

Building and running Lc0

Building right now may be a bit rough, we are improving and finding ways to simplifying the build process.

Linux (generic)

  1. (if you want version with tensorflow) Install tensorflow_cc by following steps described here.
  2. (if you want cuDNN version) Install CUDA and cuDNN.
  3. Install ninja build (ninja-build), meson, and (optionally) gtest (libgtest-dev).
  4. Go to lc0/
  5. Run ./build.sh
  6. lc0 will be in lc0/build/release/ directory

If you want to build with a different compiler, pass the CC and CXX environment variables:

CC=clang-6.0 CXX=clang++-6.0 ./build.sh

Ubuntu 16.04

For Ubuntu 16.04 you need the latest version of meson and clang-6.0 before performing the steps above:

wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install clang-6.0 ninja-build
pip3 install meson --user
CC=clang-6.0 CXX=clang++-6.0 INSTALL_PREFIX=~/.local ./build.sh

Make sure that ~/.local/bin is in your PATH environment variable. You can now type lc0 --help and start.

Windows

  1. Install Microsoft Visual Studio
  2. Install CUDA (v9.2 is fine)
  3. Install cuDNN.
  4. Install Python3
  5. Install Meson: pip3 install --upgrade meson
  6. Edit build-cuda.cmd:
  • If you use MSVS other than 2015 (or if it's installed into non-standard location):
    • C:\Program Files (x86)\Microsoft Visual Studio 14.0\ replace 14.0 with your version
    • --backend 2015 replace 2015 with your version
  • C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\lib\x64 replace with your CUDA path
  • C:\dev\cuDNN\ replace with your cuDNN directory
  1. Run build-cuda.cmd. It will generate MSVS project and pause.

Then either:

  1. Hit to build it.
  2. Resulting binary will be build/lc0.exe

Or.

  1. Open generated solution build/lc0.sln in Visual Studio and build yourself.

Mac

  1. Install brew as per the instructions at https://brew.sh/
  2. Install python3: brew install python3
  3. Install meson: brew install meson
  4. Install ninja: brew install ninja
  5. Run ./build.sh
  6. The resulting binary will be in build/release

About

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.4%
  • C 6.2%
  • Cuda 4.0%
  • Meson 1.3%
  • Other 0.1%