Validation and support

The manual executes its CPU teaching examples during the build. The package test suite and standalone reproducers check mathematical and device-specific contracts.

A successful example is not proof of accuracy for every model. A checked-in GPU script is not evidence that it passed on the current machine.

Executable support table

This table executes each example during the build. Every row checks 256 retained samples, finite values, sample and log-weight precision, and normalized weights. Adaptive examples use two rounds. The scalar Gaussian row also checks the exact self-target weight identity. These are execution checks, not accuracy benchmarks.

MethodChecked examplePrecisionCPUCUDAMetalReactant CPUReactant GPU
Plain ISscalar GaussianFloat32passednot runnot runnot runnot run
Plain ISfactor Student-tFloat64passednot runnot runnot runnot run
Static MIS: stratifiedfactor Gaussian bankFloat32passednot runnot runnot runnot run
Static MIS: randomfactor Gaussian bankFloat32passednot runnot runnot runnot run
Static MIS: standardfactor Gaussian bankFloat32passednot runnot runnot runnot run
Static MIS: partial DMfactor Gaussian bankFloat32passednot runnot runnot runnot run
AMISfactor GaussianFloat32passednot runnot runrestrictednot run
N-PMCscalar Student-tFloat32passednot runnot runnot runnot run
DM-PMC: globalfactor Gaussian bankFloat32passednot runnot runnot runnot run
DM-PMC: localfactor Gaussian bankFloat32passednot runnot runrestrictednot run
APISfactor Gaussian bankFloat32passednot runnot runrestrictednot run
CAISfactor Student-t bankFloat32passednot runnot runrestrictednot run
First-order GRAMISfactor Gaussian bank; supplied gradientFloat32passednot runnot runrestrictednot run
LAIS: RWMfactor Gaussian bankFloat32passednot runnot runnot runnot run
LAIS: RAMfactor Gaussian bank; four warmup movesFloat32passednot runnot runrestrictednot run
LAIS: SMHfactor Gaussian bank; Student-t upper proposalFloat32passednot runnot runrestrictednot run
Plain IS: named productscalar + correlated Gaussian vectorFloat32passednot runnot runnot runnot run
Plain IS: named batchsimplex + positive + identityFloat32passednot runnot runnot runnot run

The table covers only the stated examples. CUDA, Metal, and Reactant are not validated by this CPU build. A missing hardware run means unvalidated, not unsupported. passed denotes execution in this build. not run denotes no result from this build. restricted denotes a documented preflight restriction, not a hardware test. An optional-backend run reports rejected only after checking the expected exception reason. Devices lists deliberate restrictions, including Reactant CPU cooperative kernels and generic accelerator proposals.

Use Julia 1.13 or later. From the repository root, prepare the validation environment:

julia --project=validation -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.instantiate()'

Run the same checks on CUDA with julia --project=validation:

using CUDA, MLDataDevicesinclude("validation/support_table.jl")CUDA.allowscalar(false)device = MLDataDevices.with_eltype(MLDataDevices.CUDADevice(), nothing)print(SamplerSupportTable.checked_support_table(    backend=:cuda, device, isresident=x -> x isa CUDA.AnyCuArray,))

The checker verifies residency before explicit CPU readback. Any failed check stops table generation. Optional-backend checks below cover deeper numerical, reuse, statistics, and failure contracts.

Package tests

From a checkout:

julia --project -e 'using Pkg; Pkg.test()'

CPU CI covers Linux, macOS, and Windows. The CI configuration defines the tested Julia environments.

Accelerator checks are separate, explicit hardware runs. They do not run on the default hosted CPU CI jobs.

Equation and backend reproducers

Use the prepared validation environment:

julia --project=validation validation/reproducers/plain_is.jl
SubjectScript under validation/reproducers/
Plain IS identitiesplain_is.jl
Native Gaussian formulasnative_gaussian.jl
Simplex measure and Jacobiansimplex_transform.jl
Static MIS schemesstatic_mis.jl
AMIS recurrenceamis.jl
DM-PMC recurrencedm_pmc_global.jl
First-order GRAMIS equationsfirst_order_gramis.jl
CUDA samplerscuda_plain_is.jl, cuda_static_mis.jl, cuda_amis.jl, cuda_dm_pmc.jl
CUDA population methodscuda_apis.jl, cuda_cais.jl, cuda_npmc.jl, cuda_lais.jl
CUDA GRAMIScuda_first_order_gramis.jl
Student-t devicescuda_student_t.jl, metal_student_t.jl
Batch callbacksbatch_targets.jl
Reactant executionreactant_execution.jl

Read each script's setup before running optional-backend cases. Metal and Reactant checks need their respective packages and hardware. CPU LAIS recurrence checks are in test/lais.jl.

The CUDA GRAMIS wrapper additionally records a supplied source revision:

git status --short
git rev-parse HEAD
IMPORTANCE_SAMPLERS_SOURCE_COMMIT=PASTE_FULL_COMMIT_HERE julia --project=validation validation/reproducers/cuda_first_order_gramis.jl

Inspect the checkout and loaded package path first. The environment variable records a claim. It does not verify the loaded source.

Documentation build

julia --project=docs -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.instantiate()'
julia --project=docs docs/make.jl

Serve docs/build with an HTTP server to preview its directory-style URLs. The build executes CPU examples and doctests and checks exported docstrings and internal links. Check external links separately with DOCUMENTER_LINKCHECK=true julia --project=docs docs/make.jl. CI reports external-link failures without blocking deployment.

Repository source links are checked against local files to avoid repeated GitHub rate limits. Rendered source links use the build's Git commit. Local checks do not verify remote availability. CI deploys development documentation from dev and versioned documentation from release tags.

Validation records

Record the commit and tracked diff, Project.toml, Manifest.toml, command, seed, precision, counts, threads, device, and complete result.

For GPU checks, disable scalar indexing and verify array residency. Use a profiler to establish transfer or kernel claims. Source-level transfer counters cannot observe every runtime or vendor-library transfer.

For performance, also record compilation boundaries and machine load. Benchmarks separates accuracy, timing, and ESS diagnostics.