Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type stability when using Float32 #22

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SpinGlassTensors"
uuid = "7584fc6a-5a23-4eeb-8277-827aab0146ea"
authors = ["Anna Maria Dziubyna <[email protected]>", "Tomasz Śmierzchalski <[email protected]>", "Bartłomiej Gardas <[email protected]>", "Konrad Jałowiecki <[email protected]>", "Łukasz Pawela <[email protected]>", "Marek M. Rams <[email protected]>"]
version = "1.1.1"
version = "1.1.2"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
4 changes: 2 additions & 2 deletions src/linear_algebra_ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end
function qr_fact(
M::AbstractMatrix{T},
Dcut::Int = typemax(Int),
tol::T = eps();
tol::T = eps(T);
toGPU::Bool = true,
kwargs...,
) where {T<:Real}
Expand All @@ -44,7 +44,7 @@ end
function rq_fact(
M::AbstractMatrix{T},
Dcut::Int = typemax(Int),
tol::T = eps();
tol::T = eps(T);
toGPU::Bool = true,
kwargs...,
) where {T<:Real}
Expand Down
8 changes: 4 additions & 4 deletions src/mps/canonise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function truncate!(
ψ::QMps{T},
s::Symbol,
Dcut::Int = typemax(Int),
tolS::T = eps();
tolS::T = eps(T);
kwargs...,
) where {T<:Real}
@assert s ∈ (:left, :right)
Expand All @@ -46,12 +46,12 @@ canonise!(ψ::QMps, ::Val{:right}) = _left_sweep!(ψ, typemax(Int))
canonise!(ψ::QMps, ::Val{:left}) = _right_sweep!(ψ, typemax(Int))

function canonise_truncate!(
ψ::QMps,
ψ::QMps{T},
type::Symbol,
Dcut::Int = typemax(Int),
tolS = eps();
tolS::T = eps(T);
kwargs...,
)
) where {T<:Real}
if type == :right
_left_sweep!(ψ, Dcut, tolS; kwargs...)
elseif type == :left
Expand Down
Loading