Any tips for speeding up the source build process?

Hi, I would like to make some modification to the PyTorch source code for my research.

The problem is, it takes 15~20min to build the whole source code on my 32-core machine. This is annoying when I make small changes in the C++ code and see the effect.

I wonder how the other developers deal with such long build time.
Are there any tips to minimize the build process?

After a full rebuild python setup.py develop should only build all changed files and modules depending on it. This section of the contributing guide has more tips such as using ccache etc.