-
Notifications
You must be signed in to change notification settings - Fork 0
PyTorch Basics
Please see Developer Environment Setup
For fb employees, please read through this as well.
Run through the PyTorch Basics tutorial
If you're not familiar with machine learning, here is a nice lecture series.
- Watch a high-level overview of PyTorch by Joe Spisak
- Take a look at PyTorch tutorials
- Take a look at PyTorch examples
Explore popular open-source models and frameworks using PyTorch
If you don't need CUDA, build using USE_CUDA=0
: the build is significantly faster. There are also a lot of other build flags that help get rid of components that you might not work on. Below is an opinionated build command that gets rid of a lot of different options that don't get used very often.
USE_KINETO=0 BUILD_CAFFE2=0 USE_DISTRIBUTED=0 USE_NCCL=0 BUILD_TEST=0 USE_XNNPACK=0 USE_FBGEMM=0 USE_QNNPACK=0 USE_MKLDNN=0 USE_MIOPEN=0 USE_NNPACK=0 BUILD_CAFFE2_OPS=0 USE_TENSORPIPE=0 python setup.py develop
(See this for more details)
The head of the pytorch/pytorch master branch may have test failures (see here for the current state). When developing PyTorch, instead of branching off of master
, you can branch off of viable/strict
. viable/strict
is a branch that lags behind master and guarantees that all PyTorch tests are passing on the branch. Basing your work off of viable/strict
gives you confidence that any test failures are actually your code's fault.
Some quick git tips:
# Creating a new feature branch off of viable/strict
git checkout viable/strict
git checkout -b my_new_feature
# Rebasing your work to appear on top of viable/strict, assuming upstream points to pytorch/pytorch.
# (Some people develop with origin pointing to pytorch/pytorch)
git pull --rebase upstream viable/strict
See this detailed section in our CONTRIBUTING.MD
Please see https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md and the GitHub First user guide.
For fb employees, feel free to check out instructions for our old workflow of landing internally.
PyTorch presented to you with love by the PyTorch Team of contributors
- Install Prerequisites and Dependencies
- Fork, clone, and checkout the PyTorch source
- Build PyTorch from source
- Tips for developing PyTorch
- PyTorch Workflow Git cheatsheet
- Overview of the Pull Request Lifecycle
- Finding Or Creating Issues
- Pre Commit Checks
- Create a Pull Request
- Typical Pull Request Workflow
- Pull Request FAQs
- Getting Help
- Codebase structure
- Tensors, Operators, and Testing
- Autograd
- Dispatcher, Structured Kernels, and Codegen
- torch.nn
- CUDA basics
- Data (Optional)
- function transforms (Optional)