ITensor / ITensor/ITensorMPS.jl

[ITensors] [BUG] Bad performance of DMRG in AMD CPU

Open
#84 4 comments 0 reactions 1 assignee View on GitHub

@kmp5VT is already working on this.

Since Jan 16, 2024.

bug
Dominant language
Julia
Stars
85
Forks
27
Avg merge
22m
Merged PRs (30d)
1

Description

I was running the same code for DMRG in an M3 MacBook Pro and an AMD EPYC 7763 64-Core Processor server. The speed in EPYC is much slower than M3. I also tested the same code in my AMD R7 4800h laptop, the speed is faster than EPYC but slower than M3. I'm not sure whether this is a problem of AMD CPU or not. Is there any method to improve the performance?

This is the output in M3
image

And this one is in EPYC
image

Minimal code
My code is nothing but a simple DMRG

os = a 2D quantum spin model
N = 3 * 4 * 8
sites = siteinds("S=1/2", N)
H = MPO(os, sites)
psi0 = randomMPS(sites, 10)
energy, psi = dmrg(H, psi0; nsweeps=30, maxdim=60, cutoff=1E-5)

Version information

  • Output from versioninfo():
  • M3
julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M3
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 16 on 4 virtual cores
Environment:
  JULIA_NUM_THREADS = 16
  • EPYC
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 256 × AMD EPYC 7763 64-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver3)
  Threads: 128 on 256 virtual cores
Environment:
  JULIA_NUM_THREADS = 128
  • Output from using Pkg; Pkg.status("ITensors"):
  • M3
julia> using Pkg; Pkg.status("ITensors")
Status `~/.julia/environments/v1.9/Project.toml`
  [9136182c] ITensors v0.3.52
  • EPYC
julia> using Pkg; Pkg.status("ITensors")
Status `~/.julia/environments/v1.9/Project.toml`
  [9136182c] ITensors v0.3.52

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.