Unity
Unity
About
News
Events
Docs
Contact Us
code
search
login
Unity
Unity
About
News
Events
Docs
Contact Us
dark_mode
light_mode
code login
search

Documentation

  • Requesting An Account
  • Get Started
    • Quick Start
    • Common Terms
    • HPC Resources
    • Theory of HPC
      • Overview of threads, cores, and sockets in Slurm for HPC workflows
    • Git Guide
  • Connecting to Unity
    • SSH
    • Unity OnDemand
    • Connecting to Desktop VS Code
  • Get Help
    • Frequently Asked Questions
    • How to Ask for Help
    • Troubleshooting
  • Cluster Specifications
    • Node List
    • Partition List
    • Storage
    • Node Features (Constraints)
      • NVLink and NVSwitch
    • CPU Summary List
    • GPU Summary List
  • Managing Files
    • Command Line Interface (CLI)
    • Disk Quotas
    • FileZilla
    • Globus
    • RStor Research Storage System
      • Managing RStor Shares
      • RStor Usage
      • The Allocation Portal
    • Scratch: HPC Workspace
    • Unity OnDemand File Browser
  • Submitting Jobs
    • Batch Jobs
      • Array Batch Jobs
      • Large Job Counts
      • Monitor a batch job
    • Helper Scripts
    • Interactive CLI Jobs
    • Unity OnDemand
    • Message Passing Interface (MPI)
    • Slurm cheat sheet
  • Software Management
    • Building Software from Scratch
    • Conda
    • Modules
      • Module Usage
    • Renv
    • Unity OnDemand
      • JupyterLab OnDemand
    • Venv
  • Tools & Software
    • ColabFold
    • PyTorch
    • R
      • R Parallelization
    • Unity GPUs
  • Datasets
    • AI and ML
      • Aleph-Alpha
      • Alibaba-NLP
      • Allen AI
      • AlpacaFarm
      • Amass
      • Audioset
      • BAAI
      • Bigcode
      • Biomed Clip
      • Blip 2
      • Bloom
      • ByteDance
      • COCO
      • Code Llama
      • DeepAccident
      • DeepSeek
      • DeSTA
      • Diffa
      • DINO v2
      • epic-kitchens
      • Falcon
      • Florence
      • FLUX.1 Kontext
      • Fomo
      • Gemma
      • Genmo
      • Glm
      • GPT
      • HiDream-I1
      • Ibm Granite
      • Idefics2
      • Imagenet 1K
      • Inaturalist
      • Infly
      • InternLM
      • Internvl3-8b-hf
      • Intfloat
      • Kinetics
      • LG
      • Linq
      • Llama2
      • Llama3
      • Llama4
      • Llava_OneVision
      • LLM-compiler
      • LMSys
      • Lumina
      • Mims
      • Mixtral
      • Monai
      • Moonshot-ai
      • Msmarco
      • Natural-questions
      • Nvidia
      • Objaverse
      • Openai-whisper
      • Perplexity AI
      • Phi
      • Playgroundai
      • Pythia
      • Qwen
      • Qwen2
      • Qwen3
      • Rag-sequence-nq
      • S1-32B
      • Scalabilityai
      • Sft
      • SlimPajama
      • T5
      • Tulu
      • V2X
      • Video-MAE
      • Vit
      • Wildchat
    • Bioinformatics
      • AlphaFold3 Databases
      • BFD/MGnify
      • Big Fantastic Database
      • checkm
      • ColabFoldDB
      • Databases for ColabFold
      • dfam
      • EggNOG - version 5.0
      • EggNOG - version 6.0
      • EVcouplings databases
      • Genomes from NCBI RefSeq database
      • GMAP-GSNAP database (human genome)
      • GTDB
      • Illumina iGenomes
      • Kraken2
      • MGnify
      • NCBI BLAST databases
      • NCBI RefSeq database
      • Parameters of AlphaFold
      • Parameters of Evolutionary Scale Modeling (ESM) models
      • PDB70
      • PINDER
      • PLINDER
      • Protein Data Bank
      • Protein Data Bank database in mmCIF format
      • Protein Data Bank database in SEQRES records
      • Tara Oceans 18S amplicon
      • Tara Oceans MATOU gene catalog
      • Tara Oceans MGT transcriptomes
      • Tattabio
      • Uniclust30
      • UniProtKB
      • UniRef100
      • UniRef30
      • UniRef90
      • Updated databases for ColabFold
    • Using HuggingFace Datasets

Documentation

  • Requesting An Account
  • Get Started
    • Quick Start
    • Common Terms
    • HPC Resources
    • Theory of HPC
      • Overview of threads, cores, and sockets in Slurm for HPC workflows
    • Git Guide
  • Connecting to Unity
    • SSH
    • Unity OnDemand
    • Connecting to Desktop VS Code
  • Get Help
    • Frequently Asked Questions
    • How to Ask for Help
    • Troubleshooting
  • Cluster Specifications
    • Node List
    • Partition List
    • Storage
    • Node Features (Constraints)
      • NVLink and NVSwitch
    • CPU Summary List
    • GPU Summary List
  • Managing Files
    • Command Line Interface (CLI)
    • Disk Quotas
    • FileZilla
    • Globus
    • RStor Research Storage System
      • Managing RStor Shares
      • RStor Usage
      • The Allocation Portal
    • Scratch: HPC Workspace
    • Unity OnDemand File Browser
  • Submitting Jobs
    • Batch Jobs
      • Array Batch Jobs
      • Large Job Counts
      • Monitor a batch job
    • Helper Scripts
    • Interactive CLI Jobs
    • Unity OnDemand
    • Message Passing Interface (MPI)
    • Slurm cheat sheet
  • Software Management
    • Building Software from Scratch
    • Conda
    • Modules
      • Module Usage
    • Renv
    • Unity OnDemand
      • JupyterLab OnDemand
    • Venv
  • Tools & Software
    • ColabFold
    • PyTorch
    • R
      • R Parallelization
    • Unity GPUs
  • Datasets
    • AI and ML
      • Aleph-Alpha
      • Alibaba-NLP
      • Allen AI
      • AlpacaFarm
      • Amass
      • Audioset
      • BAAI
      • Bigcode
      • Biomed Clip
      • Blip 2
      • Bloom
      • ByteDance
      • COCO
      • Code Llama
      • DeepAccident
      • DeepSeek
      • DeSTA
      • Diffa
      • DINO v2
      • epic-kitchens
      • Falcon
      • Florence
      • FLUX.1 Kontext
      • Fomo
      • Gemma
      • Genmo
      • Glm
      • GPT
      • HiDream-I1
      • Ibm Granite
      • Idefics2
      • Imagenet 1K
      • Inaturalist
      • Infly
      • InternLM
      • Internvl3-8b-hf
      • Intfloat
      • Kinetics
      • LG
      • Linq
      • Llama2
      • Llama3
      • Llama4
      • Llava_OneVision
      • LLM-compiler
      • LMSys
      • Lumina
      • Mims
      • Mixtral
      • Monai
      • Moonshot-ai
      • Msmarco
      • Natural-questions
      • Nvidia
      • Objaverse
      • Openai-whisper
      • Perplexity AI
      • Phi
      • Playgroundai
      • Pythia
      • Qwen
      • Qwen2
      • Qwen3
      • Rag-sequence-nq
      • S1-32B
      • Scalabilityai
      • Sft
      • SlimPajama
      • T5
      • Tulu
      • V2X
      • Video-MAE
      • Vit
      • Wildchat
    • Bioinformatics
      • AlphaFold3 Databases
      • BFD/MGnify
      • Big Fantastic Database
      • checkm
      • ColabFoldDB
      • Databases for ColabFold
      • dfam
      • EggNOG - version 5.0
      • EggNOG - version 6.0
      • EVcouplings databases
      • Genomes from NCBI RefSeq database
      • GMAP-GSNAP database (human genome)
      • GTDB
      • Illumina iGenomes
      • Kraken2
      • MGnify
      • NCBI BLAST databases
      • NCBI RefSeq database
      • Parameters of AlphaFold
      • Parameters of Evolutionary Scale Modeling (ESM) models
      • PDB70
      • PINDER
      • PLINDER
      • Protein Data Bank
      • Protein Data Bank database in mmCIF format
      • Protein Data Bank database in SEQRES records
      • Tara Oceans 18S amplicon
      • Tara Oceans MATOU gene catalog
      • Tara Oceans MGT transcriptomes
      • Tattabio
      • Uniclust30
      • UniProtKB
      • UniRef100
      • UniRef30
      • UniRef90
      • Updated databases for ColabFold
    • Using HuggingFace Datasets

On this page

  • Quick Start
  • PyTorch and the CUDA version
  1. Unity
  2. Documentation
  3. Tools & Software
  4. PyTorch

Installing PyTorch

Quick Start

Before installing PyTorch on Unity, create and activate an environment (venv, conda, or your preferred Python package manager). If using conda, ensure you run conda install pip to allow installation of pip packages into your conda environment. Once your environment is set up, run:

pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126

This command installs PyTorch into your environment.

Do not run this command (or any other pip install) outside of a virtual environment. Installing PyTorch globally can interfere with existing workflows. The command above installs PyTorch with CUDA 12.6, which is compatible with Unity. The section below provides additional details on how the selected CUDA version impacts PyTorch.

PyTorch and the CUDA version

Let’s build a high-level understanding of how PyTorch interacts with GPU hardware.

  1. PyTorch operations invoke
  2. CUDA libraries such as the CUDA runtime, cuDNN, cuBLAS, and NCCL.
  3. These libraries generate CUDA kernel calls.
  4. The NVIDIA driver translates those kernel calls into low-level GPU hardware function calls.

For this call stack, there are four versions to keep in mind:

  • The PyTorch version
  • The CUDA version bundled with PyTorch
  • The NVIDIA driver version
  • The GPU hardware version (compute capability)

On Unity, the GPU hardware and the NVIDIA driver are fixed. The only versions you control are:

  • Which PyTorch version you install
  • Which CUDA bundle that PyTorch wheel uses

The PyTorch version determines which high-level Python features are available and is usually driven by your application requirements. Here, we focus on the impact of the CUDA version.

As a general rule, older CUDA versions will work with newer NVIDIA drivers. However, newer CUDA versions may not work with older NVIDIA drivers. Because the NVIDIA driver on Unity is fixed, you must ensure that the CUDA version you choose is supported by the system.

View which CUDA versions are natively supported on Unity by running: module available cuda

PyTorch CUDA Modules Diagram

CUDA Modules

Using a newer CUDA version than those listed may cause compatibility issues with the NVIDIA drivers on Unity.

A second source of incompatibility is GPU compute capability (CC). Compute capability is NVIDIA’s architectural version that defines which hardware features the GPU supports, such as Tensor Cores, BF16, and ultimately which CUDA kernels can execute on that device. You can think of CC as a hardware capability across the GPU generations.

Each CUDA version only supports a limited range of compute capabilities, as shown:

PyTorch CUDA Versions Diagram

CUDA Versions

Unity includes a wide range of GPUs, from older Maxwell cards to newer architectures such as Ada, Ampere, and Hopper. CUDA 12.6 is the recommended version and is compatible with all GPUs on Unity; however, it may result in reduced performance on older Maxwell-series cards.

If your workloads rely heavily on older GPUs, consider using CUDA 11.8 to improve performance on those systems.

stylus_note
Certain PyTorch features, such as reduced-precision operations, are not supported on older GPUs due to compute capability limitations.
Last modified: Friday, March 6, 2026 at 11:20 AM. See the commit on GitLab.
University of Massachusetts Amherst University of Massachusetts Amherst University of Rhode Island University of Rhode Island University of Massachusetts Dartmouth University of Massachusetts Dartmouth University of Massachusetts Lowell University of Massachusetts Lowell University of Massachusetts Boston University of Massachusetts Boston Mount Holyoke College Mount Holyoke College Smith College Smith College Olin College of Engineering Olin College of Engineering
search
close