algeon_datafusion/lib.rs
1#![doc = include_str!("../README.md")]
2//!
3//! ## Entry points
4//!
5//! | Step | Type | Module |
6//! | --- | --- | --- |
7//! | Build one backend per process | [`AlgeonGpuBackend`] | [`backend`] |
8//! | Install it on a session builder | [`AlgeonGpuBackend::install_on`], [`AlgeonSessionStateBuilderExt`](session::AlgeonSessionStateBuilderExt) | [`session`] |
9//! | Run one query | [`AlgeonAttempt`] | [`attempt`] |
10//!
11//! The backend builder fixes the device envelope at construction. Each
12//! attempt plans and executes one query, then publishes a terminal report
13//! through [`AlgeonAttempt::completion`]. Under
14//! [`AlgeonGpuExecutionMode::NativeRequired`](planner::AlgeonGpuExecutionMode::NativeRequired)
15//! the optimizer rejects a completed plan that still executes DataFusion CPU
16//! operators.
17//!
18//! ## Other modules
19//!
20//! | Purpose | Modules |
21//! | --- | --- |
22//! | SQL table functions | [`cugraph_sql`], [`cuvs_sql`], [`cuml_sql`], [`gpu_functions`] |
23//! | Reports and diagnostics | [`report`], [`native_report`], [`gpu_coverage`], [`observability`], [`build_info`] |
24//! | Errors and reason codes | [`error`], [`capability`] |
25//! | Plan structures exposed for tooling | [`planner`], [`native_exec`], [`source_cardinality`] |
26//! | Flight SQL server, feature `server` | `server` |
27//!
28//! ## Features
29//!
30//! The table under Dependencies lists what each feature adds and the native
31//! libraries it links. With a feature disabled:
32//!
33//! - `cugraph`: cuGraph table functions fail closed with a typed capability
34//! error.
35//! - `cuvs`, `cuml`: the SQL family stays discoverable and execution fails
36//! before input staging.
37//! - `nvml`: device telemetry reports `FeatureDisabled` for NVML and leaves
38//! the NVML values `None`. CUDA telemetry, admission and memory accounting
39//! do not change.
40//! - `server`: the `server` module is absent.
41//!
42//! `bench-support` and `qualification` serve tooling in the Algeon repository.
43//! The first adds application and test support outside the embedded and
44//! server report contract; the second closes admission on one live device
45//! ledger for the multi-GPU validation tool.
46
47#![cfg_attr(docsrs, feature(doc_cfg))]
48#![deny(missing_docs)]
49
50#[cfg(test)]
51extern crate self as algeon_datafusion;
52
53pub mod attempt;
54pub mod backend;
55pub mod build_info;
56pub mod capability;
57#[cfg(all(test, any(feature = "cugraph", feature = "server")))]
58#[path = "../tests/support/closing_backend.rs"]
59mod closing_backend;
60pub mod cugraph_sql;
61pub mod cuml_sql;
62pub mod cuvs_sql;
63pub mod error;
64mod final_plan_observation;
65pub mod gpu_coverage;
66pub mod gpu_functions;
67mod gpu_query_planner;
68mod name_suggestion;
69mod native;
70pub mod native_exec;
71pub mod native_report;
72pub mod observability;
73mod physical_plan;
74pub mod planner;
75pub mod report;
76mod s3_storage;
77#[cfg(feature = "server")]
78pub mod server;
79pub mod session;
80pub mod source_cardinality;
81
82pub use attempt::{AlgeonAttempt, AttemptOptions};
83pub use backend::{AlgeonGpuBackend, AlgeonGpuDeviceConfig, AlgeonGpuDeviceProfile, GpuMemoryOwnership};