Skip to content

Commit

Permalink
[bazel] allocate 5 cores per verilator test to allow for harness and …
Browse files Browse the repository at this point in the history
…overhead

An alternative to lowRISC#16913 to prevent harnesses from getting pre-empted by
a simulation load.

We also stop overriding resource based allocation by removing
--local_test_jobs arg and update documentation

Signed-off-by: Drew Macrae <[email protected]>
  • Loading branch information
Drew Macrae committed Dec 22, 2022
1 parent 42ab42b commit e6bd406
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ coverage:coverage_clang --repo_env=BAZEL_LLVM_COV=/usr/bin/llvm-cov
# cached previously. See https://bazel.build/configure/coverage?hl=en#remote-execution
coverage:coverage_clang --nocache_test_results

# Verilator is built for 4 cores and can time out if bazel is running more
# than 1 test per four cores.
# Until we get the built-in tag "cpu:4" to work for verilator tests, we can run
# 1 test per 4 cores to avoid verilator performance falloff and timeouts we'd
# otherwise see on machines with fewer than 40 cores.
test --local_test_jobs=HOST_CPUS*0.25
# # Uncomment this or add to ~/.bazelrc to override resource constrained test
# # scheduling.
# test --local_test_jobs=HOST_CPUS*0.22
# # Verilator is built for 4 cores, but requires a harness and additional overhead.
# # Empirically 72 cores can support 16 simultaneous tests, but not 17.

# We have verilator tests that take more than an hour to complete
test --test_timeout=60,300,1500,7200
Expand Down
2 changes: 1 addition & 1 deletion rules/opentitan_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def verilator_params(
"@//hw:verilator",
"@//hw:fusesoc_ignore",
]
required_tags = ["verilator", "cpu:4"]
required_tags = ["verilator", "cpu:5"]
kwargs.update(
args = default_args + args,
data = required_data + data,
Expand Down

0 comments on commit e6bd406

Please sign in to comment.