Skip to content

Commit 9245c58

Browse files
committed
Make supports_ragged_batch false by default
1 parent d5dd6fa commit 9245c58

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎ext/MatrixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ MatrixAlgebraKit.supports_svd_full(::ROCSOLVER, f::Symbol) = f in (:qr_iteration
4242
# of device pointers, so a group of equally sized matrices
4343
# doesn't need a copy into a 3D ROCArray.
4444
MatrixAlgebraKit.supports_pointer_batch(::AbstractAlgorithm, ::ROCSOLVER, ::Type{<:StridedROCMatrix{<:BlasFloat}}) = true
45+
MatrixAlgebraKit.supports_ragged_batch(f!, ::AbstractAlgorithm, ::ROCSOLVER, ::Type{<:AnyROCArray}) = true
4546

4647
function gesvd!(::ROCSOLVER, A::StridedROCMatrix, S::StridedROCVector, U::StridedROCMatrix, Vᴴ::StridedROCMatrix; kwargs...)
4748
m, n = size(A)

‎ext/MatrixAlgebraKitCUDAExt/MatrixAlgebraKitCUDAExt.jl‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ MatrixAlgebraKit.supports_svd_full(::CUSOLVER, f::Symbol) = f in (:qr_iteration,
4242

4343
# `cusolverDnXgesvdjBatched` only accepts matrices up to 32x32
4444
MatrixAlgebraKit.max_batched_blocksize(::AbstractAlgorithm, ::CUSOLVER, ::Type{<:AnyCuArray}) = 32
45+
# CUSOLVER only provides a batched kernel for `Jacobi`
46+
MatrixAlgebraKit.supports_ragged_batch(f!, ::Jacobi, ::CUSOLVER, ::Type{<:AnyCuArray}) = true
4547

4648
function gesvd!(::CUSOLVER, A::StridedCuMatrix, S::StridedCuVector, U::StridedCuMatrix, Vᴴ::StridedCuMatrix; kwargs...)
4749
m, n = size(A)

‎src/batches.jl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ batched_adjoint(A::AbstractVector{<:AbstractMatrix}) = map(a -> adjoint!(similar
2020
supports_ragged_batch(f!, alg::AbstractAlgorithm, driver::Driver, T::Type) -> Bool
2121
2222
Whether the algorithm `alg` running on `driver` accepts a *ragged* batch of matrices
23-
of type `T` which do not have uniform size for function `f!`. `true` by default.
23+
of type `T` which do not have uniform size for function `f!`. `false` by default.
2424
"""
25-
supports_ragged_batch(f!, alg::AbstractAlgorithm, driver::Driver, ::Type) = true
25+
supports_ragged_batch(f!, alg::AbstractAlgorithm, driver::Driver, ::Type) = false
2626
supports_ragged_batch(f!, alg::AbstractAlgorithm, ::DefaultDriver, ::Type{TA}) where {TA} =
2727
supports_ragged_batch(f!, alg, default_driver(alg, TA), TA)
2828

0 commit comments

Comments
 (0)