pytorch/tools
egienvalue 8461e7ed9e Add test_cpp_extensions tests for stream_and_event and mita_backend (#123614)
Test the generic torch.Stream/Event with fake device gurad and hooks. Since we added a fake device backend, it is mutual exclusive to other backends. Tests will be skipped if TEST_CUDA or TEST_ROCM is true.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/123614
Approved by: https://github.com/albanD
ghstack dependencies: #123611, #123612
2024-04-26 16:17:54 +00:00
..
alerts
amd_build
autograd Revert "[cuDNN] cuDNN SDPA (Flash Attention) Backward (#122510)" 2024-04-25 09:22:37 +00:00
bazel_tools
build/bazel [CI] Update bazel deps (#124076) 2024-04-15 20:39:50 +00:00
build_defs
code_analyzer [BE]: TRY002 - Ban raising vanilla exceptions (#124570) 2024-04-21 22:26:40 +00:00
code_coverage [BE]: TRY002 - Ban raising vanilla exceptions (#124570) 2024-04-21 22:26:40 +00:00
config
coverage_plugins_package
dynamo [dynamo, 3.12] enable tests disabled due to missing dynamo 3.12 support (#123300) 2024-04-05 20:13:17 +00:00
gdb
github
iwyu
jit
linter Use uv in lintrunner init when it is available. (#124033) 2024-04-15 14:47:21 +00:00
lite_interpreter
lldb
onnx
pyi rename ort to maia (#123265) 2024-04-23 00:33:25 +00:00
rules
rules_cc
setup_helpers [Build] Add linker script optimization (#121975) 2024-04-09 20:22:25 +00:00
shared
stats [ez][TD] Unique td_exclusions file name (#124301) 2024-04-23 20:25:27 +00:00
test
testing Add test_cpp_extensions tests for stream_and_event and mita_backend (#123614) 2024-04-26 16:17:54 +00:00
__init__.py
bazel.bzl
BUCK.bzl
BUCK.oss
build_libtorch.py
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 Support for sapling scm (#122072) 2024-03-22 22:59:16 +00:00
generated_dirs.txt
git_add_generated_dirs.sh
git_reset_generated_dirs.sh
nightly.py
nvcc_fix_deps.py
pytorch.version
README.md
render_junit.py
substitute.py
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: