Skip to main content

Crate zer_lib

Crate zer_lib 

Source
Expand description

zer-lib, unified entity resolution library.

Provides Comparator, Scorer, and a Backend abstraction that selects GPU acceleration automatically when compiled with the cuda or vulkan features and suitable hardware is present. Without those features the crate compiles and runs entirely on CPU via zer-compare.

§Quick start

use zer_lib::prelude::*;

let schema = SchemaBuilder::new()
    .field("naam",  FieldKind::Name)
    .field("datum", FieldKind::Date)
    .build().unwrap();

let backend    = Backend::auto_detect();        // CUDA → Vulkan → AVX2 → CPU
let comparator = Comparator::new(&schema, &backend);
let scorer     = Scorer::new(&backend);

§Feature flags

Compute backends (mutually exclusive in practice; pick one):

FlagDescription
cudaNVIDIA CUDA via zer-compute, requires CUDA Toolkit 13.1+ and nvcc
vulkanVulkan 1.3 compute via zer-compute, requires slangc on PATH
avx2x86_64 AVX2 SIMD via zer-compute, no external toolchain required
cpuExplicit scalar CPU path via zer-compute (Rayon parallel)
debug-shadersEmbed debug info in CUDA kernels for cuda-gdb / Nsight (needs cuda)

Pipeline integration:

FlagDescription
pipelineEnable Pipeline, Ingester, and related types from zer-pipeline

Neural judge ORT execution providers (independent of compute backend):

FlagDescription
judge_cpuScalar CPU execution provider for ORT (no extra dependencies)
judge_cudaNVIDIA CUDA execution provider for ORT
judge_rocmAMD ROCm execution provider for ORT
judge_directmlWindows DirectML execution provider for ORT
judge_openvinoIntel OpenVINO execution provider for ORT

§CPU-only usage

Users who never need GPU can depend on zer-compare directly and never import this crate. zer_compare::FieldComparator and zer_compare::FellegiSunterScorer are the raw CPU implementations.

Re-exports§

pub use zer_blocking as blocking;
pub use zer_compare as compare;
pub use zer_core as core;
pub use zer_schema as schema;
pub use zer_cluster as cluster;

Modules§

prelude

Structs§

Backend
Opaque compute backend handle.
Comparator
Pairwise record comparator with automatic GPU/CPU selection.
Scorer
Fellegi-Sunter scorer with automatic GPU/CPU EM acceleration.