Calling norm on Hermitian typed ROCArrays leads to scalar indexing errors, because the generic_norm2 function is called under the hood.
Reproducer:
using AMDGPU
using LinearAlgebra
X = ROCArray(randn(Float64, 100, 40))
O = Hermitian(X' * X)
@show norm(O)
As a workaround, I currently use the following:
function LinearAlgebra.norm2(A::Hermitian{T, <:AMDGPU.ROCArray}) where {T}
upper_triangle = sum(abs2, triu(parent(A)))
diago = sum(abs2, diag(parent(A)))
sqrt(2upper_triangle - diago)
end
This issue is possibly related to #734.