← All repositories

pytorchpytorch

97,601 stars26,913 forksPythonother0 views
pytorch.org

Pytorch

Features

  • Hardware-Accelerated Tensor LibrariesA multi-dimensional array library that supports both CPU and accelerator-based computation.
  • Tensor ManagementPyTorch provides a comprehensive library for creating, indexing, slicing, joining, and mutating multi-dimensional arrays with support for hardware acceleration.
  • Automatic Differentiation SystemsA framework for building neural networks using a dynamic, tape-based automatic differentiation system that allows for flexible, non-static graph construction.
  • Layer ContainersPyTorch provides a base module class and various container types for organizing and managing neural network layers and parameters.
  • Mathematical OperationsPyTorch offers a wide range of mathematical operations, including pointwise, reduction, comparison, spectral, and linear algebra routines for numerical computing.
  • ATen Tensor LibrariesPyTorch utilizes the ATen library as a foundational tensor and mathematical operation infrastructure for higher-level operations and kernels.
  • Distributed Training PrimitivesPyTorch provides a distributed training suite offering data-parallel and model-parallel primitives to scale training across multiple devices and nodes.
  • Fully Sharded Data ParallelismPyTorch provides a memory-efficient training technique that shards parameters, gradients, and optimizer states across data-parallel processes.
  • Operation KernelsPyTorch defines operations as units of work, categorized into native, custom user-defined, and compound operations composed of primitives.
  • Functional AutogradPyTorch includes a functional automatic differentiation API for computing higher-order derivatives, such as Jacobians and Hessians, on user-provided functions.
  • Batched Data LoadingPyTorch supports automatic batching and collation of data samples into tensors, with customizable functions for handling complex data structures.
  • Parallel Data LoadersPyTorch supports multi-process data loading, allowing parallel data fetching to prevent blocking computation.
  • Convolution LayersPyTorch includes a suite of convolution layers, including 1D, 2D, and 3D variants, along with transposed counterparts for signal and image processing.
  • Normalization LayersPyTorch includes standard batch normalization layers for various input dimensions, including variants that infer input shapes automatically.
  • Recurrent LayersPyTorch provides recurrent neural network modules, including standard RNNs, LSTMs, and GRUs, supporting both multi-layer sequences and cell-level operations.
  • Pipeline Parallelism StrategiesPyTorch supports distributed pipeline parallelism, allowing models to be partitioned across multiple devices to exceed single-device memory capacity.
  • Just-In-Time CompilersPyTorch supports Just-In-Time compilation, enabling the optimization of functions via tracing or explicit scripting of source code.
  • Python BindingsA library designed for deep integration with the host language, allowing for natural usage alongside standard numerical and scientific computing ecosystems.
  • Native Extension InterfacesPyTorch supports integrating custom C++, CUDA, and SYCL code as registered operators for high-performance execution and inference.
  • Dataset AbstractionsPyTorch supports map-style datasets for index-based access and iterable-style datasets for streaming data from external sources.
  • Custom Operator InterfacesPyTorch provides a mechanism to register custom operators from Python, ensuring seamless composition with core subsystems like automatic differentiation and compilation pipelines.
  • Autograd Graph Inspection ToolsPyTorch provides mechanisms to inspect the automatic differentiation graph and interpose behavior during the backward pass by accessing node metadata and registering hooks.
  • Data SamplersPyTorch provides objects that control the sequence of indices for datasets, supporting custom shuffling and batch-sampling strategies.
  • Serialization UtilitiesPyTorch includes built-in serialization utilities for saving and loading tensors and arbitrary objects to and from disk.
  • Performance ProfilersPyTorch includes a built-in profiler to record execution time and memory consumption of operators, helping identify performance bottlenecks.
  • Remote Procedure Call FrameworksPyTorch includes a distributed remote procedure call framework for building applications that support remote function execution, object references, and asynchronous task management.
  • Forward-Mode DifferentiationPyTorch provides an API for forward-mode automatic differentiation, allowing users to compute directional derivatives by associating tensors with their tangents.
  • Memory ProfilingPyTorch provides memory profiling tools to analyze usage patterns, identify fragmentation, and optimize memory allocation strategies during model training.
  • Execution ProfilersPyTorch offers tools for visualizing performance metrics, including operator execution time, memory usage, and hardware utilization for comprehensive model analysis.