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

Created on 13 Jun 2016  路  5Comments  路  Source: tensorflow/models

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

The last time I had this problem(with caffe) someone tolad 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).

Thanks!!

Most helpful comment

This is a question better suited for StackOverflow. Please in future ask questions there and tag them with the tensorflow tag.

I put the following in my .bazelrc

startup --batch_cpu_scheduling --io_nice_level 7
build --jobs 6 --ram_utilization_factor 50
test --jobs 6

All 5 comments

I used bazel build --jobs 4 ...

This is a question better suited for StackOverflow. Please in future ask questions there and tag them with the tensorflow tag.

I put the following in my .bazelrc

startup --batch_cpu_scheduling --io_nice_level 7
build --jobs 6 --ram_utilization_factor 50
test --jobs 6

FYI the --ram_utilization_factor flag was deprecated. The new version of @prb12 's .bazelrc is:

startup --batch_cpu_scheduling --io_nice_level 7
build --jobs 6 --local_ram_resources=HOST_RAM*0.5
test --jobs 6

What are the default numbers for jobs?

What are the default numbers for jobs?

@leimao Seems to be infinite (-1) depending on the number of threads of the machine

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atabakd picture atabakd  路  3Comments

nmfisher picture nmfisher  路  3Comments

XavDCtpz picture XavDCtpz  路  3Comments

xbcReal picture xbcReal  路  3Comments

Mostafaghelich picture Mostafaghelich  路  3Comments