Skip to content

jw1912/bullet

Repository files navigation

bullet

A CUDA/CPU NN Trainer, used to train NNUE-style networks for akimbo.

Also used by many other engines, including:

Currently Supported Games:

  • Chess
  • Ataxx

Raise an issue for support of a new game.

Usage

Import the crate with

bullet = { package = "bullet_lib", version = "1.0.0", features = ["cuda"] }

Check out the wiki and examples to see how to use the crate.

Utilities

You can build bullet-utils with cargo b -r --package bullet-utils, to do the following:

  • Convert Data
  • Interleave Multiple Data Files
  • Shuffle Data Files
  • Validate Data Files

Use ./target/release/bullet-utils[.exe] help to see specific usage.

Currently Supported Backends:

Default

CPU backend not intended for serious training use. It is suitable for training small networks or various utilities, such as loading nets to requantise them or test their output on specific positions.

CUDA

The "first class" supported backend. To compile to target CUDA you need to enable the cuda feature, as demonstrated in the wiki.

HIP

Mainly directed toward users with AMD GPUs. To compile to target HIP you need to enable the hip feature, as demonstrated in the wiki. You will need to install the HIP SDK.

Note

If you are on Windows, you must also add %HIP_PATH%\bin\ to the PATH variable in your system environment variables.

Warning

Due to what appears to be a bug in RoCM, some tests will sometimes fail due to missed synchronisation between device and host in a multithreaded context. As the trainer only calls kernels from one thread, this should not be an issue in training.