How to run pytorch-based project with pytorch source code

I means, if I want be a developer of pytorch or customize the pytorch, what is the best practise?

Have a look at the contributing page.
Make sure to follow the build instructions there to avoid rebuilding Pytorch every time you change something.