Skip to content

Set up sccache inside the DockerFile.#9697

Closed
Jorghi12 wants to merge 19 commits intopytorch:masterfrom
Jorghi12:caffe2_sccache
Closed

Set up sccache inside the DockerFile.#9697
Jorghi12 wants to merge 19 commits intopytorch:masterfrom
Jorghi12:caffe2_sccache

Conversation

@Jorghi12
Copy link
Contributor

@Jorghi12 Jorghi12 commented Jul 23, 2018

  1. Start setting up sccache inside of the DockerFile, instead of in the jenkins build script. Also created a fork of sccache that supports HCC, uploaded to AWS.

  2. Allowing maximum swap space usage for ROCm builds to alleviate the LLVM out of memory issue we've been facing.

@Jorghi12 Jorghi12 requested a review from yf225 July 23, 2018 02:09
@yf225
Copy link
Contributor

yf225 commented Jul 23, 2018

Is there a way to call sccache --zero-stats before the build, and then call sccache --show-stats after the build so we can manually check and make sure cache hits are happening? I also noticed that there is report_compile_cache_stats function, but not sure if it is used by all the builds.

Copy link
Contributor

@yf225 yf225 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@yf225
Copy link
Contributor

yf225 commented Jul 23, 2018

I will start a Caffe2 docker image build based on the changes here.

Jorghi12 added 3 commits July 23, 2018 01:51
By default the swap memory limit is set to 2 x the memory limit. 

Testing build using unlimited swap for ROCm.
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorghi12 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@Jorghi12
Copy link
Contributor Author

Since this change is updating the DockerFile & the build script at once, the caffe2-docker trigger https://ci.pytorch.org/jenkins/job/caffe2-docker-trigger/148/ will be the source of truth.

@Jorghi12
Copy link
Contributor Author

Jorghi12 commented Jul 24, 2018

The Caffe2 Docker Trigger passes all but one: https://ci.pytorch.org/jenkins/job/caffe2-docker-trigger/149/

Due to:
denied: The repository with name 'caffe2/py2-mkl-ubuntu16.04' in registry with id '308535385114' already has the maximum allowed number of images which is '10000'

@ezyang @yf225

E: Held packages were changed and -y was used without --allow-change-held-packages.
@Jorghi12 Jorghi12 requested a review from bddppq July 25, 2018 02:50
Jorghi12 added 4 commits July 24, 2018 22:59
Trying without memory swap to test an issue.
Keep hip thrust.
for compiler in "${compilers[@]}"; do
(
echo "#!/bin/sh"
echo "exec $SCCACHE $(which $compiler) \"\$@\""

This comment was marked as off-topic.

}

# This will be removed after merging an upcoming PR.
install_hcrng() {

This comment was marked as off-topic.

This comment was marked as off-topic.

fi

install_hip_thrust
install_hcrng

This comment was marked as off-topic.


# Build image
docker build \
docker build $(if [[ "$image" == *rocm* ]]; then echo "--memory-swap -1"; fi) \

This comment was marked as off-topic.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jorghi12 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ezyang
Copy link
Contributor

ezyang commented Jul 30, 2018

@pytorchbot retest this please

@ezyang
Copy link
Contributor

ezyang commented Jul 30, 2018

Can we merge this?

@ailzhang ailzhang added the ready for review (this tag is deprecated) All PRs are ready for review unless they are draft, WIP, or have undismissed requested changes label Jul 31, 2018
@ezyang
Copy link
Contributor

ezyang commented Aug 1, 2018

This must be landed with an update to the Docker images.

@yf225
Copy link
Contributor

yf225 commented Aug 21, 2018

@Jorghi12 Is there a new status on this one?

@ezyang
Copy link
Contributor

ezyang commented Oct 11, 2018

This diff is abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open source ready for review (this tag is deprecated) All PRs are ready for review unless they are draft, WIP, or have undismissed requested changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants