pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 4 minutes ago
Added to GitGenius on December 15th, 2022
Created on August 13th, 2016
Open Issues & Pull Requests: 17,520 (+1)
GitHub issues: Enabled
Number of forks: 29,111
Total Stargazers: 102,760 (+0)
Total Subscribers: 1,805 (+0)

Repository Insights (GitGenius)

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 86% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 51% of tracked open issues have had no activity in three months. Only 1% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 10,348
New in 7 days: 185
Closed in 7 days: 157
Avg open age: 924 days
Stale 30+ days: 9,607
Stale 90+ days: 8,850

Recent activity

Opened in 7 days: 162
Closed in 7 days: 130
Comments in 7 days: 490
Events in 7 days: 7,508

Top labels

  • triaged (31,490)
  • oncall: pt2 (9,467)
  • skipped (5,954)
  • module: flaky-tests (5,003)
  • module: inductor (3,716)
  • bot-triaged (3,655)
  • oncall: distributed (3,091)
  • high priority (2,685)

Detailed Description

PyTorch is a Python library that provides tensor computation with strong GPU acceleration and deep neural networks built on a tape-based automatic differentiation system. The repository serves as the primary implementation of the PyTorch framework, which has become one of the most widely used deep learning platforms in research and production environments.

The core functionality centers on two main components. The torch library provides tensor operations similar to NumPy but with GPU acceleration capabilities, while torch.autograd implements reverse-mode automatic differentiation that enables dynamic neural network construction. Unlike static graph frameworks, PyTorch uses a tape-based approach that records operations during execution, allowing researchers to modify network behavior dynamically without rebuilding the entire computational graph. Additional components include torch.jit for model compilation and serialization, torch.nn for neural network layers, torch.multiprocessing for distributed training, and torch.utils for data loading utilities.

The repository emphasizes Python-first design philosophy, integrating deeply with the Python ecosystem rather than wrapping a monolithic C++ framework. This allows developers to write custom layers in Python, leverage NumPy and SciPy, and use standard debugging tools effectively. The framework prioritizes imperative execution where code runs immediately upon invocation, providing clear error messages and stack traces that point directly to problem locations.

Performance optimization is achieved through integration with acceleration libraries including Intel MKL, NVIDIA cuDNN, and NCCL. Custom GPU memory allocators ensure efficient memory usage, enabling training of larger models than competing frameworks. The implementation maintains mature CPU and GPU backends that have been tested extensively over years of production use.

The repository maintains active overlap with other major projects including microsoft/vscode, tensorflow/tensorflow, and rust-lang/rust based on shared contributor networks. Installation options include pre-built binaries via conda and pip, Docker images, and source compilation with support for NVIDIA CUDA, AMD ROCm, and Intel GPU backends. Source compilation requires Python 3.10 or later, a C++20-compatible compiler, and 10 GB of disk space, with initial builds taking 30-60 minutes.

The framework supports deployment across diverse hardware platforms including NVIDIA Jetson devices, standard CPUs, and various GPU architectures. Extension capabilities allow integration with C/C++ code through a minimal-boilerplate API, enabling performance-critical components to be implemented in compiled languages while maintaining Python accessibility for higher-level logic.