update CONTRIBUTING.md for ccache (#41619)

Summary:
ccache now use cmake for building, update installation script.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/41619

Reviewed By: zhangguanheng66

Differential Revision: D22644594

Pulled By: malfet

fbshipit-source-id: f894dd408822231f8aab36efbce188f06f004057
This commit is contained in:
Cloud Han 2020-07-21 09:41:23 -07:00 committed by Facebook GitHub Bot
parent 523f80e894
commit 2da2b5c081

View file

@ -37,12 +37,12 @@
## Contributing to PyTorch
Thank you for your interest in contributing to PyTorch! Before you begin writing code, it is important
Thank you for your interest in contributing to PyTorch! Before you begin writing code, it is important
that you share your intention to contribute with the team, based on the type of contribution:
1. You want to propose a new feature and implement it.
- Post about your intended feature in an [issue](https://github.com/pytorch/pytorch/issues),
and we shall discuss the design and implementation. Once we agree that the plan looks good,
- Post about your intended feature in an [issue](https://github.com/pytorch/pytorch/issues),
and we shall discuss the design and implementation. Once we agree that the plan looks good,
go ahead and implement it.
2. You want to implement a feature or bug-fix for an outstanding issue.
- Search for your issue in the [PyTorch issue list](https://github.com/pytorch/pytorch/issues).
@ -508,23 +508,24 @@ In the PyTorch project, currently only the latter method of masquerading as
the compiler via symlinks works for CUDA compilation.
Here are the instructions for installing ccache from source (tested at commit
`7abac8f` of the `ccache` repo):
`3c302a7` of the `ccache` repo):
```bash
# install and export ccache
#!/bin/bash
if ! ls ~/ccache/bin/ccache
then
set -ex
sudo apt-get update
sudo apt-get install -y automake autoconf
sudo apt-get install -y asciidoc
sudo apt-get install -y cmake
mkdir -p ~/ccache
pushd /tmp
pushd ~/ccache
rm -rf ccache
git clone https://github.com/ccache/ccache.git
pushd ccache
./autogen.sh
./configure
make install prefix=~/ccache
mkdir -p ccache/build
pushd ccache/build
cmake -DCMAKE_INSTALL_PREFIX=${HOME}/ccache -DENABLE_TESTING=OFF -DZSTD_FROM_INTERNET=ON ..
make -j$(nproc) install
popd
popd