Skip to content

Backend And Algorithm Roadmap ​

This page records the Julia execution strategy behind the broader genomics, QTL, GLLVM, GPU, and HPC roadmap.

Status: roadmap. HSquared.jl currently exposes backend marker types, HSControl, and backend_info() as status and control metadata only. It does not dispatch model fitting to GPU, probe runtime device availability, benchmark backends, or test CPU/GPU numerical agreement yet.

Backend Vocabulary ​

The shared R/Julia backend names are:

Julia markerR/backend nameCurrent statusIntended first useNot yet
CPUBackend()cpuselectable metadata onlytrusted baseline for every supported modelproduction sparse optimizer
ThreadsBackend()threadsselectable metadata onlythreaded CPU loops, BLAS-heavy dense work, simulation batchesthreaded fitting dispatch
CUDABackend()cudafuture optional-extension markerNVIDIA HPC dense marker, factor, and response-matrix workloadsCUDA execution, tests, benchmarks
AMDGPUBackend()amdgpufuture optional-extension markerROCm/HPC accelerator lane after hardware testsAMD GPU execution, tests, benchmarks
MetalBackend()metalfuture optional-extension markerMac development smoke tests and dense accelerator experimentsMetal execution, tests, benchmarks
OneAPIBackend()oneapifuture optional-extension markerIntel accelerator experiments where hardware existsoneAPI execution, tests, benchmarks
AutoBackend()autoselection metadata onlylater benchmark- and capability-aware default choiceruntime probing, auto selection

backend_info() is the authoritative status diagnostic for the current package. All backend rows are selectable, execution unavailable, and planned.

Optional Extension Policy ​

CPU must remain reliable and always available. GPU packages must not become hard dependencies for ordinary animal models.

Potential Julia extension layout:

text
ext/HSquaredCUDAExt.jl
ext/HSquaredAMDGPUExt.jl
ext/HSquaredMetalExt.jl
ext/HSquaredOneAPIExt.jl

The extension gate is stricter than type availability:

  1. package extension loads;

  2. tiny numerical fixture passes;

  3. backend-specific diagnostics report device, precision, and memory;

  4. CPU/backend agreement test passes at declared tolerance;

  5. public claim row and validation-debt row are updated.

Until those gates exist, backend names are roadmap vocabulary only.

Work Placement ​

Work classPrimary backendReasonCurrent status
Pedigree validation, sorting, ID recodingCPUirregular graph and table workpartially implemented on CPU
Sparse Ainv constructionCPUsparse pedigree graph structureimplemented CPU utility
Symbolic sparse factorizationCPUirregular sparse structure and mature CPU librariesplanned
Small univariate animal modelsCPUtransfer overhead dominates accelerator benefitexperimental dense and supplied-variance sparse paths
Sparse MME solvesCPU first, hybrid latersparse direct/iterative solvers need robust preconditionerssupplied-variance solve only
Dense genomic matrix operationsGPU-friendlylarge dense matrix products and reductionsplanned
Marker matrix multiplicationGPU-friendlyhigh arithmetic intensity and batch structureplanned
Factor-analytic G matricesCPU now, GPU-friendly laterrepeated low-rank dense updatesexperimental dense validation-scale engine path exists; GPU/performance path planned
GLLVM likelihood blocksGPU-friendly laterlarge response matrices and low-rank factorsplanned
Simulation, bootstrap, cross-validationGPU-friendly laterindependent batchesplanned
Single-step with sparse A and dense Ghybridsparse pedigree plus dense genomic blockplanned

Do not assume GPU is faster. Backend choice must be benchmarked on the target model, data shape, precision, and hardware.

Algorithm Leads ​

These are development leads, not implemented algorithms unless a capability row says otherwise.

LeadIntended roleFirst gateCurrent status
Sparse Henderson MMEPhase 1 equation system and BLUP/EBV pathMrode-style supplied-variance and fitted-model fixturessupplied-variance solve exists
Sparse REML/ML objectiveproduction univariate animal-model likelihooddense/sparse equality plus Mrode validationsupplied-variance sparse REML identity exists
AI-REMLproduction variance-component optimizer candidatestable sparse objective, score, information, and step safeguardsplanned
EM or PX-EM warm startsrobust starting values for fragile variance componentsconvergence and bias checks on simulationsplanned
Newton or trust-region refinementfaster local convergence after stable startsobjective, gradient, information consistency checksplanned
PCG and block preconditionershuge mixed-model systemsidentical estimand against direct solves on smaller fixturesplanned
Takahashi selected inversionselected inverse entries, PEV, and reliability after sparse factorizationfactorization exists and selected entries match dense inverse on tiny fixturesplanned
Woodbury and determinant lemmalow-rank G matrices and GLLVM-style likelihood blocksequality to dense path on small matricesplanned
APY approximationlarge genomic and single-step relationship inverse approximationgenomic/single-step phase with comparator evidenceplanned

Local reference rule:

  • DRM.jl/src/takahashi_selinv.jl is an algorithm lead for selected sparse inverse entries after HSquared.jl has sparse factorizations.

  • GLLVM.jl/src/fit.jl and GLLVM.jl/src/structured_schur.jl are design leads for low-rank, profiled, Woodbury, and structured precision machinery.

These are not automatic copy sources. Any code reuse needs explicit license, provenance, tests, and fit-for-purpose review.

Numerical Policy ​

Default precision should be Float64 for REML and publication-quality variance components.

Float32 and mixed precision are later accelerator options for exploratory huge GLLVM, genomic, and scan workloads. They need explicit agreement tests, documented tolerances, seed handling, and nondeterminism notes before public use.

Every backend comparison should record:

  • hardware and operating system;

  • backend package and version;

  • precision;

  • records, animals, traits, markers, and nonzeros;

  • wall time and memory;

  • device memory where relevant;

  • log-likelihood, parameter, EBV, heritability, and G-matrix differences;

  • convergence status and gradient diagnostics.

Claim Gates ​

Allowed wording today:

  • backend names are recorded;

  • backend_info() reports planned/unavailable backend status;

  • CPU is the trusted default;

  • GPU, APY, AI-REML, Takahashi selected inverse, and GLLVM acceleration are roadmap targets.

Blocked wording today:

  • GPU execution works;

  • backend auto-selection works;

  • CPU and GPU agree;

  • HSquared.jl is faster than ASReml, JWAS, GLLVM.jl, or other comparators;

  • APY, AI-REML, or Takahashi selected inversion is implemented;

  • genomic/QTL/GLLVM models are fitted.

Rose audit rule: any future backend or algorithm promotion must update tests, Documenter, capability status, validation debt, the public claims register, check-log evidence, and an after-task report in the same slice.