-
-
Notifications
You must be signed in to change notification settings - Fork 72
Safety measures around AppleAccelerate #676
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -34,6 +34,8 @@ function aa_getrf!(A::AbstractMatrix{<:ComplexF64}; | |||||
ipiv = similar(A, Cint, min(size(A, 1), size(A, 2))), | ||||||
info = Ref{Cint}(), | ||||||
check = false) | ||||||
__appleaccelerate_isavailable() || | ||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A) | ||||||
check && chkfinite(A) | ||||||
chkstride1(A) | ||||||
|
@@ -54,6 +56,8 @@ function aa_getrf!(A::AbstractMatrix{<:ComplexF32}; | |||||
ipiv = similar(A, Cint, min(size(A, 1), size(A, 2))), | ||||||
info = Ref{Cint}(), | ||||||
check = false) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A) | ||||||
check && chkfinite(A) | ||||||
chkstride1(A) | ||||||
|
@@ -74,6 +78,8 @@ function aa_getrf!(A::AbstractMatrix{<:Float64}; | |||||
ipiv = similar(A, Cint, min(size(A, 1), size(A, 2))), | ||||||
info = Ref{Cint}(), | ||||||
check = false) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A) | ||||||
check && chkfinite(A) | ||||||
chkstride1(A) | ||||||
|
@@ -94,6 +100,8 @@ function aa_getrf!(A::AbstractMatrix{<:Float32}; | |||||
ipiv = similar(A, Cint, min(size(A, 1), size(A, 2))), | ||||||
info = Ref{Cint}(), | ||||||
check = false) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A) | ||||||
check && chkfinite(A) | ||||||
chkstride1(A) | ||||||
|
@@ -116,6 +124,8 @@ function aa_getrs!(trans::AbstractChar, | |||||
ipiv::AbstractVector{Cint}, | ||||||
B::AbstractVecOrMat{<:ComplexF64}; | ||||||
info = Ref{Cint}()) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A, ipiv, B) | ||||||
LinearAlgebra.LAPACK.chktrans(trans) | ||||||
chkstride1(A, B, ipiv) | ||||||
|
@@ -140,6 +150,8 @@ function aa_getrs!(trans::AbstractChar, | |||||
ipiv::AbstractVector{Cint}, | ||||||
B::AbstractVecOrMat{<:ComplexF32}; | ||||||
info = Ref{Cint}()) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A, ipiv, B) | ||||||
LinearAlgebra.LAPACK.chktrans(trans) | ||||||
chkstride1(A, B, ipiv) | ||||||
|
@@ -165,6 +177,8 @@ function aa_getrs!(trans::AbstractChar, | |||||
ipiv::AbstractVector{Cint}, | ||||||
B::AbstractVecOrMat{<:Float64}; | ||||||
info = Ref{Cint}()) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A, ipiv, B) | ||||||
LinearAlgebra.LAPACK.chktrans(trans) | ||||||
chkstride1(A, B, ipiv) | ||||||
|
@@ -190,6 +204,8 @@ function aa_getrs!(trans::AbstractChar, | |||||
ipiv::AbstractVector{Cint}, | ||||||
B::AbstractVecOrMat{<:Float32}; | ||||||
info = Ref{Cint}()) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
require_one_based_indexing(A, ipiv, B) | ||||||
LinearAlgebra.LAPACK.chktrans(trans) | ||||||
chkstride1(A, B, ipiv) | ||||||
|
@@ -236,6 +252,8 @@ end | |||||
|
||||||
function SciMLBase.solve!(cache::LinearCache, alg::AppleAccelerateLUFactorization; | ||||||
kwargs...) | ||||||
__appleaccelerate_isavailable() || | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [JuliaFormatter] reported by reviewdog 🐶
Suggested change
|
||||||
error("Error, AppleAccelerate binary is missing but solve is being called. Report this issue") | ||||||
A = cache.A | ||||||
A = convert(AbstractMatrix, A) | ||||||
if cache.isfresh | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[JuliaFormatter] reported by reviewdog 🐶