-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix bazel OOM problems #1034
base: main
Are you sure you want to change the base?
fix bazel OOM problems #1034
Conversation
tensorflow_blade/.bazelrc
Outdated
@@ -69,6 +69,8 @@ build:disc_aarch64 --cxxopt=-DTAO_AARCH64 | |||
build:disc_aarch64 --define disc_aarch64=true | |||
build:disc_aarch64 --linkopt="-Xlinker --stub-group-size -Xlinker 10000000" | |||
build:disc_aarch64 --action_env BUILD_WITH_AARCH64=1 | |||
build:disc_aarch64 --experimental_local_memory_estimate | |||
build:disc_aarch64 --jobs=10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 10
too small for parallelism? @qiuxiafei @Yancey1989
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about determining this number according to the number of the cores on the machine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 10 is usually to small. And as on different machines, number of cores varies, there won't be a fit-for-all number. How about --local_cpu_resources
/--local_ram_resources
here: https://bazel.build/docs/user-manual#local-resources
@@ -37,7 +37,7 @@ build:disc --config=release_base | |||
|
|||
build:disc_cpu --config=disc --cxxopt=-DTAO_CPU_ONLY | |||
build:disc_x86 --config=disc_cpu --config=release_cpu_linux --cxxopt=-DTAO_X86 --define disc_x86=true | |||
build:disc_aarch64 --config=disc_cpu --cxxopt=-DTAO_AARCH64 --define disc_aarch64=true --linkopt="-Xlinker --stub-group-size -Xlinker 10000000" | |||
build:disc_aarch64 --config=disc_cpu --cxxopt=-DTAO_AARCH64 --define disc_aarch64=true --linkopt="-Xlinker --stub-group-size -Xlinker 10000000" --experimental_local_memory_estimate --local_ram_resources=HOST_RAM*.5 --local_cpu_resources=HOST_CPUS*.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be more aggressive? How about 80% of RAM and 90% of CPU
No description provided.