pytorch/tools
Jeff Moe b8fc24e092 Upstream v2.1.0 2023-11-08 09:13:36 -07:00
..
alerts Upstream v2.1.0 2023-11-08 09:13:36 -07:00
amd_build Upstream v2.1.0 2023-11-08 09:13:36 -07:00
autograd Upstream v2.1.0 2023-11-08 09:13:36 -07:00
bazel_tools Forklet of Pytorch 2023-11-08 09:01:59 -07:00
build/bazel Upstream v2.1.0 2023-11-08 09:13:36 -07:00
build_defs Forklet of Pytorch 2023-11-08 09:01:59 -07:00
code_analyzer Upstream v2.1.0 2023-11-08 09:13:36 -07:00
code_coverage Upstream v2.1.0 2023-11-08 09:13:36 -07:00
config Forklet of Pytorch 2023-11-08 09:01:59 -07:00
coverage_plugins_package Upstream v2.1.0 2023-11-08 09:13:36 -07:00
dynamo Upstream v2.1.0 2023-11-08 09:13:36 -07:00
gdb Upstream v2.1.0 2023-11-08 09:13:36 -07:00
github Upstream v2.1.0 2023-11-08 09:13:36 -07:00
iwyu Upstream v2.1.0 2023-11-08 09:13:36 -07:00
jit Upstream v2.1.0 2023-11-08 09:13:36 -07:00
linter Upstream v2.1.0 2023-11-08 09:13:36 -07:00
lite_interpreter Upstream v2.1.0 2023-11-08 09:13:36 -07:00
lldb Upstream v2.1.0 2023-11-08 09:13:36 -07:00
onnx Upstream v2.1.0 2023-11-08 09:13:36 -07:00
pyi Upstream v2.1.0 2023-11-08 09:13:36 -07:00
rules Forklet of Pytorch 2023-11-08 09:01:59 -07:00
rules_cc Upstream v2.1.0 2023-11-08 09:13:36 -07:00
setup_helpers Upstream v2.1.0 2023-11-08 09:13:36 -07:00
shared Upstream v2.1.0 2023-11-08 09:13:36 -07:00
stats Upstream v2.1.0 2023-11-08 09:13:36 -07:00
test Upstream v2.1.0 2023-11-08 09:13:36 -07:00
testing Upstream v2.1.0 2023-11-08 09:13:36 -07:00
BUCK.bzl Upstream v2.1.0 2023-11-08 09:13:36 -07:00
BUCK.oss Forklet of Pytorch 2023-11-08 09:01:59 -07:00
README.md Upstream v2.1.0 2023-11-08 09:13:36 -07:00
__init__.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
bazel.bzl Upstream v2.1.0 2023-11-08 09:13:36 -07:00
build_libtorch.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
build_pytorch_libs.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
download_mnist.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
extract_scripts.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
gen_flatbuffers.sh Forklet of Pytorch 2023-11-08 09:01:59 -07:00
gen_vulkan_spv.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
generate_torch_version.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
generated_dirs.txt Forklet of Pytorch 2023-11-08 09:01:59 -07:00
git_add_generated_dirs.sh Forklet of Pytorch 2023-11-08 09:01:59 -07:00
git_reset_generated_dirs.sh Forklet of Pytorch 2023-11-08 09:01:59 -07:00
nightly.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
nvcc_fix_deps.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
pytorch.version Forklet of Pytorch 2023-11-08 09:01:59 -07:00
render_junit.py Forklet of Pytorch 2023-11-08 09:01:59 -07:00
substitute.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
update_masked_docs.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00
vscode_settings.py Upstream v2.1.0 2023-11-08 09:13:36 -07:00

README.md

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: