Skip to content

Commit

Permalink
Set sccache bucket on test runs to save some run minutes (#61140)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #61140

While working on bazel port to GitHub Actions I noticed that we do not set sccache bucket for test runs that causing cache misses while running test jobs. For example https://github.com/pytorch/pytorch/runs/2965919198?check_suite_focus=true  test run 1 uses local cache and has 44 cache misses with avg 9 sec read per miss it is saving 44*9/60 = 7 minutes per run.

Here is another example
https://github.com/pytorch/pytorch/runs/2966210127?check_suite_focus=true

Open to feedback if there is a downside of using AWS cache.

Test Plan: Imported from OSS

Reviewed By: 1ntEgr8

Differential Revision: D29557292

Pulled By: rsemenov

fbshipit-source-id: e8fb000850ec4627d7cccf690e8f5743999fdf36
  • Loading branch information
rsemenov authored and facebook-github-bot committed Jul 6, 2021
1 parent 05c1e5b commit 864dcbb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/templates/linux_ci_workflow.yml.j2
Expand Up @@ -302,6 +302,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down
Expand Up @@ -295,6 +295,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down
Expand Up @@ -296,6 +296,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down
Expand Up @@ -295,6 +295,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down
Expand Up @@ -295,6 +295,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pytorch-linux-xenial-py3.6-gcc5.4.yml
Expand Up @@ -296,6 +296,7 @@ jobs:
-e SHARD_NUMBER \
-e JOB_BASE_NAME \
-e MAX_JOBS="$(nproc --ignore=2)" \
-e SCCACHE_BUCKET \
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
--security-opt seccomp=unconfined \
--cap-add=SYS_PTRACE \
Expand Down

0 comments on commit 864dcbb

Please sign in to comment.