Expand description
GPU-native IFDS/IDE driver (G3).
Build a BFS step over the exploded supergraph:
use weir::ifds_gpu::{ifds_gpu_step, IfdsShape};
let shape = IfdsShape {
num_procs: 1, blocks_per_proc: 4, facts_per_proc: 4, edge_count: 4,
};
let step = ifds_gpu_step(shape, "fin", "fout").unwrap();GPU-native IFDS/IDE driver (G3).
§What this does
IFDS / IDE reframes interprocedural dataflow as reachability on
the exploded supergraph: each (proc, block, fact) triple
is a graph vertex; the analysis reduces to BFS + bitset-fixpoint
- primitives vyre already owns.
The pieces live in
vyre_primitives::graph::exploded (node encoding + CSR
builder), vyre_primitives::graph::csr_forward_traverse (BFS
step), and vyre_primitives::fixpoint::bitset_fixpoint
(convergence loop). This module composes them.
§Entry points
solve_cpu- in-process CPU reference. Conformance tests run this against the GPU output bit-for-bit.- [
solve_borrowed_via] - production solver route: builds the exploded CSR through GPU dispatch and reuses borrowed ProgramGraph buffers through the fixpoint loop. - [
ifds_gpu_step] - one BFS step over the exploded supergraph as a GPU [Program]. Caller dispatches this in a loop over(frontier_in, frontier_out)until the frontier stops growing (classic BFS-to-fixpoint). Allocates the exploded supergraph’sProgramGraphbuffers internally - the caller only provides the two frontier buffer names.
Structs§
- Ifds
Borrowed Solve Scratch - Caller-owned host scratch for repeated one-shot IFDS solves.
- IfdsGpu
- Marker type for the GPU-native IFDS dataflow primitive.
- Ifds
Prepare Scratch - Caller-owned host scratch for repeated IFDS CSR preparation.
- Ifds
Shape - Dispatch geometry for one IFDS BFS step on the GPU.
- Ifds
Solve Scratch - Caller-owned host scratch for repeated prepared IFDS solves.
- Prepared
Ifds Csr - Reusable IFDS exploded-supergraph CSR prepared once for many seed queries.
- Resident
Ifds Host Scratch - Caller-owned host scratch for repeated resident IFDS single-query solves.
- Resident
Ifds Parallel Host Scratch - Caller-owned host scratch for repeated resident IFDS parallel solves.
- Resident
Ifds Parallel Scratch - Reusable resident scratch buffers for parallel IFDS query batches.
- Resident
Ifds Scratch - Reusable resident IFDS scratch buffers.
- Resident
Prepared Ifds Csr - IFDS CSR and invariant ProgramGraph buffers uploaded once to a backend.
Constants§
- OP_ID
- Stable primitive id for Weir’s GPU-native IFDS fixpoint route.
Traits§
- Ifds
Resident Dispatch - Backend-neutral resident dispatch hooks for IFDS.
Functions§
- allocate_
resident_ ifds_ parallel_ scratch - Allocate reusable resident scratch buffers for parallel IFDS batch solves.
- allocate_
resident_ ifds_ parallel_ scratch_ with_ capacities - Allocate reusable resident scratch buffers for parallel IFDS batch solves with explicit query, iteration, and seed staging capacities.
- allocate_
resident_ ifds_ parallel_ scratch_ with_ iterations - Allocate reusable resident scratch buffers for parallel IFDS batch solves with an explicit convergence iteration budget.
- allocate_
resident_ ifds_ scratch - Allocate reusable resident scratch buffers for IFDS solves.
- allocate_
resident_ ifds_ scratch_ with_ seed_ capacity - Allocate reusable resident scratch buffers for IFDS solves with an explicit per-query seed fact staging capacity.
- free_
resident_ ifds_ parallel_ scratch - Free reusable parallel IFDS scratch buffers.
- free_
resident_ ifds_ scratch - Free reusable IFDS scratch buffers created by
allocate_resident_ifds_scratch. - free_
resident_ prepared_ ifds_ csr - Free invariant resident buffers created by
upload_prepared_ifds_csr_residentorprepare_ifds_csr_resident_via. - ifds_
gpu - Backwards-compatible three-string shim over
ifds_gpu_step. The_exploded_adjargument is the ProgramGraph’spg_edge_targetsbuffer; it is ignored here because the step kernel bindspg_edge_*at the canonical names. Kept so older call sites compile unchanged. - ifds_
gpu_ step - Emit one GPU BFS step over the exploded supergraph.
- prepare_
ifds_ csr_ borrowed_ via - Build and pack the invariant IFDS CSR once for repeated GPU solves.
- prepare_
ifds_ csr_ borrowed_ with_ scratch_ via - Prepare IFDS CSR buffers while reusing caller-owned dispatch output storage.
- prepare_
ifds_ csr_ resident_ via - Build, pack, and upload IFDS invariant CSR buffers once for resident solves.
- solve_
borrowed_ many_ via - Solve several IFDS seed sets through one borrowed-buffer GPU preparation.
- solve_
borrowed_ many_ with_ scratch_ via - Solve several IFDS seed sets through one borrowed-buffer GPU preparation, reusing all host-side preparation and fixpoint scratch across queries.
- solve_
borrowed_ via - Solve IFDS reachability through a caller-provided borrowed-buffer GPU dispatch.
- solve_
borrowed_ with_ scratch_ via - Solve IFDS reachability through a borrowed-buffer GPU dispatch while reusing all host-side preparation and fixpoint scratch across calls.
- solve_
prepared_ borrowed_ into_ via - Solve IFDS reachability over a prepared CSR while reusing caller-owned dispatch output storage across fixpoint iterations.
- solve_
prepared_ borrowed_ many_ with_ scratch_ into_ via - Solve several IFDS seed sets over one prepared CSR into caller-owned result rows while reusing all host-side solve scratch between queries.
- solve_
prepared_ borrowed_ many_ with_ scratch_ via - Solve several IFDS seed sets over one prepared CSR while reusing all host-side solve scratch between queries.
- solve_
prepared_ borrowed_ via - Solve IFDS reachability over a CSR prepared by [
prepare_ifds_csr_borrowed_via]. - solve_
prepared_ borrowed_ with_ adapter_ scratch_ via - Solve IFDS reachability over a prepared CSR while adapting a borrowed Vec-returning dispatch into caller-owned solve scratch.
- solve_
prepared_ borrowed_ with_ scratch_ into_ via - Solve IFDS reachability over a prepared CSR into caller-owned result storage while reusing all host-side solve scratch across calls.
- solve_
prepared_ borrowed_ with_ scratch_ via - Solve IFDS reachability over a prepared CSR while reusing all host-side frontier, decode, and backend-output scratch across calls.
- solve_
resident_ prepared_ many_ parallel_ via - Solve several IFDS seed queries against one resident CSR in parallel.
- solve_
resident_ prepared_ many_ parallel_ with_ scratch_ and_ host_ into_ via - Solve several IFDS seed queries in parallel using caller-owned reusable resident buffers, host packing/readback scratch, and result storage.
- solve_
resident_ prepared_ many_ parallel_ with_ scratch_ and_ host_ via - Solve several IFDS seed queries in parallel using caller-owned reusable resident buffers and caller-owned host packing/readback scratch.
- solve_
resident_ prepared_ many_ parallel_ with_ scratch_ via - Solve several IFDS seed queries in parallel using caller-owned reusable parallel-batch scratch buffers.
- solve_
resident_ prepared_ many_ via - Solve several IFDS seed queries against one resident CSR with one scratch frontier allocation and one scratch changed-flag allocation.
- solve_
resident_ prepared_ many_ with_ scratch_ and_ host_ into_ via - Solve several IFDS seed queries against one resident CSR using caller-owned reusable resident buffers, host packing/readback scratch, and result storage.
- solve_
resident_ prepared_ many_ with_ scratch_ into_ via - Solve several IFDS seed queries against one resident CSR using caller-owned reusable scratch buffers and caller-owned result storage.
- solve_
resident_ prepared_ many_ with_ scratch_ via - Solve several IFDS seed queries against one resident CSR using caller-owned reusable scratch buffers.
- solve_
resident_ prepared_ via - Solve IFDS reachability using resident CSR/frontier buffers.
- solve_
via - Solve IFDS reachability through a caller-provided owned-buffer GPU dispatch.
- upload_
prepared_ ifds_ csr_ resident - Upload an already prepared IFDS CSR into backend-resident buffers.
- validate_
ifds_ problem