pytorch/tools
Xuehai Pan d2dc173664 Remove lint dependency ufmt (#132573)
`ufmt` is a combination of `black + usort`.

This PR removes `ufmt` and run `black` and `usort` separately.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132573
Approved by: https://github.com/ezyang
ghstack dependencies: #129769, #132572
2024-08-04 10:24:09 +00:00
..
alerts
amd_build [BE][Easy][5/19] enforce style for empty lines in import segments in tools/ and torchgen/ (#129756) 2024-07-17 06:44:35 +00:00
autograd Add decomposition for unsqueeze_copy (#130942) 2024-07-29 21:13:37 +00:00
bazel_tools
build/bazel Bump setuptools from 69.5.1 to 70.0.0 in /tools/build/bazel (#130893) 2024-07-25 03:32:08 +00:00
build_defs [lint] Remove unnecessary BUCKRESTRICTEDSYNTAX suppressions 2024-07-19 07:19:11 -07:00
code_analyzer
code_coverage [BE][Easy] fix ruff rule needless-bool (SIM103) (#130206) 2024-07-14 08:17:52 +00:00
config
coverage_plugins_package
dynamo
flight_recorder Initial commit of flight recorder trace (#130764) 2024-07-19 06:00:54 +00:00
gdb
github
iwyu
jit [9/N] Replace c10::optional with std::optional (#130674) 2024-07-15 00:48:43 +00:00
linter Remove lint dependency ufmt (#132573) 2024-08-04 10:24:09 +00:00
lite_interpreter
lldb
onnx
pyi Revert "Grouped Query Attention (#128898)" 2024-08-02 18:58:46 +00:00
rules
rules_cc
setup_helpers Allow setting PYTHON_LIB_REL_PATH via environment variable (#128419) 2024-07-24 19:49:06 +00:00
shared
stats [CI][dashboard] Rename cpu-x86 to cpu_x86 (#131658) 2024-07-24 19:16:52 +00:00
test [BE][Easy][5/19] enforce style for empty lines in import segments in tools/ and torchgen/ (#129756) 2024-07-17 06:44:35 +00:00
testing [TD] More files for test_public_bindings (#132284) 2024-07-31 19:53:40 +00:00
__init__.py
bazel.bzl
BUCK.bzl [lint] Remove unnecessary BUCKRESTRICTEDSYNTAX suppressions 2024-07-19 07:19:11 -07:00
BUCK.oss
build_libtorch.py [BE][Easy][5/19] enforce style for empty lines in import segments in tools/ and torchgen/ (#129756) 2024-07-17 06:44:35 +00:00
build_pytorch_libs.py
build_with_debinfo.py
download_mnist.py
extract_scripts.py
gen_flatbuffers.sh
gen_vulkan_spv.py
generate_torch_version.py
generated_dirs.txt
git_add_generated_dirs.sh
git_reset_generated_dirs.sh
nightly.py Refactor nightly checkout tool (#131134) 2024-07-25 11:20:43 +00:00
nvcc_fix_deps.py
pytorch.version
README.md
render_junit.py
substitute.py
update_masked_docs.py
vscode_settings.py [BE][Easy][5/19] enforce style for empty lines in import segments in tools/ and torchgen/ (#129756) 2024-07-17 06:44:35 +00:00

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: