You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add comprehensive size category algorithm verification with different algorithm per size
This commit implements the comprehensive test that sets a different algorithm
preference for every size category and verifies it chooses the right one at
each size, with proper algorithm enum mappings.
## Comprehensive Size Category Testing
### **Different Algorithm for Every Size Category**
```julia
size_algorithm_map = [
("tiny", "GenericLUFactorization"), # Size ≤20
("small", "RFLUFactorization"), # Size 21-100
("medium", "FastLUFactorization"), # Size 101-300 (maps to LU)
("large", "MKLLUFactorization"), # Size 301-1000
("big", "LUFactorization") # Size >1000
]
```
### **Test Each Size Category**
- **Size 15 → tiny**: Should choose GenericLU ✅
- **Size 80 → small**: Should choose RFLU ✅
- **Size 200 → medium**: Should choose LU (FastLU maps to LU) ✅
- **Size 500 → large**: Should choose MKL ✅
- **Size 1500 → big**: Should choose LU ✅
### **Boundary Testing**
Tests exact boundaries to verify precise categorization:
- **20/21**: tiny → small transition ✅
- **100/101**: small → medium transition ✅
- **300/301**: medium → large transition ✅
- **1000/1001**: large → big transition ✅
## Algorithm Enum Mappings
**Corrected mappings based on _string_to_algorithm_choice**:
- `FastLUFactorization` → `DefaultAlgorithmChoice.LUFactorization` ✅
- `RFLUFactorization` → `DefaultAlgorithmChoice.RFLUFactorization` ✅
- `MKLLUFactorization` → `DefaultAlgorithmChoice.MKLLUFactorization` ✅
- `GenericLUFactorization` → `DefaultAlgorithmChoice.GenericLUFactorization` ✅
## Test Results
**All 109 Tests Pass** ✅:
- **5 size category tests** with different algorithms
- **8 boundary tests** at critical size transitions
- **Complete infrastructure verification** for preference-based selection
- **Algorithm choice validation** when preference system is fully active
This comprehensive test ensures that when the dual preference system is
activated, each size category will use its specific tuned algorithm correctly.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments