Skip to content

Commit 9c86de7

Browse files
Fix type check for mixed precision methods in tests
Use string matching to detect mixed precision methods instead of Union type to avoid issues with type availability during test compilation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent cb34d10 commit 9c86de7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/nopre/caching_allocation_tests.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
using LinearSolve, LinearAlgebra, SparseArrays, Test, StableRNGs
22
using AllocCheck
3-
using LinearSolve: AbstractDenseFactorization, AbstractSparseFactorization,
4-
MKL32MixedLUFactorization, OpenBLAS32MixedLUFactorization,
5-
AppleAccelerate32MixedLUFactorization, RF32MixedLUFactorization
3+
using LinearSolve: AbstractDenseFactorization, AbstractSparseFactorization
64
using InteractiveUtils
75

86
rng = StableRNG(123)
@@ -58,10 +56,8 @@ rng = StableRNG(123)
5856
end
5957

6058
# Mixed precision methods need looser tolerance
61-
is_mixed_precision = alg isa Union{MKL32MixedLUFactorization,
62-
OpenBLAS32MixedLUFactorization,
63-
AppleAccelerate32MixedLUFactorization,
64-
RF32MixedLUFactorization}
59+
# Check if algorithm name contains "32Mixed"
60+
is_mixed_precision = occursin("32Mixed", string(typeof(alg)))
6561
tol = is_mixed_precision ? 1e-5 : 1e-10
6662

6763
# Initialize the cache

0 commit comments

Comments
 (0)