From ff99e08e941fb27544e6890a1a63c38f558fb30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pawela?= Date: Mon, 21 Oct 2024 20:02:59 +0200 Subject: [PATCH] deps, CI and @tensor call updates for 1.11 --- .github/workflows/CI.yml | 1 + Project.toml | 8 ++++---- src/SpinGlassTensors.jl | 1 - src/contractions/dense.jl | 2 +- src/mps/utils.jl | 8 ++------ 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ceb073c..91644ca 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,6 +14,7 @@ jobs: version: - '1.9' - '1.10' + - '1.11' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 diff --git a/Project.toml b/Project.toml index 614577b..bee4023 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SpinGlassTensors" uuid = "7584fc6a-5a23-4eeb-8277-827aab0146ea" authors = ["Anna Maria Dziubyna ", "Tomasz Śmierzchalski ", "Bartłomiej Gardas ", "Konrad Jałowiecki ", "Łukasz Pawela ", "Marek M. Rams "] -version = "1.1.3" +version = "1.2.0" [deps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" @@ -25,9 +25,9 @@ Memoization = "0.2.1" NNlib = "0.9.13" SparseArrays = "1.9" TSVD = "0.4.4" -TensorOperations = "4" -cuTENSOR = "1.1.0" -julia = "1.9, 1.10" +TensorOperations = "5" +cuTENSOR = "2" +julia = "1.9, 1.10, 1.11" [extras] Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" diff --git a/src/SpinGlassTensors.jl b/src/SpinGlassTensors.jl index 636a463..8dde5aa 100644 --- a/src/SpinGlassTensors.jl +++ b/src/SpinGlassTensors.jl @@ -11,7 +11,6 @@ using DocStringExtensions using Base.Cartesian import Base.Prehashed -# using SpinGlassNetworks CUDA.allowscalar(false) diff --git a/src/contractions/dense.jl b/src/contractions/dense.jl index 959a73b..2c7f62f 100644 --- a/src/contractions/dense.jl +++ b/src/contractions/dense.jl @@ -5,7 +5,7 @@ const MatrixOrCuMatrix{R} = Union{ CuMatrix{R}, Matrix{R}, - Diagonal{R,CuArray{R,1,Mem.DeviceBuffer}}, + Diagonal{R,CuArray{R,1,CUDA.DeviceMemory}}, Diagonal{R,Vector{R}}, } diff --git a/src/mps/utils.jl b/src/mps/utils.jl index 047172a..78deb58 100644 --- a/src/mps/utils.jl +++ b/src/mps/utils.jl @@ -43,9 +43,7 @@ end function is_left_normalized(ψ::QMps, ::Val{true}) all( eye(eltype(ψ), size(A, 2); toGPU = true) ≈ @tensor( - Id[x, y] := A[α, x, σ] * A[α, y, σ]; - backend = cuTENSOR, - allocator = cuTENSOR + Id[x, y] := A[α, x, σ] * A[α, y, σ] ) for A ∈ values(ψ.tensors) # TODO: split the line ) end @@ -63,9 +61,7 @@ end function is_right_normalized(ψ::QMps, ::Val{true}) all( eye(eltype(ψ), size(B, 1); toGPU = true) ≈ @tensor( - Id[x, y] := B[x, α, σ] * B[y, α, σ]; - backend = cuTENSOR, - allocator = cuTENSOR + Id[x, y] := B[x, α, σ] * B[y, α, σ] ) for B ∈ values(ψ.tensors) # TODO: split the line ) end