Search code examples
tensorflowbazelsyntaxnet

How do I specify the number of CPU cores bazel uses?


I am building syntaxnet (tensorflow fork) with bazel. It's working very slowly and keeps hanging up.

The last time I had this problem (with caffe) someone told me to change the number of cores I was using by adding -j4. In bazel this command did not work. Any custom command for bazel like this?

CPU Specs: 3.8ghz clock, Quadcore

CPU Model: AMD 4800(or something along those lines).


Solution

  • I added --jobs 4 and it managed to get through. It's probably the same as -j4.

    Complete command line was:

    bazel test --jobs 4 --genrule_strategy=standalone syntaxnet/... util/utf8/...