pytorch/tools
2023-12-01 23:42:06 +00:00
..
alerts Revert "add oncall info individual info to failing alert job alert (#103915)" 2023-06-21 23:06:45 +00:00
amd_build [ROCm] Add ROCm AMDGPU support for inductor cpp codegen (#105141) 2023-11-29 15:11:24 +00:00
autograd Expose Flash attn to autograd (#114378) 2023-12-01 23:42:06 +00:00
bazel_tools
build/bazel Bump urllib3 from 2.0.6 to 2.0.7 in /tools/build/bazel (#111435) 2023-10-18 17:14:06 -07:00
build_defs
code_analyzer [BE]: Apply FURB145 to make code more readable and idiomatic. (#112990) 2023-11-06 13:15:04 +00:00
code_coverage [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
config
coverage_plugins_package [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
dynamo Replaced deprecated pkg_resources.packaging with packaging module (#113023) 2023-11-10 15:06:03 +00:00
gdb [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
github fix upload alerts to rockset (#103995) 2023-06-22 23:33:10 +00:00
iwyu [2/N] Cleanup header inclusions in torch_cpu by iwyu (#109964) 2023-11-19 20:56:32 +00:00
jit [BE] Enable ruff's UP rules and autoformat tools and scripts (#105428) 2023-07-19 01:24:44 +00:00
linter Tests have main linter (#114882) 2023-12-01 17:24:08 +00:00
lite_interpreter removing some redundant str splits (#106089) 2023-09-01 00:22:58 +00:00
lldb
onnx [torch/csrc/onnx] Use nested namespaces (3/N) (#113993) 2023-11-18 00:20:19 +00:00
pyi AOTAutograd: keep input mutations in the graph if they are under no_grad, even if they require_grad (#114646) 2023-11-29 04:29:32 +00:00
rules
rules_cc
setup_helpers Fix the Requirement of CMake Version (#106254) 2023-08-02 08:02:52 +00:00
shared Test Reordering: Run previously failing tests first (#101123) 2023-05-16 19:57:54 +00:00
stats [td] Consistent pytest cache (#113804) 2023-11-17 23:45:47 +00:00
test Adding event_tracer evalue logging calls in codegen (#114584) 2023-11-28 18:32:05 +00:00
testing [BE]: ruff FURB136: replace ternary with min/max (preview) (#114382) 2023-11-22 22:10:01 +00:00
__init__.py
bazel.bzl update rules_python and let bazel install its own pip dependencies (#101405) 2023-05-23 06:20:33 +00:00
BUCK.bzl Use global variables to register the return_types namedtuples (#108832) 2023-09-13 17:42:46 +00:00
BUCK.oss
build_libtorch.py
build_pytorch_libs.py
download_mnist.py [BE] f-stringify torch/ and scripts (#105538) 2023-07-21 19:35:24 +00:00
extract_scripts.py
gen_flatbuffers.sh
gen_vulkan_spv.py [Codemod][python/main_function] caffe2: (#113357) 2023-11-15 22:17:31 +00:00
generate_torch_version.py Enable import following in MYPYNOFOLLOW (now MYPYINDUCTOR) (#113830) 2023-11-17 18:24:21 +00:00
generated_dirs.txt
git_add_generated_dirs.sh
git_reset_generated_dirs.sh
nightly.py removing some redundant str splits (#106089) 2023-09-01 00:22:58 +00:00
nvcc_fix_deps.py
pytorch.version
README.md
render_junit.py
substitute.py [Codemod][python/main_function] caffe2: (#113357) 2023-11-15 22:17:31 +00:00
update_masked_docs.py
vscode_settings.py

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: