diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 725a01cb472..dc9ac70a0c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -234,3 +234,27 @@ If you are working on the CUDA code, here are some useful CUDA debugging tips: Hope this helps, and thanks for considering to contribute. + +## Caffe2 notes + +In 2018, we merged Caffe2 into the PyTorch source repository. While the +steady state aspiration is that Caffe2 and PyTorch share code freely, +in the meantime there will be some separation. + +If you submit a PR to only PyTorch or only Caffe2 code, CI will only +run for the project you edited. The logic for this is implemented +in `.jenkins/pytorch/dirty.sh` and `.jenkins/caffe2/dirty.sh`; you +can look at this to see what path prefixes constitute changes. +This also means if you ADD a new top-level path, or you start +sharing code between projects, you need to modify these files. + +There are a few "unusual" directories which, for historical reasons, +are Caffe2/PyTorch specific. Here they are: + +- `CMakeLists.txt`, `Makefile`, `binaries`, `cmake`, `conda`, `modules`, + `scripts` are Caffe2-specific. Don't put PyTorch code in them without + extra coordination. + +- `mypy*`, `requirements.txt`, `setup.py`, `test`, `tools` are + PyTorch-specific. Don't put Caffe2 code in them without extra + coordination.