Skip to content

Commit

Permalink
Change link to LibTorch and add docs to workaround for known issue.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 500696638
Change-Id: I4d5d2f76efc0f927060bd493bdd106b20a5cf7d9
  • Loading branch information
lanctot committed Jan 9, 2023
1 parent 521d01a commit e75bdf1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions open_spiel/algorithms/alpha_zero_torch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ To build and use this implementation, you must set the optional global variables
`OPEN_SPIEL_BUILD_WITH_LIBTORCH` and `OPEN_SPIEL_BUILD_WITH_LIBNOP` to `ON` when
installing dependencies and building OpenSpiel.

**Note**: Note: there are currently known problems with the C++ PyTorch:
inteferences with pybind11 versions. Until it is properly fixed, please see
[the workaround described here](https://github.com/deepmind/open_spiel/issues/966#issuecomment-1322982393).

Then, to get started, see `examples/alpha_zero_torch_example.cc`.

Important note: this implementation was a user contribution (see
Expand Down
8 changes: 6 additions & 2 deletions open_spiel/scripts/global_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ export OPEN_SPIEL_BUILD_WITH_LIBTORCH="${OPEN_SPIEL_BUILD_WITH_LIBTORCH:-"OFF"}"
# CUDA 10.2 https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.1.zip
#
# For C++ Libtorch AlphaZero on macOS we recommend this URL:
# https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.8.0.zip
export OPEN_SPIEL_BUILD_WITH_LIBTORCH_DOWNLOAD_URL="${OPEN_SPIEL_BUILD_WITH_LIBTORCH_DOWNLOAD_URL:-"https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcpu.zip"}"
# https://download.pytorch.org/libtorch/cpu/libtorch-macos-1.10.1.zip
#
# Note: there are currently known problems with the C++ PyTorch: inteferences
# with pybind11 versions. Until it is properly fixed, there is a workaround:
# https://github.com/deepmind/open_spiel/issues/966#issuecomment-1322982393
export OPEN_SPIEL_BUILD_WITH_LIBTORCH_DOWNLOAD_URL="${OPEN_SPIEL_BUILD_WITH_LIBTORCH_DOWNLOAD_URL:-"https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.10.1%2Bcpu.zip"}"

# TensorflowCC is a CMake interface to the Tensorflow C++ API. It is used in
# C++ AlphaZero. See: https://github.com/deepmind/open_spiel/blob/master/docs/alpha_zero.md
Expand Down

0 comments on commit e75bdf1

Please sign in to comment.