1*da0073e9SAndroid Build Coastguard Worker 2*da0073e9SAndroid Build Coastguard Worker 3*da0073e9SAndroid Build Coastguard Worker-------------------------------------------------------------------------------- 4*da0073e9SAndroid Build Coastguard Worker 5*da0073e9SAndroid Build Coastguard WorkerPyTorch is a Python package that provides two high-level features: 6*da0073e9SAndroid Build Coastguard Worker- Tensor computation (like NumPy) with strong GPU acceleration 7*da0073e9SAndroid Build Coastguard Worker- Deep neural networks built on a tape-based autograd system 8*da0073e9SAndroid Build Coastguard Worker 9*da0073e9SAndroid Build Coastguard WorkerYou can reuse your favorite Python packages such as NumPy, SciPy, and Cython to extend PyTorch when needed. 10*da0073e9SAndroid Build Coastguard Worker 11*da0073e9SAndroid Build Coastguard WorkerOur trunk health (Continuous Integration signals) can be found at [hud.pytorch.org](https://hud.pytorch.org/ci/pytorch/pytorch/main). 12*da0073e9SAndroid Build Coastguard Worker 13*da0073e9SAndroid Build Coastguard Worker<!-- toc --> 14*da0073e9SAndroid Build Coastguard Worker 15*da0073e9SAndroid Build Coastguard Worker- [More About PyTorch](#more-about-pytorch) 16*da0073e9SAndroid Build Coastguard Worker - [A GPU-Ready Tensor Library](#a-gpu-ready-tensor-library) 17*da0073e9SAndroid Build Coastguard Worker - [Dynamic Neural Networks: Tape-Based Autograd](#dynamic-neural-networks-tape-based-autograd) 18*da0073e9SAndroid Build Coastguard Worker - [Python First](#python-first) 19*da0073e9SAndroid Build Coastguard Worker - [Imperative Experiences](#imperative-experiences) 20*da0073e9SAndroid Build Coastguard Worker - [Fast and Lean](#fast-and-lean) 21*da0073e9SAndroid Build Coastguard Worker - [Extensions Without Pain](#extensions-without-pain) 22*da0073e9SAndroid Build Coastguard Worker- [Installation](#installation) 23*da0073e9SAndroid Build Coastguard Worker - [Binaries](#binaries) 24*da0073e9SAndroid Build Coastguard Worker - [NVIDIA Jetson Platforms](#nvidia-jetson-platforms) 25*da0073e9SAndroid Build Coastguard Worker - [From Source](#from-source) 26*da0073e9SAndroid Build Coastguard Worker - [Prerequisites](#prerequisites) 27*da0073e9SAndroid Build Coastguard Worker - [NVIDIA CUDA Support](#nvidia-cuda-support) 28*da0073e9SAndroid Build Coastguard Worker - [AMD ROCm Support](#amd-rocm-support) 29*da0073e9SAndroid Build Coastguard Worker - [Intel GPU Support](#intel-gpu-support) 30*da0073e9SAndroid Build Coastguard Worker - [Get the PyTorch Source](#get-the-pytorch-source) 31*da0073e9SAndroid Build Coastguard Worker - [Install Dependencies](#install-dependencies) 32*da0073e9SAndroid Build Coastguard Worker - [Install PyTorch](#install-pytorch) 33*da0073e9SAndroid Build Coastguard Worker - [Adjust Build Options (Optional)](#adjust-build-options-optional) 34*da0073e9SAndroid Build Coastguard Worker - [Docker Image](#docker-image) 35*da0073e9SAndroid Build Coastguard Worker - [Using pre-built images](#using-pre-built-images) 36*da0073e9SAndroid Build Coastguard Worker - [Building the image yourself](#building-the-image-yourself) 37*da0073e9SAndroid Build Coastguard Worker - [Building the Documentation](#building-the-documentation) 38*da0073e9SAndroid Build Coastguard Worker - [Previous Versions](#previous-versions) 39*da0073e9SAndroid Build Coastguard Worker- [Getting Started](#getting-started) 40*da0073e9SAndroid Build Coastguard Worker- [Resources](#resources) 41*da0073e9SAndroid Build Coastguard Worker- [Communication](#communication) 42*da0073e9SAndroid Build Coastguard Worker- [Releases and Contributing](#releases-and-contributing) 43*da0073e9SAndroid Build Coastguard Worker- [The Team](#the-team) 44*da0073e9SAndroid Build Coastguard Worker- [License](#license) 45*da0073e9SAndroid Build Coastguard Worker 46*da0073e9SAndroid Build Coastguard Worker<!-- tocstop --> 47*da0073e9SAndroid Build Coastguard Worker 48*da0073e9SAndroid Build Coastguard Worker## More About PyTorch 49*da0073e9SAndroid Build Coastguard Worker 50*da0073e9SAndroid Build Coastguard Worker[Learn the basics of PyTorch](https://pytorch.org/tutorials/beginner/basics/intro.html) 51*da0073e9SAndroid Build Coastguard Worker 52*da0073e9SAndroid Build Coastguard WorkerAt a granular level, PyTorch is a library that consists of the following components: 53*da0073e9SAndroid Build Coastguard Worker 54*da0073e9SAndroid Build Coastguard Worker| Component | Description | 55*da0073e9SAndroid Build Coastguard Worker| ---- | --- | 56*da0073e9SAndroid Build Coastguard Worker| [**torch**](https://pytorch.org/docs/stable/torch.html) | A Tensor library like NumPy, with strong GPU support | 57*da0073e9SAndroid Build Coastguard Worker| [**torch.autograd**](https://pytorch.org/docs/stable/autograd.html) | A tape-based automatic differentiation library that supports all differentiable Tensor operations in torch | 58*da0073e9SAndroid Build Coastguard Worker| [**torch.jit**](https://pytorch.org/docs/stable/jit.html) | A compilation stack (TorchScript) to create serializable and optimizable models from PyTorch code | 59*da0073e9SAndroid Build Coastguard Worker| [**torch.nn**](https://pytorch.org/docs/stable/nn.html) | A neural networks library deeply integrated with autograd designed for maximum flexibility | 60*da0073e9SAndroid Build Coastguard Worker| [**torch.multiprocessing**](https://pytorch.org/docs/stable/multiprocessing.html) | Python multiprocessing, but with magical memory sharing of torch Tensors across processes. Useful for data loading and Hogwild training | 61*da0073e9SAndroid Build Coastguard Worker| [**torch.utils**](https://pytorch.org/docs/stable/data.html) | DataLoader and other utility functions for convenience | 62*da0073e9SAndroid Build Coastguard Worker 63*da0073e9SAndroid Build Coastguard WorkerUsually, PyTorch is used either as: 64*da0073e9SAndroid Build Coastguard Worker 65*da0073e9SAndroid Build Coastguard Worker- A replacement for NumPy to use the power of GPUs. 66*da0073e9SAndroid Build Coastguard Worker- A deep learning research platform that provides maximum flexibility and speed. 67*da0073e9SAndroid Build Coastguard Worker 68*da0073e9SAndroid Build Coastguard WorkerElaborating Further: 69*da0073e9SAndroid Build Coastguard Worker 70*da0073e9SAndroid Build Coastguard Worker### A GPU-Ready Tensor Library 71*da0073e9SAndroid Build Coastguard Worker 72*da0073e9SAndroid Build Coastguard WorkerIf you use NumPy, then you have used Tensors (a.k.a. ndarray). 73*da0073e9SAndroid Build Coastguard Worker 74*da0073e9SAndroid Build Coastguard Worker 75*da0073e9SAndroid Build Coastguard Worker 76*da0073e9SAndroid Build Coastguard WorkerPyTorch provides Tensors that can live either on the CPU or the GPU and accelerates the 77*da0073e9SAndroid Build Coastguard Workercomputation by a huge amount. 78*da0073e9SAndroid Build Coastguard Worker 79*da0073e9SAndroid Build Coastguard WorkerWe provide a wide variety of tensor routines to accelerate and fit your scientific computation needs 80*da0073e9SAndroid Build Coastguard Workersuch as slicing, indexing, mathematical operations, linear algebra, reductions. 81*da0073e9SAndroid Build Coastguard WorkerAnd they are fast! 82*da0073e9SAndroid Build Coastguard Worker 83*da0073e9SAndroid Build Coastguard Worker### Dynamic Neural Networks: Tape-Based Autograd 84*da0073e9SAndroid Build Coastguard Worker 85*da0073e9SAndroid Build Coastguard WorkerPyTorch has a unique way of building neural networks: using and replaying a tape recorder. 86*da0073e9SAndroid Build Coastguard Worker 87*da0073e9SAndroid Build Coastguard WorkerMost frameworks such as TensorFlow, Theano, Caffe, and CNTK have a static view of the world. 88*da0073e9SAndroid Build Coastguard WorkerOne has to build a neural network and reuse the same structure again and again. 89*da0073e9SAndroid Build Coastguard WorkerChanging the way the network behaves means that one has to start from scratch. 90*da0073e9SAndroid Build Coastguard Worker 91*da0073e9SAndroid Build Coastguard WorkerWith PyTorch, we use a technique called reverse-mode auto-differentiation, which allows you to 92*da0073e9SAndroid Build Coastguard Workerchange the way your network behaves arbitrarily with zero lag or overhead. Our inspiration comes 93*da0073e9SAndroid Build Coastguard Workerfrom several research papers on this topic, as well as current and past work such as 94*da0073e9SAndroid Build Coastguard Worker[torch-autograd](https://github.com/twitter/torch-autograd), 95*da0073e9SAndroid Build Coastguard Worker[autograd](https://github.com/HIPS/autograd), 96*da0073e9SAndroid Build Coastguard Worker[Chainer](https://chainer.org), etc. 97*da0073e9SAndroid Build Coastguard Worker 98*da0073e9SAndroid Build Coastguard WorkerWhile this technique is not unique to PyTorch, it's one of the fastest implementations of it to date. 99*da0073e9SAndroid Build Coastguard WorkerYou get the best of speed and flexibility for your crazy research. 100*da0073e9SAndroid Build Coastguard Worker 101*da0073e9SAndroid Build Coastguard Worker 102*da0073e9SAndroid Build Coastguard Worker 103*da0073e9SAndroid Build Coastguard Worker### Python First 104*da0073e9SAndroid Build Coastguard Worker 105*da0073e9SAndroid Build Coastguard WorkerPyTorch is not a Python binding into a monolithic C++ framework. 106*da0073e9SAndroid Build Coastguard WorkerIt is built to be deeply integrated into Python. 107*da0073e9SAndroid Build Coastguard WorkerYou can use it naturally like you would use [NumPy](https://www.numpy.org/) / [SciPy](https://www.scipy.org/) / [scikit-learn](https://scikit-learn.org) etc. 108*da0073e9SAndroid Build Coastguard WorkerYou can write your new neural network layers in Python itself, using your favorite libraries 109*da0073e9SAndroid Build Coastguard Workerand use packages such as [Cython](https://cython.org/) and [Numba](http://numba.pydata.org/). 110*da0073e9SAndroid Build Coastguard WorkerOur goal is to not reinvent the wheel where appropriate. 111*da0073e9SAndroid Build Coastguard Worker 112*da0073e9SAndroid Build Coastguard Worker### Imperative Experiences 113*da0073e9SAndroid Build Coastguard Worker 114*da0073e9SAndroid Build Coastguard WorkerPyTorch is designed to be intuitive, linear in thought, and easy to use. 115*da0073e9SAndroid Build Coastguard WorkerWhen you execute a line of code, it gets executed. There isn't an asynchronous view of the world. 116*da0073e9SAndroid Build Coastguard WorkerWhen you drop into a debugger or receive error messages and stack traces, understanding them is straightforward. 117*da0073e9SAndroid Build Coastguard WorkerThe stack trace points to exactly where your code was defined. 118*da0073e9SAndroid Build Coastguard WorkerWe hope you never spend hours debugging your code because of bad stack traces or asynchronous and opaque execution engines. 119*da0073e9SAndroid Build Coastguard Worker 120*da0073e9SAndroid Build Coastguard Worker### Fast and Lean 121*da0073e9SAndroid Build Coastguard Worker 122*da0073e9SAndroid Build Coastguard WorkerPyTorch has minimal framework overhead. We integrate acceleration libraries 123*da0073e9SAndroid Build Coastguard Workersuch as [Intel MKL](https://software.intel.com/mkl) and NVIDIA ([cuDNN](https://developer.nvidia.com/cudnn), [NCCL](https://developer.nvidia.com/nccl)) to maximize speed. 124*da0073e9SAndroid Build Coastguard WorkerAt the core, its CPU and GPU Tensor and neural network backends 125*da0073e9SAndroid Build Coastguard Workerare mature and have been tested for years. 126*da0073e9SAndroid Build Coastguard Worker 127*da0073e9SAndroid Build Coastguard WorkerHence, PyTorch is quite fast — whether you run small or large neural networks. 128*da0073e9SAndroid Build Coastguard Worker 129*da0073e9SAndroid Build Coastguard WorkerThe memory usage in PyTorch is extremely efficient compared to Torch or some of the alternatives. 130*da0073e9SAndroid Build Coastguard WorkerWe've written custom memory allocators for the GPU to make sure that 131*da0073e9SAndroid Build Coastguard Workeryour deep learning models are maximally memory efficient. 132*da0073e9SAndroid Build Coastguard WorkerThis enables you to train bigger deep learning models than before. 133*da0073e9SAndroid Build Coastguard Worker 134*da0073e9SAndroid Build Coastguard Worker### Extensions Without Pain 135*da0073e9SAndroid Build Coastguard Worker 136*da0073e9SAndroid Build Coastguard WorkerWriting new neural network modules, or interfacing with PyTorch's Tensor API was designed to be straightforward 137*da0073e9SAndroid Build Coastguard Workerand with minimal abstractions. 138*da0073e9SAndroid Build Coastguard Worker 139*da0073e9SAndroid Build Coastguard WorkerYou can write new neural network layers in Python using the torch API 140*da0073e9SAndroid Build Coastguard Worker[or your favorite NumPy-based libraries such as SciPy](https://pytorch.org/tutorials/advanced/numpy_extensions_tutorial.html). 141*da0073e9SAndroid Build Coastguard Worker 142*da0073e9SAndroid Build Coastguard WorkerIf you want to write your layers in C/C++, we provide a convenient extension API that is efficient and with minimal boilerplate. 143*da0073e9SAndroid Build Coastguard WorkerNo wrapper code needs to be written. You can see [a tutorial here](https://pytorch.org/tutorials/advanced/cpp_extension.html) and [an example here](https://github.com/pytorch/extension-cpp). 144*da0073e9SAndroid Build Coastguard Worker 145*da0073e9SAndroid Build Coastguard Worker 146*da0073e9SAndroid Build Coastguard Worker## Installation 147*da0073e9SAndroid Build Coastguard Worker 148*da0073e9SAndroid Build Coastguard Worker### Binaries 149*da0073e9SAndroid Build Coastguard WorkerCommands to install binaries via Conda or pip wheels are on our website: [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/) 150*da0073e9SAndroid Build Coastguard Worker 151*da0073e9SAndroid Build Coastguard Worker 152*da0073e9SAndroid Build Coastguard Worker#### NVIDIA Jetson Platforms 153*da0073e9SAndroid Build Coastguard Worker 154*da0073e9SAndroid Build Coastguard WorkerPython wheels for NVIDIA's Jetson Nano, Jetson TX1/TX2, Jetson Xavier NX/AGX, and Jetson AGX Orin are provided [here](https://forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-10-now-available/72048) and the L4T container is published [here](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch) 155*da0073e9SAndroid Build Coastguard Worker 156*da0073e9SAndroid Build Coastguard WorkerThey require JetPack 4.2 and above, and [@dusty-nv](https://github.com/dusty-nv) and [@ptrblck](https://github.com/ptrblck) are maintaining them. 157*da0073e9SAndroid Build Coastguard Worker 158*da0073e9SAndroid Build Coastguard Worker 159*da0073e9SAndroid Build Coastguard Worker### From Source 160*da0073e9SAndroid Build Coastguard Worker 161*da0073e9SAndroid Build Coastguard Worker#### Prerequisites 162*da0073e9SAndroid Build Coastguard WorkerIf you are installing from source, you will need: 163*da0073e9SAndroid Build Coastguard Worker- Python 3.8 or later (for Linux, Python 3.8.1+ is needed) 164*da0073e9SAndroid Build Coastguard Worker- A compiler that fully supports C++17, such as clang or gcc (gcc 9.4.0 or newer is required, on Linux) 165*da0073e9SAndroid Build Coastguard Worker- Visual Studio or Visual Studio Build Tool on Windows 166*da0073e9SAndroid Build Coastguard Worker 167*da0073e9SAndroid Build Coastguard Worker\* PyTorch CI uses Visual C++ BuildTools, which come with Visual Studio Enterprise, 168*da0073e9SAndroid Build Coastguard WorkerProfessional, or Community Editions. You can also install the build tools from 169*da0073e9SAndroid Build Coastguard Workerhttps://visualstudio.microsoft.com/visual-cpp-build-tools/. The build tools *do not* 170*da0073e9SAndroid Build Coastguard Workercome with Visual Studio Code by default. 171*da0073e9SAndroid Build Coastguard Worker 172*da0073e9SAndroid Build Coastguard Worker\* We highly recommend installing an [Anaconda](https://www.anaconda.com/download) environment. You will get a high-quality BLAS library (MKL) and you get controlled dependency versions regardless of your Linux distro. 173*da0073e9SAndroid Build Coastguard Worker 174*da0073e9SAndroid Build Coastguard WorkerAn example of environment setup is shown below: 175*da0073e9SAndroid Build Coastguard Worker 176*da0073e9SAndroid Build Coastguard Worker* Linux: 177*da0073e9SAndroid Build Coastguard Worker 178*da0073e9SAndroid Build Coastguard Worker```bash 179*da0073e9SAndroid Build Coastguard Worker$ source <CONDA_INSTALL_DIR>/bin/activate 180*da0073e9SAndroid Build Coastguard Worker$ conda create -y -n <CONDA_NAME> 181*da0073e9SAndroid Build Coastguard Worker$ conda activate <CONDA_NAME> 182*da0073e9SAndroid Build Coastguard Worker``` 183*da0073e9SAndroid Build Coastguard Worker 184*da0073e9SAndroid Build Coastguard Worker* Windows: 185*da0073e9SAndroid Build Coastguard Worker 186*da0073e9SAndroid Build Coastguard Worker```bash 187*da0073e9SAndroid Build Coastguard Worker$ source <CONDA_INSTALL_DIR>\Scripts\activate.bat 188*da0073e9SAndroid Build Coastguard Worker$ conda create -y -n <CONDA_NAME> 189*da0073e9SAndroid Build Coastguard Worker$ conda activate <CONDA_NAME> 190*da0073e9SAndroid Build Coastguard Worker$ call "C:\Program Files\Microsoft Visual Studio\<VERSION>\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 191*da0073e9SAndroid Build Coastguard Worker``` 192*da0073e9SAndroid Build Coastguard Worker 193*da0073e9SAndroid Build Coastguard Worker##### NVIDIA CUDA Support 194*da0073e9SAndroid Build Coastguard WorkerIf you want to compile with CUDA support, [select a supported version of CUDA from our support matrix](https://pytorch.org/get-started/locally/), then install the following: 195*da0073e9SAndroid Build Coastguard Worker- [NVIDIA CUDA](https://developer.nvidia.com/cuda-downloads) 196*da0073e9SAndroid Build Coastguard Worker- [NVIDIA cuDNN](https://developer.nvidia.com/cudnn) v8.5 or above 197*da0073e9SAndroid Build Coastguard Worker- [Compiler](https://gist.github.com/ax3l/9489132) compatible with CUDA 198*da0073e9SAndroid Build Coastguard Worker 199*da0073e9SAndroid Build Coastguard WorkerNote: You could refer to the [cuDNN Support Matrix](https://docs.nvidia.com/deeplearning/cudnn/reference/support-matrix.html) for cuDNN versions with the various supported CUDA, CUDA driver and NVIDIA hardware 200*da0073e9SAndroid Build Coastguard Worker 201*da0073e9SAndroid Build Coastguard WorkerIf you want to disable CUDA support, export the environment variable `USE_CUDA=0`. 202*da0073e9SAndroid Build Coastguard WorkerOther potentially useful environment variables may be found in `setup.py`. 203*da0073e9SAndroid Build Coastguard Worker 204*da0073e9SAndroid Build Coastguard WorkerIf you are building for NVIDIA's Jetson platforms (Jetson Nano, TX1, TX2, AGX Xavier), Instructions to install PyTorch for Jetson Nano are [available here](https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/) 205*da0073e9SAndroid Build Coastguard Worker 206*da0073e9SAndroid Build Coastguard Worker##### AMD ROCm Support 207*da0073e9SAndroid Build Coastguard WorkerIf you want to compile with ROCm support, install 208*da0073e9SAndroid Build Coastguard Worker- [AMD ROCm](https://rocm.docs.amd.com/en/latest/deploy/linux/quick_start.html) 4.0 and above installation 209*da0073e9SAndroid Build Coastguard Worker- ROCm is currently supported only for Linux systems. 210*da0073e9SAndroid Build Coastguard Worker 211*da0073e9SAndroid Build Coastguard WorkerIf you want to disable ROCm support, export the environment variable `USE_ROCM=0`. 212*da0073e9SAndroid Build Coastguard WorkerOther potentially useful environment variables may be found in `setup.py`. 213*da0073e9SAndroid Build Coastguard Worker 214*da0073e9SAndroid Build Coastguard Worker##### Intel GPU Support 215*da0073e9SAndroid Build Coastguard WorkerIf you want to compile with Intel GPU support, follow these 216*da0073e9SAndroid Build Coastguard Worker- [PyTorch Prerequisites for Intel GPUs](https://www.intel.com/content/www/us/en/developer/articles/tool/pytorch-prerequisites-for-intel-gpus.html) instructions. 217*da0073e9SAndroid Build Coastguard Worker- Intel GPU is supported for Linux and Windows. 218*da0073e9SAndroid Build Coastguard Worker 219*da0073e9SAndroid Build Coastguard WorkerIf you want to disable Intel GPU support, export the environment variable `USE_XPU=0`. 220*da0073e9SAndroid Build Coastguard WorkerOther potentially useful environment variables may be found in `setup.py`. 221*da0073e9SAndroid Build Coastguard Worker 222*da0073e9SAndroid Build Coastguard Worker#### Get the PyTorch Source 223*da0073e9SAndroid Build Coastguard Worker```bash 224*da0073e9SAndroid Build Coastguard Workergit clone --recursive https://github.com/pytorch/pytorch 225*da0073e9SAndroid Build Coastguard Workercd pytorch 226*da0073e9SAndroid Build Coastguard Worker# if you are updating an existing checkout 227*da0073e9SAndroid Build Coastguard Workergit submodule sync 228*da0073e9SAndroid Build Coastguard Workergit submodule update --init --recursive 229*da0073e9SAndroid Build Coastguard Worker``` 230*da0073e9SAndroid Build Coastguard Worker 231*da0073e9SAndroid Build Coastguard Worker#### Install Dependencies 232*da0073e9SAndroid Build Coastguard Worker 233*da0073e9SAndroid Build Coastguard Worker**Common** 234*da0073e9SAndroid Build Coastguard Worker 235*da0073e9SAndroid Build Coastguard Worker```bash 236*da0073e9SAndroid Build Coastguard Workerconda install cmake ninja 237*da0073e9SAndroid Build Coastguard Worker# Run this command on native Windows 238*da0073e9SAndroid Build Coastguard Workerconda install rust 239*da0073e9SAndroid Build Coastguard Worker# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section below 240*da0073e9SAndroid Build Coastguard Workerpip install -r requirements.txt 241*da0073e9SAndroid Build Coastguard Worker``` 242*da0073e9SAndroid Build Coastguard Worker 243*da0073e9SAndroid Build Coastguard Worker**On Linux** 244*da0073e9SAndroid Build Coastguard Worker 245*da0073e9SAndroid Build Coastguard Worker```bash 246*da0073e9SAndroid Build Coastguard Workerpip install mkl-static mkl-include 247*da0073e9SAndroid Build Coastguard Worker# CUDA only: Add LAPACK support for the GPU if needed 248*da0073e9SAndroid Build Coastguard Workerconda install -c pytorch magma-cuda121 # or the magma-cuda* that matches your CUDA version from https://anaconda.org/pytorch/repo 249*da0073e9SAndroid Build Coastguard Worker 250*da0073e9SAndroid Build Coastguard Worker# (optional) If using torch.compile with inductor/triton, install the matching version of triton 251*da0073e9SAndroid Build Coastguard Worker# Run from the pytorch directory after cloning 252*da0073e9SAndroid Build Coastguard Worker# For Intel GPU support, please explicitly `export USE_XPU=1` before running command. 253*da0073e9SAndroid Build Coastguard Workermake triton 254*da0073e9SAndroid Build Coastguard Worker``` 255*da0073e9SAndroid Build Coastguard Worker 256*da0073e9SAndroid Build Coastguard Worker**On MacOS** 257*da0073e9SAndroid Build Coastguard Worker 258*da0073e9SAndroid Build Coastguard Worker```bash 259*da0073e9SAndroid Build Coastguard Worker# Add this package on intel x86 processor machines only 260*da0073e9SAndroid Build Coastguard Workerpip install mkl-static mkl-include 261*da0073e9SAndroid Build Coastguard Worker# Add these packages if torch.distributed is needed 262*da0073e9SAndroid Build Coastguard Workerconda install pkg-config libuv 263*da0073e9SAndroid Build Coastguard Worker``` 264*da0073e9SAndroid Build Coastguard Worker 265*da0073e9SAndroid Build Coastguard Worker**On Windows** 266*da0073e9SAndroid Build Coastguard Worker 267*da0073e9SAndroid Build Coastguard Worker```bash 268*da0073e9SAndroid Build Coastguard Workerpip install mkl-static mkl-include 269*da0073e9SAndroid Build Coastguard Worker# Add these packages if torch.distributed is needed. 270*da0073e9SAndroid Build Coastguard Worker# Distributed package support on Windows is a prototype feature and is subject to changes. 271*da0073e9SAndroid Build Coastguard Workerconda install -c conda-forge libuv=1.39 272*da0073e9SAndroid Build Coastguard Worker``` 273*da0073e9SAndroid Build Coastguard Worker 274*da0073e9SAndroid Build Coastguard Worker#### Install PyTorch 275*da0073e9SAndroid Build Coastguard Worker**On Linux** 276*da0073e9SAndroid Build Coastguard Worker 277*da0073e9SAndroid Build Coastguard WorkerIf you would like to compile PyTorch with [new C++ ABI](https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html) enabled, then first run this command: 278*da0073e9SAndroid Build Coastguard Worker```bash 279*da0073e9SAndroid Build Coastguard Workerexport _GLIBCXX_USE_CXX11_ABI=1 280*da0073e9SAndroid Build Coastguard Worker``` 281*da0073e9SAndroid Build Coastguard Worker 282*da0073e9SAndroid Build Coastguard WorkerPlease **note** that starting from PyTorch 2.5, the PyTorch build with XPU supports both new and old C++ ABIs. Previously, XPU only supported the new C++ ABI. If you want to compile with Intel GPU support, please follow [Intel GPU Support](#intel-gpu-support). 283*da0073e9SAndroid Build Coastguard Worker 284*da0073e9SAndroid Build Coastguard WorkerIf you're compiling for AMD ROCm then first run this command: 285*da0073e9SAndroid Build Coastguard Worker```bash 286*da0073e9SAndroid Build Coastguard Worker# Only run this if you're compiling for ROCm 287*da0073e9SAndroid Build Coastguard Workerpython tools/amd_build/build_amd.py 288*da0073e9SAndroid Build Coastguard Worker``` 289*da0073e9SAndroid Build Coastguard Worker 290*da0073e9SAndroid Build Coastguard WorkerInstall PyTorch 291*da0073e9SAndroid Build Coastguard Worker```bash 292*da0073e9SAndroid Build Coastguard Workerexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} 293*da0073e9SAndroid Build Coastguard Workerpython setup.py develop 294*da0073e9SAndroid Build Coastguard Worker``` 295*da0073e9SAndroid Build Coastguard Worker 296*da0073e9SAndroid Build Coastguard Worker> _Aside:_ If you are using [Anaconda](https://www.anaconda.com/distribution/#download-section), you may experience an error caused by the linker: 297*da0073e9SAndroid Build Coastguard Worker> 298*da0073e9SAndroid Build Coastguard Worker> ```plaintext 299*da0073e9SAndroid Build Coastguard Worker> build/temp.linux-x86_64-3.7/torch/csrc/stub.o: file not recognized: file format not recognized 300*da0073e9SAndroid Build Coastguard Worker> collect2: error: ld returned 1 exit status 301*da0073e9SAndroid Build Coastguard Worker> error: command 'g++' failed with exit status 1 302*da0073e9SAndroid Build Coastguard Worker> ``` 303*da0073e9SAndroid Build Coastguard Worker> 304*da0073e9SAndroid Build Coastguard Worker> This is caused by `ld` from the Conda environment shadowing the system `ld`. You should use a newer version of Python that fixes this issue. The recommended Python version is 3.8.1+. 305*da0073e9SAndroid Build Coastguard Worker 306*da0073e9SAndroid Build Coastguard Worker**On macOS** 307*da0073e9SAndroid Build Coastguard Worker 308*da0073e9SAndroid Build Coastguard Worker```bash 309*da0073e9SAndroid Build Coastguard Workerpython3 setup.py develop 310*da0073e9SAndroid Build Coastguard Worker``` 311*da0073e9SAndroid Build Coastguard Worker 312*da0073e9SAndroid Build Coastguard Worker**On Windows** 313*da0073e9SAndroid Build Coastguard Worker 314*da0073e9SAndroid Build Coastguard WorkerIf you want to build legacy python code, please refer to [Building on legacy code and CUDA](https://github.com/pytorch/pytorch/blob/main/CONTRIBUTING.md#building-on-legacy-code-and-cuda) 315*da0073e9SAndroid Build Coastguard Worker 316*da0073e9SAndroid Build Coastguard Worker**CPU-only builds** 317*da0073e9SAndroid Build Coastguard Worker 318*da0073e9SAndroid Build Coastguard WorkerIn this mode PyTorch computations will run on your CPU, not your GPU 319*da0073e9SAndroid Build Coastguard Worker 320*da0073e9SAndroid Build Coastguard Worker```cmd 321*da0073e9SAndroid Build Coastguard Workerpython setup.py develop 322*da0073e9SAndroid Build Coastguard Worker``` 323*da0073e9SAndroid Build Coastguard Worker 324*da0073e9SAndroid Build Coastguard WorkerNote on OpenMP: The desired OpenMP implementation is Intel OpenMP (iomp). In order to link against iomp, you'll need to manually download the library and set up the building environment by tweaking `CMAKE_INCLUDE_PATH` and `LIB`. The instruction [here](https://github.com/pytorch/pytorch/blob/main/docs/source/notes/windows.rst#building-from-source) is an example for setting up both MKL and Intel OpenMP. Without these configurations for CMake, Microsoft Visual C OpenMP runtime (vcomp) will be used. 325*da0073e9SAndroid Build Coastguard Worker 326*da0073e9SAndroid Build Coastguard Worker**CUDA based build** 327*da0073e9SAndroid Build Coastguard Worker 328*da0073e9SAndroid Build Coastguard WorkerIn this mode PyTorch computations will leverage your GPU via CUDA for faster number crunching 329*da0073e9SAndroid Build Coastguard Worker 330*da0073e9SAndroid Build Coastguard Worker[NVTX](https://docs.nvidia.com/gameworks/content/gameworkslibrary/nvtx/nvidia_tools_extension_library_nvtx.htm) is needed to build Pytorch with CUDA. 331*da0073e9SAndroid Build Coastguard WorkerNVTX is a part of CUDA distributive, where it is called "Nsight Compute". To install it onto an already installed CUDA run CUDA installation once again and check the corresponding checkbox. 332*da0073e9SAndroid Build Coastguard WorkerMake sure that CUDA with Nsight Compute is installed after Visual Studio. 333*da0073e9SAndroid Build Coastguard Worker 334*da0073e9SAndroid Build Coastguard WorkerCurrently, VS 2017 / 2019, and Ninja are supported as the generator of CMake. If `ninja.exe` is detected in `PATH`, then Ninja will be used as the default generator, otherwise, it will use VS 2017 / 2019. 335*da0073e9SAndroid Build Coastguard Worker<br/> If Ninja is selected as the generator, the latest MSVC will get selected as the underlying toolchain. 336*da0073e9SAndroid Build Coastguard Worker 337*da0073e9SAndroid Build Coastguard WorkerAdditional libraries such as 338*da0073e9SAndroid Build Coastguard Worker[Magma](https://developer.nvidia.com/magma), [oneDNN, a.k.a. MKLDNN or DNNL](https://github.com/oneapi-src/oneDNN), and [Sccache](https://github.com/mozilla/sccache) are often needed. Please refer to the [installation-helper](https://github.com/pytorch/pytorch/tree/main/.ci/pytorch/win-test-helpers/installation-helpers) to install them. 339*da0073e9SAndroid Build Coastguard Worker 340*da0073e9SAndroid Build Coastguard WorkerYou can refer to the [build_pytorch.bat](https://github.com/pytorch/pytorch/blob/main/.ci/pytorch/win-test-helpers/build_pytorch.bat) script for some other environment variables configurations 341*da0073e9SAndroid Build Coastguard Worker 342*da0073e9SAndroid Build Coastguard Worker 343*da0073e9SAndroid Build Coastguard Worker```cmd 344*da0073e9SAndroid Build Coastguard Workercmd 345*da0073e9SAndroid Build Coastguard Worker 346*da0073e9SAndroid Build Coastguard Worker:: Set the environment variables after you have downloaded and unzipped the mkl package, 347*da0073e9SAndroid Build Coastguard Worker:: else CMake would throw an error as `Could NOT find OpenMP`. 348*da0073e9SAndroid Build Coastguard Workerset CMAKE_INCLUDE_PATH={Your directory}\mkl\include 349*da0073e9SAndroid Build Coastguard Workerset LIB={Your directory}\mkl\lib;%LIB% 350*da0073e9SAndroid Build Coastguard Worker 351*da0073e9SAndroid Build Coastguard Worker:: Read the content in the previous section carefully before you proceed. 352*da0073e9SAndroid Build Coastguard Worker:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block. 353*da0073e9SAndroid Build Coastguard Worker:: "Visual Studio 2019 Developer Command Prompt" will be run automatically. 354*da0073e9SAndroid Build Coastguard Worker:: Make sure you have CMake >= 3.12 before you do this when you use the Visual Studio generator. 355*da0073e9SAndroid Build Coastguard Workerset CMAKE_GENERATOR_TOOLSET_VERSION=14.27 356*da0073e9SAndroid Build Coastguard Workerset DISTUTILS_USE_SDK=1 357*da0073e9SAndroid Build Coastguard Workerfor /f "usebackq tokens=*" %i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -version [15^,17^) -products * -latest -property installationPath`) do call "%i\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION% 358*da0073e9SAndroid Build Coastguard Worker 359*da0073e9SAndroid Build Coastguard Worker:: [Optional] If you want to override the CUDA host compiler 360*da0073e9SAndroid Build Coastguard Workerset CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\cl.exe 361*da0073e9SAndroid Build Coastguard Worker 362*da0073e9SAndroid Build Coastguard Workerpython setup.py develop 363*da0073e9SAndroid Build Coastguard Worker 364*da0073e9SAndroid Build Coastguard Worker``` 365*da0073e9SAndroid Build Coastguard Worker 366*da0073e9SAndroid Build Coastguard Worker##### Adjust Build Options (Optional) 367*da0073e9SAndroid Build Coastguard Worker 368*da0073e9SAndroid Build Coastguard WorkerYou can adjust the configuration of cmake variables optionally (without building first), by doing 369*da0073e9SAndroid Build Coastguard Workerthe following. For example, adjusting the pre-detected directories for CuDNN or BLAS can be done 370*da0073e9SAndroid Build Coastguard Workerwith such a step. 371*da0073e9SAndroid Build Coastguard Worker 372*da0073e9SAndroid Build Coastguard WorkerOn Linux 373*da0073e9SAndroid Build Coastguard Worker```bash 374*da0073e9SAndroid Build Coastguard Workerexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} 375*da0073e9SAndroid Build Coastguard Workerpython setup.py build --cmake-only 376*da0073e9SAndroid Build Coastguard Workerccmake build # or cmake-gui build 377*da0073e9SAndroid Build Coastguard Worker``` 378*da0073e9SAndroid Build Coastguard Worker 379*da0073e9SAndroid Build Coastguard WorkerOn macOS 380*da0073e9SAndroid Build Coastguard Worker```bash 381*da0073e9SAndroid Build Coastguard Workerexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} 382*da0073e9SAndroid Build Coastguard WorkerMACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build --cmake-only 383*da0073e9SAndroid Build Coastguard Workerccmake build # or cmake-gui build 384*da0073e9SAndroid Build Coastguard Worker``` 385*da0073e9SAndroid Build Coastguard Worker 386*da0073e9SAndroid Build Coastguard Worker### Docker Image 387*da0073e9SAndroid Build Coastguard Worker 388*da0073e9SAndroid Build Coastguard Worker#### Using pre-built images 389*da0073e9SAndroid Build Coastguard Worker 390*da0073e9SAndroid Build Coastguard WorkerYou can also pull a pre-built docker image from Docker Hub and run with docker v19.03+ 391*da0073e9SAndroid Build Coastguard Worker 392*da0073e9SAndroid Build Coastguard Worker```bash 393*da0073e9SAndroid Build Coastguard Workerdocker run --gpus all --rm -ti --ipc=host pytorch/pytorch:latest 394*da0073e9SAndroid Build Coastguard Worker``` 395*da0073e9SAndroid Build Coastguard Worker 396*da0073e9SAndroid Build Coastguard WorkerPlease note that PyTorch uses shared memory to share data between processes, so if torch multiprocessing is used (e.g. 397*da0073e9SAndroid Build Coastguard Workerfor multithreaded data loaders) the default shared memory segment size that container runs with is not enough, and you 398*da0073e9SAndroid Build Coastguard Workershould increase shared memory size either with `--ipc=host` or `--shm-size` command line options to `nvidia-docker run`. 399*da0073e9SAndroid Build Coastguard Worker 400*da0073e9SAndroid Build Coastguard Worker#### Building the image yourself 401*da0073e9SAndroid Build Coastguard Worker 402*da0073e9SAndroid Build Coastguard Worker**NOTE:** Must be built with a docker version > 18.06 403*da0073e9SAndroid Build Coastguard Worker 404*da0073e9SAndroid Build Coastguard WorkerThe `Dockerfile` is supplied to build images with CUDA 11.1 support and cuDNN v8. 405*da0073e9SAndroid Build Coastguard WorkerYou can pass `PYTHON_VERSION=x.y` make variable to specify which Python version is to be used by Miniconda, or leave it 406*da0073e9SAndroid Build Coastguard Workerunset to use the default. 407*da0073e9SAndroid Build Coastguard Worker 408*da0073e9SAndroid Build Coastguard Worker```bash 409*da0073e9SAndroid Build Coastguard Workermake -f docker.Makefile 410*da0073e9SAndroid Build Coastguard Worker# images are tagged as docker.io/${your_docker_username}/pytorch 411*da0073e9SAndroid Build Coastguard Worker``` 412*da0073e9SAndroid Build Coastguard Worker 413*da0073e9SAndroid Build Coastguard WorkerYou can also pass the `CMAKE_VARS="..."` environment variable to specify additional CMake variables to be passed to CMake during the build. 414*da0073e9SAndroid Build Coastguard WorkerSee [setup.py](./setup.py) for the list of available variables. 415*da0073e9SAndroid Build Coastguard Worker 416*da0073e9SAndroid Build Coastguard Worker```bash 417*da0073e9SAndroid Build Coastguard Workermake -f docker.Makefile 418*da0073e9SAndroid Build Coastguard Worker``` 419*da0073e9SAndroid Build Coastguard Worker 420*da0073e9SAndroid Build Coastguard Worker### Building the Documentation 421*da0073e9SAndroid Build Coastguard Worker 422*da0073e9SAndroid Build Coastguard WorkerTo build documentation in various formats, you will need [Sphinx](http://www.sphinx-doc.org) and the 423*da0073e9SAndroid Build Coastguard Workerreadthedocs theme. 424*da0073e9SAndroid Build Coastguard Worker 425*da0073e9SAndroid Build Coastguard Worker```bash 426*da0073e9SAndroid Build Coastguard Workercd docs/ 427*da0073e9SAndroid Build Coastguard Workerpip install -r requirements.txt 428*da0073e9SAndroid Build Coastguard Worker``` 429*da0073e9SAndroid Build Coastguard WorkerYou can then build the documentation by running `make <format>` from the 430*da0073e9SAndroid Build Coastguard Worker`docs/` folder. Run `make` to get a list of all available output formats. 431*da0073e9SAndroid Build Coastguard Worker 432*da0073e9SAndroid Build Coastguard WorkerIf you get a katex error run `npm install katex`. If it persists, try 433*da0073e9SAndroid Build Coastguard Worker`npm install -g katex` 434*da0073e9SAndroid Build Coastguard Worker 435*da0073e9SAndroid Build Coastguard Worker> Note: if you installed `nodejs` with a different package manager (e.g., 436*da0073e9SAndroid Build Coastguard Worker`conda`) then `npm` will probably install a version of `katex` that is not 437*da0073e9SAndroid Build Coastguard Workercompatible with your version of `nodejs` and doc builds will fail. 438*da0073e9SAndroid Build Coastguard WorkerA combination of versions that is known to work is `[email protected]` and 439*da0073e9SAndroid Build Coastguard Worker`[email protected]`. To install the latter with `npm` you can run 440*da0073e9SAndroid Build Coastguard Worker```npm install -g [email protected]``` 441*da0073e9SAndroid Build Coastguard Worker 442*da0073e9SAndroid Build Coastguard Worker### Previous Versions 443*da0073e9SAndroid Build Coastguard Worker 444*da0073e9SAndroid Build Coastguard WorkerInstallation instructions and binaries for previous PyTorch versions may be found 445*da0073e9SAndroid Build Coastguard Workeron [our website](https://pytorch.org/previous-versions). 446*da0073e9SAndroid Build Coastguard Worker 447*da0073e9SAndroid Build Coastguard Worker 448*da0073e9SAndroid Build Coastguard Worker## Getting Started 449*da0073e9SAndroid Build Coastguard Worker 450*da0073e9SAndroid Build Coastguard WorkerThree-pointers to get you started: 451*da0073e9SAndroid Build Coastguard Worker- [Tutorials: get you started with understanding and using PyTorch](https://pytorch.org/tutorials/) 452*da0073e9SAndroid Build Coastguard Worker- [Examples: easy to understand PyTorch code across all domains](https://github.com/pytorch/examples) 453*da0073e9SAndroid Build Coastguard Worker- [The API Reference](https://pytorch.org/docs/) 454*da0073e9SAndroid Build Coastguard Worker- [Glossary](https://github.com/pytorch/pytorch/blob/main/GLOSSARY.md) 455*da0073e9SAndroid Build Coastguard Worker 456*da0073e9SAndroid Build Coastguard Worker## Resources 457*da0073e9SAndroid Build Coastguard Worker 458*da0073e9SAndroid Build Coastguard Worker* [PyTorch.org](https://pytorch.org/) 459*da0073e9SAndroid Build Coastguard Worker* [PyTorch Tutorials](https://pytorch.org/tutorials/) 460*da0073e9SAndroid Build Coastguard Worker* [PyTorch Examples](https://github.com/pytorch/examples) 461*da0073e9SAndroid Build Coastguard Worker* [PyTorch Models](https://pytorch.org/hub/) 462*da0073e9SAndroid Build Coastguard Worker* [Intro to Deep Learning with PyTorch from Udacity](https://www.udacity.com/course/deep-learning-pytorch--ud188) 463*da0073e9SAndroid Build Coastguard Worker* [Intro to Machine Learning with PyTorch from Udacity](https://www.udacity.com/course/intro-to-machine-learning-nanodegree--nd229) 464*da0073e9SAndroid Build Coastguard Worker* [Deep Neural Networks with PyTorch from Coursera](https://www.coursera.org/learn/deep-neural-networks-with-pytorch) 465*da0073e9SAndroid Build Coastguard Worker* [PyTorch Twitter](https://twitter.com/PyTorch) 466*da0073e9SAndroid Build Coastguard Worker* [PyTorch Blog](https://pytorch.org/blog/) 467*da0073e9SAndroid Build Coastguard Worker* [PyTorch YouTube](https://www.youtube.com/channel/UCWXI5YeOsh03QvJ59PMaXFw) 468*da0073e9SAndroid Build Coastguard Worker 469*da0073e9SAndroid Build Coastguard Worker## Communication 470*da0073e9SAndroid Build Coastguard Worker* Forums: Discuss implementations, research, etc. https://discuss.pytorch.org 471*da0073e9SAndroid Build Coastguard Worker* GitHub Issues: Bug reports, feature requests, install issues, RFCs, thoughts, etc. 472*da0073e9SAndroid Build Coastguard Worker* Slack: The [PyTorch Slack](https://pytorch.slack.com/) hosts a primary audience of moderate to experienced PyTorch users and developers for general chat, online discussions, collaboration, etc. If you are a beginner looking for help, the primary medium is [PyTorch Forums](https://discuss.pytorch.org). If you need a slack invite, please fill this form: https://goo.gl/forms/PP1AGvNHpSaJP8to1 473*da0073e9SAndroid Build Coastguard Worker* Newsletter: No-noise, a one-way email newsletter with important announcements about PyTorch. You can sign-up here: https://eepurl.com/cbG0rv 474*da0073e9SAndroid Build Coastguard Worker* Facebook Page: Important announcements about PyTorch. https://www.facebook.com/pytorch 475*da0073e9SAndroid Build Coastguard Worker* For brand guidelines, please visit our website at [pytorch.org](https://pytorch.org/) 476*da0073e9SAndroid Build Coastguard Worker 477*da0073e9SAndroid Build Coastguard Worker## Releases and Contributing 478*da0073e9SAndroid Build Coastguard Worker 479*da0073e9SAndroid Build Coastguard WorkerTypically, PyTorch has three minor releases a year. Please let us know if you encounter a bug by [filing an issue](https://github.com/pytorch/pytorch/issues). 480*da0073e9SAndroid Build Coastguard Worker 481*da0073e9SAndroid Build Coastguard WorkerWe appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. 482*da0073e9SAndroid Build Coastguard Worker 483*da0073e9SAndroid Build Coastguard WorkerIf you plan to contribute new features, utility functions, or extensions to the core, please first open an issue and discuss the feature with us. 484*da0073e9SAndroid Build Coastguard WorkerSending a PR without discussion might end up resulting in a rejected PR because we might be taking the core in a different direction than you might be aware of. 485*da0073e9SAndroid Build Coastguard Worker 486*da0073e9SAndroid Build Coastguard WorkerTo learn more about making a contribution to Pytorch, please see our [Contribution page](CONTRIBUTING.md). For more information about PyTorch releases, see [Release page](RELEASE.md). 487*da0073e9SAndroid Build Coastguard Worker 488*da0073e9SAndroid Build Coastguard Worker## The Team 489*da0073e9SAndroid Build Coastguard Worker 490*da0073e9SAndroid Build Coastguard WorkerPyTorch is a community-driven project with several skillful engineers and researchers contributing to it. 491*da0073e9SAndroid Build Coastguard Worker 492*da0073e9SAndroid Build Coastguard WorkerPyTorch is currently maintained by [Soumith Chintala](http://soumith.ch), [Gregory Chanan](https://github.com/gchanan), [Dmytro Dzhulgakov](https://github.com/dzhulgakov), [Edward Yang](https://github.com/ezyang), and [Nikita Shulga](https://github.com/malfet) with major contributions coming from hundreds of talented individuals in various forms and means. 493*da0073e9SAndroid Build Coastguard WorkerA non-exhaustive but growing list needs to mention: [Trevor Killeen](https://github.com/killeent), [Sasank Chilamkurthy](https://github.com/chsasank), [Sergey Zagoruyko](https://github.com/szagoruyko), [Adam Lerer](https://github.com/adamlerer), [Francisco Massa](https://github.com/fmassa), [Alykhan Tejani](https://github.com/alykhantejani), [Luca Antiga](https://github.com/lantiga), [Alban Desmaison](https://github.com/albanD), [Andreas Koepf](https://github.com/andreaskoepf), [James Bradbury](https://github.com/jamesb93), [Zeming Lin](https://github.com/ebetica), [Yuandong Tian](https://github.com/yuandong-tian), [Guillaume Lample](https://github.com/glample), [Marat Dukhan](https://github.com/Maratyszcza), [Natalia Gimelshein](https://github.com/ngimel), [Christian Sarofeen](https://github.com/csarofeen), [Martin Raison](https://github.com/martinraison), [Edward Yang](https://github.com/ezyang), [Zachary Devito](https://github.com/zdevito). 494*da0073e9SAndroid Build Coastguard Worker 495*da0073e9SAndroid Build Coastguard WorkerNote: This project is unrelated to [hughperkins/pytorch](https://github.com/hughperkins/pytorch) with the same name. Hugh is a valuable contributor to the Torch community and has helped with many things Torch and PyTorch. 496*da0073e9SAndroid Build Coastguard Worker 497*da0073e9SAndroid Build Coastguard Worker## License 498*da0073e9SAndroid Build Coastguard Worker 499*da0073e9SAndroid Build Coastguard WorkerPyTorch has a BSD-style license, as found in the [LICENSE](LICENSE) file. 500