{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":".ci","path":".ci","contentType":"directory"},{"name":".circleci","path":".circleci","contentType":"directory"},{"name":".ctags.d","path":".ctags.d","contentType":"directory"},{"name":".devcontainer","path":".devcontainer","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":".vscode","path":".vscode","contentType":"directory"},{"name":"android","path":"android","contentType":"directory"},{"name":"aten","path":"aten","contentType":"directory"},{"name":"benchmarks","path":"benchmarks","contentType":"directory"},{"name":"binaries","path":"binaries","contentType":"directory"},{"name":"c10","path":"c10","contentType":"directory"},{"name":"caffe2","path":"caffe2","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"functorch","path":"functorch","contentType":"directory"},{"name":"ios","path":"ios","contentType":"directory"},{"name":"modules","path":"modules","contentType":"directory"},{"name":"mypy_plugins","path":"mypy_plugins","contentType":"directory"},{"name":"scripts","path":"scripts","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":"third_party","path":"third_party","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"torch","path":"torch","contentType":"directory"},{"name":"torchgen","path":"torchgen","contentType":"directory"},{"name":".bazelignore","path":".bazelignore","contentType":"file"},{"name":".bazelrc","path":".bazelrc","contentType":"file"},{"name":".bazelversion","path":".bazelversion","contentType":"file"},{"name":".buckconfig.oss","path":".buckconfig.oss","contentType":"file"},{"name":".clang-format","path":".clang-format","contentType":"file"},{"name":".clang-tidy","path":".clang-tidy","contentType":"file"},{"name":".cmakelintrc","path":".cmakelintrc","contentType":"file"},{"name":".coveragerc","path":".coveragerc","contentType":"file"},{"name":".dockerignore","path":".dockerignore","contentType":"symlink_file"},{"name":".flake8","path":".flake8","contentType":"file"},{"name":".gdbinit","path":".gdbinit","contentType":"file"},{"name":".git-blame-ignore-revs","path":".git-blame-ignore-revs","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitmodules","path":".gitmodules","contentType":"file"},{"name":".isort.cfg","path":".isort.cfg","contentType":"file"},{"name":".lintrunner.toml","path":".lintrunner.toml","contentType":"file"},{"name":".lldbinit","path":".lldbinit","contentType":"file"},{"name":"BUCK.oss","path":"BUCK.oss","contentType":"file"},{"name":"BUILD.bazel","path":"BUILD.bazel","contentType":"file"},{"name":"CITATION.cff","path":"CITATION.cff","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"CODEOWNERS","path":"CODEOWNERS","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Dockerfile","path":"Dockerfile","contentType":"file"},{"name":"GLOSSARY.md","path":"GLOSSARY.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"MANIFEST.in","path":"MANIFEST.in","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"NOTICE","path":"NOTICE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"RELEASE.md","path":"RELEASE.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"WORKSPACE","path":"WORKSPACE","contentType":"file"},{"name":"aten.bzl","path":"aten.bzl","contentType":"file"},{"name":"buckbuild.bzl","path":"buckbuild.bzl","contentType":"file"},{"name":"build.bzl","path":"build.bzl","contentType":"file"},{"name":"build_variables.bzl","path":"build_variables.bzl","contentType":"file"},{"name":"c2_defs.bzl","path":"c2_defs.bzl","contentType":"file"},{"name":"c2_test_defs.bzl","path":"c2_test_defs.bzl","contentType":"file"},{"name":"defs.bzl","path":"defs.bzl","contentType":"file"},{"name":"docker.Makefile","path":"docker.Makefile","contentType":"file"},{"name":"meta_gen_cpp_compile_commands.json","path":"meta_gen_cpp_compile_commands.json","contentType":"file"},{"name":"mypy-nofollow.ini","path":"mypy-nofollow.ini","contentType":"file"},{"name":"mypy-strict.ini","path":"mypy-strict.ini","contentType":"file"},{"name":"mypy.ini","path":"mypy.ini","contentType":"file"},{"name":"pt_ops.bzl","path":"pt_ops.bzl","contentType":"file"},{"name":"pt_template_srcs.bzl","path":"pt_template_srcs.bzl","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"pytest.ini","path":"pytest.ini","contentType":"file"},{"name":"requirements-flake8.txt","path":"requirements-flake8.txt","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"},{"name":"ubsan.supp","path":"ubsan.supp","contentType":"file"},{"name":"ufunc_defs.bzl","path":"ufunc_defs.bzl","contentType":"file"},{"name":"version.txt","path":"version.txt","contentType":"file"}],"totalCount":81}},"fileTreeProcessingTime":11.149627,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":65600975,"defaultBranch":"main","name":"pytorch","ownerLogin":"pytorch","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-08-13T05:26:41.000Z","ownerAvatar":"https://web.archive.org/web/20230809060029/https://avatars.githubusercontent.com/u/21003710?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"main","listCacheKey":"v0:1691560051.0","canEdit":false,"refType":"branch","currentOid":"c876afea2d18bf90a860835776e23158fb86e7a3"},"path":"README.md","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/pytorch/pytorch/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/pytorch/pytorch/security/dependabot","repoSecurityAndAnalysisPath":"/pytorch/pytorch/settings/security_analysis","repoOwnerIsOrg":true,"currentUserCanAdminRepo":false},"displayName":"README.md","displayUrl":"https://web.archive.org/web/20230809060029/https://github.com/pytorch/pytorch/blob/main/README.md?raw=true","headerInfo":{"blobSize":"22.4 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":"https://web.archive.org/web/20230809060029/https://desktop.github.com","gitLfsPath":null,"onBranch":true,"shortPath":"499dd76","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fpytorch%2Fpytorch%2Fblob%2Fmain%2FREADME.md","isCSV":false,"isRichtext":true,"toc":[{"level":2,"text":"More About PyTorch","anchor":"more-about-pytorch","htmlText":"More About PyTorch"},{"level":3,"text":"A GPU-Ready Tensor Library","anchor":"a-gpu-ready-tensor-library","htmlText":"A GPU-Ready Tensor Library"},{"level":3,"text":"Dynamic Neural Networks: Tape-Based Autograd","anchor":"dynamic-neural-networks-tape-based-autograd","htmlText":"Dynamic Neural Networks: Tape-Based Autograd"},{"level":3,"text":"Python First","anchor":"python-first","htmlText":"Python First"},{"level":3,"text":"Imperative Experiences","anchor":"imperative-experiences","htmlText":"Imperative Experiences"},{"level":3,"text":"Fast and Lean","anchor":"fast-and-lean","htmlText":"Fast and Lean"},{"level":3,"text":"Extensions Without Pain","anchor":"extensions-without-pain","htmlText":"Extensions Without Pain"},{"level":2,"text":"Installation","anchor":"installation","htmlText":"Installation"},{"level":3,"text":"Binaries","anchor":"binaries","htmlText":"Binaries"},{"level":4,"text":"NVIDIA Jetson Platforms","anchor":"nvidia-jetson-platforms","htmlText":"NVIDIA Jetson Platforms"},{"level":3,"text":"From Source","anchor":"from-source","htmlText":"From Source"},{"level":4,"text":"Prerequisites","anchor":"prerequisites","htmlText":"Prerequisites"},{"level":4,"text":"Install Dependencies","anchor":"install-dependencies","htmlText":"Install Dependencies"},{"level":4,"text":"Get the PyTorch Source","anchor":"get-the-pytorch-source","htmlText":"Get the PyTorch Source"},{"level":4,"text":"Install PyTorch","anchor":"install-pytorch","htmlText":"Install PyTorch"},{"level":5,"text":"Adjust Build Options (Optional)","anchor":"adjust-build-options-optional","htmlText":"Adjust Build Options (Optional)"},{"level":3,"text":"Docker Image","anchor":"docker-image","htmlText":"Docker Image"},{"level":4,"text":"Using pre-built images","anchor":"using-pre-built-images","htmlText":"Using pre-built images"},{"level":4,"text":"Building the image yourself","anchor":"building-the-image-yourself","htmlText":"Building the image yourself"},{"level":3,"text":"Building the Documentation","anchor":"building-the-documentation","htmlText":"Building the Documentation"},{"level":3,"text":"Previous Versions","anchor":"previous-versions","htmlText":"Previous Versions"},{"level":2,"text":"Getting Started","anchor":"getting-started","htmlText":"Getting Started"},{"level":2,"text":"Resources","anchor":"resources","htmlText":"Resources"},{"level":2,"text":"Communication","anchor":"communication","htmlText":"Communication"},{"level":2,"text":"Releases and Contributing","anchor":"releases-and-contributing","htmlText":"Releases and Contributing"},{"level":2,"text":"The Team","anchor":"the-team","htmlText":"The Team"},{"level":2,"text":"License","anchor":"license","htmlText":"License"}],"lineInfo":{"truncatedLoc":"462","truncatedSloc":"331"},"mode":"file"},"image":false,"isCodeownersFile":null,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://web.archive.org/web/20230809060029/https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Markdown","languageID":222,"large":false,"loggedIn":false,"newDiscussionPath":"/pytorch/pytorch/discussions/new","newIssuePath":"/pytorch/pytorch/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/pytorch/pytorch/blob/main/README.md","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/pytorch/pytorch/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"renderImageOrRaw":false,"richText":"

\"PyTorch

\n
\n

PyTorch is a Python package that provides two high-level features:

\n\n

You can reuse your favorite Python packages such as NumPy, SciPy, and Cython to extend PyTorch when needed.

\n

Our trunk health (Continuous Integration signals) can be found at hud.pytorch.org.

\n\n\n\n

More About PyTorch

\n

At a granular level, PyTorch is a library that consists of the following components:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
ComponentDescription
torchA Tensor library like NumPy, with strong GPU support
torch.autogradA tape-based automatic differentiation library that supports all differentiable Tensor operations in torch
torch.jitA compilation stack (TorchScript) to create serializable and optimizable models from PyTorch code
torch.nnA neural networks library deeply integrated with autograd designed for maximum flexibility
torch.multiprocessingPython multiprocessing, but with magical memory sharing of torch Tensors across processes. Useful for data loading and Hogwild training
torch.utilsDataLoader and other utility functions for convenience
\n

Usually, PyTorch is used either as:

\n\n

Elaborating Further:

\n

A GPU-Ready Tensor Library

\n

If you use NumPy, then you have used Tensors (a.k.a. ndarray).

\n

\"Tensor

\n

PyTorch provides Tensors that can live either on the CPU or the GPU and accelerates the\ncomputation by a huge amount.

\n

We provide a wide variety of tensor routines to accelerate and fit your scientific computation needs\nsuch as slicing, indexing, mathematical operations, linear algebra, reductions.\nAnd they are fast!

\n

Dynamic Neural Networks: Tape-Based Autograd

\n

PyTorch has a unique way of building neural networks: using and replaying a tape recorder.

\n

Most frameworks such as TensorFlow, Theano, Caffe, and CNTK have a static view of the world.\nOne has to build a neural network and reuse the same structure again and again.\nChanging the way the network behaves means that one has to start from scratch.

\n

With PyTorch, we use a technique called reverse-mode auto-differentiation, which allows you to\nchange the way your network behaves arbitrarily with zero lag or overhead. Our inspiration comes\nfrom several research papers on this topic, as well as current and past work such as\ntorch-autograd,\nautograd,\nChainer, etc.

\n

While this technique is not unique to PyTorch, it's one of the fastest implementations of it to date.\nYou get the best of speed and flexibility for your crazy research.

\n

\"Dynamic

\n

Python First

\n

PyTorch is not a Python binding into a monolithic C++ framework.\nIt is built to be deeply integrated into Python.\nYou can use it naturally like you would use NumPy / SciPy / scikit-learn etc.\nYou can write your new neural network layers in Python itself, using your favorite libraries\nand use packages such as Cython and Numba.\nOur goal is to not reinvent the wheel where appropriate.

\n

Imperative Experiences

\n

PyTorch is designed to be intuitive, linear in thought, and easy to use.\nWhen you execute a line of code, it gets executed. There isn't an asynchronous view of the world.\nWhen you drop into a debugger or receive error messages and stack traces, understanding them is straightforward.\nThe stack trace points to exactly where your code was defined.\nWe hope you never spend hours debugging your code because of bad stack traces or asynchronous and opaque execution engines.

\n

Fast and Lean

\n

PyTorch has minimal framework overhead. We integrate acceleration libraries\nsuch as Intel MKL and NVIDIA (cuDNN, NCCL) to maximize speed.\nAt the core, its CPU and GPU Tensor and neural network backends\nare mature and have been tested for years.

\n

Hence, PyTorch is quite fast — whether you run small or large neural networks.

\n

The memory usage in PyTorch is extremely efficient compared to Torch or some of the alternatives.\nWe've written custom memory allocators for the GPU to make sure that\nyour deep learning models are maximally memory efficient.\nThis enables you to train bigger deep learning models than before.

\n

Extensions Without Pain

\n

Writing new neural network modules, or interfacing with PyTorch's Tensor API was designed to be straightforward\nand with minimal abstractions.

\n

You can write new neural network layers in Python using the torch API\nor your favorite NumPy-based libraries such as SciPy.

\n

If you want to write your layers in C/C++, we provide a convenient extension API that is efficient and with minimal boilerplate.\nNo wrapper code needs to be written. You can see a tutorial here and an example here.

\n

Installation

\n

Binaries

\n

Commands to install binaries via Conda or pip wheels are on our website: https://pytorch.org/get-started/locally/

\n

NVIDIA Jetson Platforms

\n

Python wheels for NVIDIA's Jetson Nano, Jetson TX1/TX2, Jetson Xavier NX/AGX, and Jetson AGX Orin are provided here and the L4T container is published here

\n

They require JetPack 4.2 and above, and @dusty-nv and @ptrblck are maintaining them.

\n

From Source

\n

Prerequisites

\n

If you are installing from source, you will need:

\n\n

We highly recommend installing an Anaconda environment. You will get a high-quality BLAS library (MKL) and you get controlled dependency versions regardless of your Linux distro.

\n

If you want to compile with CUDA support, select a supported version of CUDA from our support matrix, then install the following:

\n\n

Note: You could refer to the cuDNN Support Matrix for cuDNN versions with the various supported CUDA, CUDA driver and NVIDIA hardware

\n

If you want to disable CUDA support, export the environment variable USE_CUDA=0.\nOther potentially useful environment variables may be found in setup.py.

\n

If you are building for NVIDIA's Jetson platforms (Jetson Nano, TX1, TX2, AGX Xavier), Instructions to install PyTorch for Jetson Nano are available here

\n

If you want to compile with ROCm support, install

\n\n

If you want to disable ROCm support, export the environment variable USE_ROCM=0.\nOther potentially useful environment variables may be found in setup.py.

\n

Install Dependencies

\n

Common

\n
conda install cmake ninja\n# Run this command from the PyTorch directory after cloning the source code using the “Get the PyTorch Source“ section below\npip install -r requirements.txt
\n

On Linux

\n
conda install mkl mkl-include\n# CUDA only: Add LAPACK support for the GPU if needed\nconda install -c pytorch magma-cuda110  # or the magma-cuda* that matches your CUDA version from https://anaconda.org/pytorch/repo\n\n# (optional) If using torch.compile with inductor/triton, install the matching version of triton\n# Run from the pytorch directory after cloning\nmake triton
\n

On MacOS

\n
# Add this package on intel x86 processor machines only\nconda install mkl mkl-include\n# Add these packages if torch.distributed is needed\nconda install pkg-config libuv
\n

On Windows

\n
conda install mkl mkl-include\n# Add these packages if torch.distributed is needed.\n# Distributed package support on Windows is a prototype feature and is subject to changes.\nconda install -c conda-forge libuv=1.39
\n

Get the PyTorch Source

\n
git clone --recursive https://github.com/pytorch/pytorch\ncd pytorch\n# if you are updating an existing checkout\ngit submodule sync\ngit submodule update --init --recursive
\n

Install PyTorch

\n

On Linux

\n

If you would like to compile PyTorch with new C++ ABI enabled, then first run this command:

\n
export _GLIBCXX_USE_CXX11_ABI=1
\n

If you're compiling for AMD ROCm then first run this command:

\n
# Only run this if you're compiling for ROCm\npython tools/amd_build/build_amd.py
\n

Install PyTorch

\n
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\npython setup.py develop
\n
\n

Aside: If you are using Anaconda, you may experience an error caused by the linker:

\n
build/temp.linux-x86_64-3.7/torch/csrc/stub.o: file not recognized: file format not recognized\ncollect2: error: ld returned 1 exit status\nerror: command 'g++' failed with exit status 1\n
\n

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+.

\n
\n

On macOS

\n
python3 setup.py develop
\n

On Windows

\n

Choose Correct Visual Studio Version.

\n

PyTorch CI uses Visual C++ BuildTools, which come with Visual Studio Enterprise,\nProfessional, or Community Editions. You can also install the build tools from\nhttps://visualstudio.microsoft.com/visual-cpp-build-tools/. The build tools do not\ncome with Visual Studio Code by default.

\n

If you want to build legacy python code, please refer to Building on legacy code and CUDA

\n

CPU-only builds

\n

In this mode PyTorch computations will run on your CPU, not your GPU

\n
conda activate\npython setup.py develop
\n

Note 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 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.

\n

CUDA based build

\n

In this mode PyTorch computations will leverage your GPU via CUDA for faster number crunching

\n

NVTX is needed to build Pytorch with CUDA.\nNVTX 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.\nMake sure that CUDA with Nsight Compute is installed after Visual Studio.

\n

Currently, 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.\n
If Ninja is selected as the generator, the latest MSVC will get selected as the underlying toolchain.

\n

Additional libraries such as\nMagma, oneDNN, a.k.a. MKLDNN or DNNL, and Sccache are often needed. Please refer to the installation-helper to install them.

\n

You can refer to the build_pytorch.bat script for some other environment variables configurations

\n
cmd\n\n:: Set the environment variables after you have downloaded and unzipped the mkl package,\n:: else CMake would throw an error as `Could NOT find OpenMP`.\nset CMAKE_INCLUDE_PATH={Your directory}\\mkl\\include\nset LIB={Your directory}\\mkl\\lib;%LIB%\n\n:: Read the content in the previous section carefully before you proceed.\n:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block.\n:: \"Visual Studio 2019 Developer Command Prompt\" will be run automatically.\n:: Make sure you have CMake >= 3.12 before you do this when you use the Visual Studio generator.\nset CMAKE_GENERATOR_TOOLSET_VERSION=14.27\nset DISTUTILS_USE_SDK=1\nfor /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%\n\n:: [Optional] If you want to override the CUDA host compiler\nset CUDAHOSTCXX=C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX64\\x64\\cl.exe\n\npython setup.py develop\n
\n
Adjust Build Options (Optional)
\n

You can adjust the configuration of cmake variables optionally (without building first), by doing\nthe following. For example, adjusting the pre-detected directories for CuDNN or BLAS can be done\nwith such a step.

\n

On Linux

\n
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\npython setup.py build --cmake-only\nccmake build  # or cmake-gui build
\n

On macOS

\n
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-\"$(dirname $(which conda))/../\"}\nMACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build --cmake-only\nccmake build  # or cmake-gui build
\n

Docker Image

\n

Using pre-built images

\n

You can also pull a pre-built docker image from Docker Hub and run with docker v19.03+

\n
docker run --gpus all --rm -ti --ipc=host pytorch/pytorch:latest
\n

Please note that PyTorch uses shared memory to share data between processes, so if torch multiprocessing is used (e.g.\nfor multithreaded data loaders) the default shared memory segment size that container runs with is not enough, and you\nshould increase shared memory size either with --ipc=host or --shm-size command line options to nvidia-docker run.

\n

Building the image yourself

\n

NOTE: Must be built with a docker version > 18.06

\n

The Dockerfile is supplied to build images with CUDA 11.1 support and cuDNN v8.\nYou can pass PYTHON_VERSION=x.y make variable to specify which Python version is to be used by Miniconda, or leave it\nunset to use the default.

\n
make -f docker.Makefile\n# images are tagged as docker.io/${your_docker_username}/pytorch
\n

You can also pass the CMAKE_VARS=\"...\" environment variable to specify additional CMake variables to be passed to CMake during the build.\nSee setup.py for the list of available variables.

\n
CMAKE_VARS=\"BUILD_CAFFE2=ON BUILD_CAFFE2_OPS=ON\" make -f docker.Makefile
\n

Building the Documentation

\n

To build documentation in various formats, you will need Sphinx and the\nreadthedocs theme.

\n
cd docs/\npip install -r requirements.txt
\n

You can then build the documentation by running make <format> from the\ndocs/ folder. Run make to get a list of all available output formats.

\n

If you get a katex error run npm install katex. If it persists, try\nnpm install -g katex

\n
\n

Note: if you installed nodejs with a different package manager (e.g.,\nconda) then npm will probably install a version of katex that is not\ncompatible with your version of nodejs and doc builds will fail.\nA combination of versions that is known to work is node@6.13.1 and\nkatex@0.13.18. To install the latter with npm you can run\nnpm install -g katex@0.13.18

\n
\n

Previous Versions

\n

Installation instructions and binaries for previous PyTorch versions may be found\non our website.

\n

Getting Started

\n

Three-pointers to get you started:

\n\n

Resources

\n\n

Communication

\n\n

Releases and Contributing

\n

Typically, PyTorch has three major releases a year. Please let us know if you encounter a bug by filing an issue.

\n

We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion.

\n

If you plan to contribute new features, utility functions, or extensions to the core, please first open an issue and discuss the feature with us.\nSending 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.

\n

To learn more about making a contribution to Pytorch, please see our Contribution page. For more information about PyTorch releases, see Release page.

\n

The Team

\n

PyTorch is a community-driven project with several skillful engineers and researchers contributing to it.

\n

PyTorch is currently maintained by Soumith Chintala, Gregory Chanan, Dmytro Dzhulgakov, Edward Yang, and Nikita Shulga with major contributions coming from hundreds of talented individuals in various forms and means.\nA non-exhaustive but growing list needs to mention: Trevor Killeen, Sasank Chilamkurthy, Sergey Zagoruyko, Adam Lerer, Francisco Massa, Alykhan Tejani, Luca Antiga, Alban Desmaison, Andreas Koepf, James Bradbury, Zeming Lin, Yuandong Tian, Guillaume Lample, Marat Dukhan, Natalia Gimelshein, Christian Sarofeen, Martin Raison, Edward Yang, Zachary Devito.

\n

Note: This project is unrelated to hughperkins/pytorch with the same name. Hugh is a valuable contributor to the Torch community and has helped with many things Torch and PyTorch.

\n

License

\n

PyTorch has a BSD-style license, as found in the LICENSE file.

\n
","renderedFileInfo":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"pytorch","repoName":"pytorch","showInvalidCitationWarning":false,"citationHelpUrl":"https://web.archive.org/web/20230809060029/https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timedOut":false,"notAnalyzed":true,"symbols":[]}},"copilotInfo":null,"csrf_tokens":{"/pytorch/pytorch/branches":{"post":"3qnxoiyf_901-ul7k1lnlq7BPOZMSW0ZXZyzNrNxyrHb6qqctXByMUSKHsSNi7KYyRIwfYcTFKVmc2sfzUSh-g"}}},"title":"pytorch/README.md at main · pytorch/pytorch"}