#![cfg(test)]
use vyre::DispatchConfig;
use vyre::VyreBackend;
use vyre_driver_cuda::{CudaBackend, CudaBackendRegistration};
use vyre_primitives::predicate::edge_kind;
use weir::fixed_point_resident::{
FixedPointBorrowedResidentPlan, FixedPointResidentFrontierScratch, FixedPointResidentGraph,
FixedPointResidentGraphCache, FixedPointResidentPlan,
};
use weir::fixed_point_resident_batch::FixedPointResidentBatch;
use weir::oracle::graph::reaching_closure as reaching_closure_cpu;
use weir::reaching::{prepare_reaching_plan, reaching_closure_borrowed_via};
fn run_dispatch(
backend: &CudaBackend,
) -> impl Fn(&vyre::ir::Program, &[&[u8]], Option<[u32; 3]>) -> Result<Vec<Vec<u8>>, String> + '_ {
move |program, inputs, grid_override| {
let mut config = DispatchConfig::default();
config.grid_override = grid_override;
backend
.dispatch_borrowed(program, inputs, &config)
.map_err(|err| err.to_string())
}
}
fn live_dispatcher() -> CudaBackend {
CudaBackend::acquire()
.expect("CudaBackend::acquire failed on a host that must have an NVIDIA GPU.")
}
#[path = "reaching_closure_gpu_parity/closure_dispatch_contracts.rs"]
mod closure_dispatch_contracts;
#[path = "reaching_closure_gpu_parity/resident_batch_contracts.rs"]
mod resident_batch_contracts;
#[path = "reaching_closure_gpu_parity/resident_graph_contracts.rs"]
mod resident_graph_contracts;
#[path = "reaching_closure_gpu_parity/sequence_window_contracts.rs"]
mod sequence_window_contracts;