350+ Tools CoveredSource Data Updated Weeklydates

PyTorch Pricing: BSD-Style License, and What You Run It On

By Egor Burlakov · Edited · Source dates below

Buying snapshot

Scroll sideways to see all columns. With a keyboard, focus this table and use the arrow keys.

Decision pointWhat PyTorch states

License

BSD-style license, as found in the LICENSE file of the PyTorch repository

Who is behind it

A community-driven project with engineers and researchers contributing; pytorch.org is the PyTorch Foundation site, copyright The Linux Foundation

Where to get help

Forums at discuss.pytorch.org, GitHub Issues for bug reports and install issues, the PyTorch Slack, plus docs and tutorials on pytorch.org

Where to run it

  • On your own machines. The pytorch.org installer builds a command from your OS, package, language and compute platform. The install options are in the table below.

  • On a cloud platform. pytorch.org lists quick-start options with cloud partners: Amazon SageMaker, AWS Deep Learning Containers and AWS Deep Learning AMIs; Google Cloud Deep Learning VM Image and Deep Learning Containers; Azure Machine Learning and Azure Functions; Lightning Studios; and Alibaba Cloud PAI.

  • Stable or Preview. Stable is the most currently tested and supported version. Preview gives nightly builds that are not fully tested and supported.

Ways to install PyTorch

Scroll sideways to see all columns. With a keyboard, focus this table and use the arrow keys.

PyTorch install options, as stated on pytorch.org and in the GitHub README

OptionWhat it coversRequirements

Pip (pytorch.org installer)

Linux, Mac or Windows, for Python. Compute platform: CUDA 11.8, CUDA 12.6, CUDA 12.8, ROCm 6.3 or CPU

Latest Stable requires Python 3.10 or later

LibTorch

A package option in the pytorch.org installer, for C++ projects

C++ only: pytorch.org notes that LibTorch is only available for C++

Build from source

Optional GPU support: NVIDIA CUDA with cuDNN v9.0 or above; AMD ROCm 4.0 and above, on Linux only; Intel GPU on Linux and Windows

Python 3.11 or later; a compiler that fully supports C++20 (gcc 11.3.0 or newer on Linux); Visual Studio or Visual Studio Build Tool on Windows

Docker image

Pre-built pytorch/pytorch:latest image from Docker Hub; the supplied Dockerfile builds images with CUDA 12.6 support and cuDNN v9

Docker v23.0 or later

NVIDIA Jetson

Python wheels for Jetson Nano, Jetson TX1/TX2, Jetson Xavier NX/AGX and Jetson AGX Orin, plus an L4T container

JetPack 4.2 and above

What you pay for

PyTorch ships under a BSD-style license, so the cost of using it sits in where it runs. PyTorch tensors can live on the CPU or the GPU, and the compute platform you pick in the installer (NVIDIA CUDA, AMD ROCm or CPU) decides the hardware you need.

On a cloud platform, pytorch.org says PyTorch is well supported on major clouds through prebuilt images, large scale training on GPUs and the ability to run models in a production scale environment.

What drives the bill

  • GPU or CPU. PyTorch accelerates computation when tensors live on the GPU. A CPU-only build runs computations on the CPU, not the GPU.

  • Distributed training. The torch.distributed backend enables scalable distributed training in research and production, with native support for asynchronous collective operations and peer-to-peer communication from Python and C++. The number of machines you scale to is part of the bill.

  • Serving models. pytorch.org presents TorchServe as a tool for deploying PyTorch models at scale. It is cloud and environment agnostic and supports multi-model serving, logging, metrics and RESTful endpoints. The servers it runs on are a running cost.

What to check before you commit

  • Source builds take time and disk. A source build needs at least 10 GB of free disk space and 30-60 minutes for the initial build; later rebuilds are much faster.

  • Shared memory in Docker. With torch multiprocessing, such as multithreaded data loaders, the default shared memory of a container is not enough. Raise it with --ipc=host or --shm-size.

  • Distributed on Windows. Distributed package support on Windows is a prototype feature and is subject to changes.

  • Mobile is experimental. pytorch.org marks the end-to-end workflow to iOS and Android deployment as Experimental.

Our take

If the BSD-style license passes your legal review, PyTorch is a compute decision, not a software purchase: choose the hardware platform or cloud service first, and the install path follows from it.

Evaluate this price

Sources