From 2da2b5c08171fa6ea8b49a76fa5069eb4f1f90d7 Mon Sep 17 00:00:00 2001 From: Cloud Han Date: Tue, 21 Jul 2020 09:41:23 -0700 Subject: [PATCH] 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 --- CONTRIBUTING.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4419f4d8683..3f67f20328f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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