Skip to content

Commit

Permalink
Fix references to --engine=cc and --define=board_size=19
Browse files Browse the repository at this point in the history
  • Loading branch information
tommadams committed Oct 17, 2018
1 parent 06a9cc4 commit f1eb3d3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion cc/config/minigo.bzl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Defines the preprocessor macro MINIGO_BOARD_SIZE=9 for all minigo_cc_*
# build targets when bazel build is invoked with --define=board_size=9.
# Defines the preprocessor macro MINIGO_BOARD_SIZE=19 for all minigo_cc_*
# build targets when bazel build is invoked with --define=board_size=19.
# build targets by default.

def _board_size_copts():
return select({
"//cc/config:minigo9": ["-DMINIGO_BOARD_SIZE=9"],
Expand Down
2 changes: 1 addition & 1 deletion cluster/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ RUN cc/configure_tensorflow.sh
# Now bring in the rest of our code; changing our code will only trigger rebuilds below here
COPY staging /app

RUN bazel build --copt=-march=ivybridge --define=board_size=19 cc/main
RUN bazel build --copt=-march=ivybridge cc/main
2 changes: 1 addition & 1 deletion cluster/evaluator/Dockerfile-cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ FROM gcr.io/tensor-go/cc-base:0.17
COPY evaluator_cc_wrapper.sh /app

ADD staging/ /app
RUN bazel build -c opt --define=board_size=19 --define=tf=1 cc/main
RUN bazel build -c opt --define=tf=1 cc/main

CMD ["/bin/sh", "evaluator_cc_wrapper.sh"]
2 changes: 1 addition & 1 deletion cluster/selfplay/Dockerfile.tpu
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ RUN pip3 install "tensorflow==1.11.0"
ADD staging/ /app
WORKDIR /app

RUN bazel build -c opt --define=board_size=19 cc/main --define=tf=1 --define=tpu=1
RUN bazel build -c opt cc/main --define=tf=1 --define=tpu=1
CMD ["sh", "-c", "python rl_loop/selfplay.py --bucket_name=$BUCKET_NAME --mode=tpu"]
11 changes: 6 additions & 5 deletions minigui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ A UI for Minigo
1. By default, Minigui will use the Python Minigo engine. You can use the C++
engine by first compiling it (see the
[README](https://github.com/tensorflow/minigo/tree/master/cc/README.md)),
then passing `--engine=cc` when starting `minigui/serve.py`. You will need
to pass a frozen GraphDef proto as the `--model` command line argument
instead of the saved parameter data that the Python backend requires.
then passing `--engine=<tf,tpu,lite,trt>` when starting `minigui/serve.py`.
You will need to pass a frozen GraphDef proto as the `--model` command line
argument instead of the saved parameter data that the Python backend
requires.
**Note:** Compiling tensorflow from scratch can take 2+ hours if your
machine is not terribly beefy, So you might want to kick off the build and
Expand All @@ -82,6 +83,6 @@ A UI for Minigo
C++ engine binary, not when running the Minigui server:
```shell
bazel build --define=board_size=19 cc:main
python minigui/serve.py --port=8888 --model=$MODEL_DIR/$MODEL.converted.pb --engine=cc
bazel build -c opt --define=tf=1 cc:main
python minigui/serve.py --port=8888 --model=$MODEL_DIR/$MODEL.converted.pb --engine=tf
```
2 changes: 1 addition & 1 deletion minigui/fetch-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
--port=$MINIGUI_PORT \
--host=$MINIGUI_HOST \
--python_for_engine=${MINIGUI_PYTHON} \
--engine=cc
--engine=tf
}

0 comments on commit f1eb3d3

Please sign in to comment.