@@ -41,10 +41,14 @@ MatrixAlgebraKit.supports_svd_full(::ROCSOLVER, f::Symbol) = f in (:qr_iteration
4141# rocSOLVER's `gesvd*_batched` functions take the batch as an array
4242# of device pointers, so a group of equally sized matrices
4343# doesn't need a copy into a 3D ROCArray.
44- MatrixAlgebraKit. supports_pointer_batch (:: AbstractAlgorithm , :: ROCSOLVER , :: Type{<:StridedROCMatrix{<:BlasFloat}} ) = true
45- MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_full!), :: AbstractAlgorithm , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
46- MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_compact!), :: AbstractAlgorithm , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
47- MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_vals!), :: AbstractAlgorithm , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
44+ # opt-in per algorithm to avoid picking up `DiagonalAlgorithm`
45+ # which doesn't support batching
46+ for alg in (:Bisection , :Jacobi , :QRIteration , :DivideAndConquer )
47+ @eval MatrixAlgebraKit. supports_pointer_batch (:: $alg , :: ROCSOLVER , :: Type{<:StridedROCMatrix{<:BlasFloat}} ) = true
48+ @eval MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_full!), :: $alg , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
49+ @eval MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_compact!), :: $alg , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
50+ @eval MatrixAlgebraKit. supports_ragged_batch (:: typeof (svd_vals!), :: $alg , :: ROCSOLVER , :: Type{<:AnyROCArray} ) = true
51+ end
4852
4953function gesvd! (:: ROCSOLVER , A:: StridedROCMatrix , S:: StridedROCVector , U:: StridedROCMatrix , Vᴴ:: StridedROCMatrix ; kwargs... )
5054 m, n = size (A)
0 commit comments