ITensorsGPU: Intelligent Tensors with GPU acceleration
This package extends the functionality of ITensors.jl to make use of CUDA-enabled GPUs to accelerate tensor contractions and factorizations. It sits on top of the wonderful CUDA.jl package and uses NVIDIA's cuTENSOR library for high-performance tensor operations.
- Julia 1.3 or later
- CUDA 10.1 or later -- Currently only NVIDIA GPUs are supported. NVIDIA drivers are required so that Julia can make use of the NVIDIA GPU on your system.
- cuTENSOR v1.0.0 or later -- A specialized library for perfoming permutation-free tensor contractions on the GPU.
libcutensor.soneeds to be in your
CUDA.jlwill be able to find it.
To properly install CUDA with Julia, it may be helpful to first follow the CUDA.jl installation instructions and test that you have that installed properly and that it is able to use
cuTENSOR. You can run the commands:
julia> using CUDA.CUTENSOR julia> CUTENSOR.has_cutensor() true julia> CUTENSOR.version() v"1.2.1"
to check that
CUDA.jl can see the version of
cuTENSOR you have installed.
Once you have all of the dependencies installed, you can then go ahead and install
ITensorsGPU.jl with the following command:
julia> ] pkg> add https://github.com/ITensor/ITensorsGPU.jl.git
To check if this has all worked, you can run the package tests using:
julia> ] pkg> test ITensorsGPU
Take a look at the
examples/ directory for examples of running ITensor calculations on the GPU.
For an application of
ITensorsGPU.jl to more sophisticated tensor network calculations, take a look at PEPS.jl.
For some background on the development and design of this package, you can take a look at this blog post by Katie Hyatt, original author of the