Use RBE to cache TF build results#6867
Merged
GMNGeoffrey merged 2 commits intoiree-org:mainfrom Aug 25, 2021
Merged
Conversation
ScottTodd
reviewed
Aug 25, 2021
| # specific docker container the TF build is run in. The image URL is included | ||
| # for clarity and so that this reference is automatically updated by | ||
| # manage_images.py | ||
| build:remote_cache_tf_integrations --host_platform_remote_properties_override='properties:{name:"cache-silo-key" value:"gcr.io/iree-oss/cmake-bazel-frontends-swiftshader@sha256:103676490242311b9fad841294689a7ce1c755b935a21d8d898c25cfe3ec15e8"}' |
Member
There was a problem hiding this comment.
one more place to update when the docker image changes... could we just use the prod or latest tag?
Contributor
Author
There was a problem hiding this comment.
No this is a just an opaque string. If we used a tag it would never change, which would defeat the point 😛
manage_images.py updates all references to the docker image, so this should be ~zero marginal maintenance cost.
ScottTodd
approved these changes
Aug 25, 2021
GMNGeoffrey
added a commit
that referenced
this pull request
Aug 26, 2021
#6867 enabled this for the swiftshader integrations build, to good effect, frequently halving the time for the whole workflow. We don't run these builds on presubmit by default, but they're running on machines with real GPUs, so the resources are actually much more precious. Due to GCE constraints on machines with real GPUs, they build machines are also only 16 cores. Technically, these builds are running in slightly different docker containers and so should perhaps have different cache keys, but the only difference is in the final stage either installing nvidia or swiftshader and that only makes a difference for the CMake part of each build when we run vulkan tests. Tested: Bazel part of the turing presubmit run on this PR took under a minute instead of the typical 45 minutes (https://source.cloud.google.com/results/invocations/c23ee21c-2ca8-4717-896d-83e39e49e281 vs https://source.cloud.google.com/results/invocations/8511982d-8120-4e18-985f-5f68be93d4a8)
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TF makes it a total PITA to build it with remote execution, but we can
get a bunch of the benefits (and with much less configuration) with
remote caching. This has actions executed locally but cached remotely.
Note that we need to ensure that the machines reading and writing from
the cache are ~identical, so this should only be executed inside of a
docker container and the docker image digest is used as the cache key.
Not really sure why I didn't think of this earlier.
Tested: observe that in the integrations build of the second commit
here, the Bazel part of the build took 30 seconds.