Skip to main content

softgpu_functional/
lib.rs

1//! SoftGPU Phase 6 functional execution (CPU) + Phase 7 GPU semantic machine
2//! + Phase 8 sanitizers + Phase 9 debugger.
3//!
4//! **Research gate (locked):** SoftGPU Functional IR (`softgpu-sfir-v1`) — an
5//! explicit, SoftGPU-owned IR. Phase 7 adds SoftGPU software waves/lanes, group
6//! memory, barriers, structured divergence, and selected atomics. Phase 8 adds
7//! a declared SoftGPU happens-before sanitizer subset. Phase 9 adds versioned
8//! traces, breakpoints, inspection, and seeded schedule exploration. SoftGPU
9//! does **not** claim gfx1201 ISA emulation.
10//!
11//! See `docs/functional-path.md` and Articles 7–10.
12
13pub mod debug;
14pub mod error;
15pub mod exec;
16pub mod ir;
17pub mod kernels;
18pub mod memory;
19pub mod sanitize;
20
21pub use debug::{
22    explore_and_minimize_race, inspect_sanitizer_finding, parse_trace_jsonl, run_debug, Breakpoint,
23    DebugAction, DebugRunReport, DebugSession, DebugStop, ExecObserver, ExploreReport,
24    ExploreTrial, NoopObserver, StateSnapshot, TraceEvent, TraceLog, DEBUG_TRACE_SCHEMA,
25    DEFAULT_TRACE_EVENT_BUDGET, MAX_TRACE_BYTES, MAX_TRACE_LINE_BYTES,
26};
27pub use error::{FunctionalError, Result};
28pub use exec::{
29    run, run_with_budget, run_with_config, run_with_config_sanitized, run_with_observer,
30    run_with_sanitizer, ExecConfig, LaunchConfig, RunReport, SchedulePolicy, DEFAULT_WAVE_SIZE,
31    FUNCTIONAL_MODE_MARKER, MAX_GROUP_BYTES,
32};
33pub use ir::{
34    load_program_path, load_program_str, AddrSpace, AtomicOrder, AtomicScope, Op, Program, TypeId,
35    SFIR_SCHEMA,
36};
37pub use memory::GlobalArena;
38pub use sanitize::{
39    Finding, FindingKind, ReplayBundle, SanitizeMode, SanitizeReport, Sanitizer, WorkItemId,
40    MAX_SHADOW_BYTES, SANITIZER_REPLAY_SCHEMA,
41};
42
43/// Crate version.
44pub const VERSION: &str = env!("CARGO_PKG_VERSION");