Skip to content

Files

Latest commit

2398e75 · Nov 25, 2024

History

History
This branch is 9319 commits behind pytorch/pytorch:main.

tools

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 29, 2024
Sep 16, 2024
Nov 12, 2024
Jun 25, 2022
Oct 28, 2024
Jul 19, 2024
Jun 29, 2024
Jul 14, 2024
Aug 27, 2021
Jun 29, 2024
Jun 29, 2024
Nov 22, 2024
Nov 19, 2024
Jun 29, 2024
Jun 29, 2024
Jul 15, 2024
Nov 20, 2024
Oct 19, 2024
Jun 29, 2024
Nov 4, 2024
Nov 11, 2024
Jun 16, 2022
Feb 28, 2023
Oct 18, 2024
May 16, 2023
Nov 21, 2024
Nov 12, 2024
Nov 11, 2024
Jul 19, 2024
Jun 29, 2022
Mar 28, 2023
Jul 18, 2020
May 23, 2023
Nov 9, 2024
Nov 25, 2024
Oct 18, 2024
Jun 29, 2024
Jun 29, 2024
Jan 14, 2022
Jun 29, 2024
Nov 9, 2024
Oct 22, 2018
Oct 22, 2018
Oct 22, 2018
Nov 22, 2024
Sep 27, 2024
Jun 29, 2024
Jun 29, 2024
Nov 15, 2023
Jan 28, 2024
Jul 17, 2024

This folder contains a number of scripts which are used as part of the PyTorch build process. This directory also doubles as a Python module hierarchy (thus the __init__.py).

Overview

Modern infrastructure:

  • autograd - Code generation for autograd. This includes definitions of all our derivatives.
  • jit - Code generation for JIT
  • shared - Generic infrastructure that scripts in tools may find useful.
    • module_loader.py - Makes it easier to import arbitrary Python files in a script, without having to add them to the PYTHONPATH first.

Build system pieces:

  • setup_helpers - Helper code for searching for third-party dependencies on the user system.
  • build_pytorch_libs.py - cross-platform script that builds all of the constituent libraries of PyTorch, but not the PyTorch Python extension itself.
  • build_libtorch.py - Script for building libtorch, a standalone C++ library without Python support. This build script is tested in CI.

Developer tools which you might find useful:

Important if you want to run on AMD GPU:

  • amd_build - HIPify scripts, for transpiling CUDA into AMD HIP. Right now, PyTorch and Caffe2 share logic for how to do this transpilation, but have separate entry-points for transpiling either PyTorch or Caffe2 code.
    • build_amd.py - Top-level entry point for HIPifying our codebase.

Tools which are only situationally useful:

  • docker - Dockerfile for running (but not developing) PyTorch, using the official conda binary distribution. Context: pytorch#1619
  • download_mnist.py - Download the MNIST dataset; this is necessary if you want to run the C++ API tests.