Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a dispatch for LinearAlgebra.norm2
`norm(@view x[..], 2)` was previously leading to a call of `LinearAlgebra.generic_norm2` which led to a scalar indexing. This catches such cuda subarray norm2 calls earlier. Inf-norm and p-norm with cuda subarrays still lead to the following dispatches: ```julia LinearAlgebra.generic_normInf(x) = float(mapreduce(norm, max, x)) LinearAlgebra.generic_norm1(x) = mapreduce(float ∘ norm, +, x) ``` I am not sure if there is a better way to dispatch the above. should resolve JuliaGPU#2280
- Loading branch information