pytorch/tools
Ilia Cherniavskii e7a09b4d17 RecordFunction in Dispatcher (#37587)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37587

Lifting RecordFunction up into the dispatcher code

Test Plan: Imported from OSS

Differential Revision: D21374246

fbshipit-source-id: 19f9c1719e6fd3990e451c5bbd771121e91128f7
2020-07-17 22:20:05 -07:00
..
amd_build ROCm 3.5.1 image (#40385) 2020-07-07 15:37:23 -07:00
autograd RecordFunction in Dispatcher (#37587) 2020-07-17 22:20:05 -07:00
clang_format_hash
code_analyzer [pytorch] tweak code analyzer script to handle new namespaces (#40276) 2020-06-19 14:54:21 -07:00
config
docker
jit remediation of S205607 2020-07-17 17:19:47 -07:00
pyi remediation of S205607 2020-07-17 17:19:47 -07:00
rules remediation of S205607 2020-07-17 17:19:47 -07:00
setup_helpers rewrite C++ __torch_function__ handling to work with TensorList operands (#41575) 2020-07-17 08:54:29 -07:00
shared
__init__.py remediation of S205607 2020-07-17 17:19:47 -07:00
aten_mirror.sh
build_libtorch.py
build_pytorch_libs.py
build_variables.bzl [PyTorch Mobile] Modularize the autograd source files shared by mobile and full-jit (#41430) 2020-07-15 21:14:47 -07:00
clang_format_all.py
clang_format_ci.sh
clang_format_utils.py
clang_tidy.py
download_mnist.py
flake8_hook.py
generated_dirs.txt
git-clang-format
git-pre-commit Reverts running clang-tidy on ATen (#40764) 2020-06-30 09:35:55 -07:00
git_add_generated_dirs.sh
git_reset_generated_dirs.sh
pytorch.version
README.md
update_disabled_tests.sh

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.

Legacy infrastructure (we should kill this):

  • cwrap - Implementation of legacy code generation for THNN/THCUNN. This is used by nnwrap.

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: