rtx-cfd legacy GPU: kernel outputs were device-buffer CLONES (every write lost) — the buffers are borrowed mutably now; the Poisson kernels keep boundary Dirichlet values; tests: the advection pulse marched 50 steps, the Jacobi budget 20k, the reduction reference in f64
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Build CPU-Only (Explicit) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 5s
Documentation / Build API Documentation (push) Failing after 5s
CI / Format Check (push) Failing after 10s
CI / Build (ubuntu-latest) (push) Failing after 1m22s
CI / Clippy Check (push) Failing after 1m38s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m50s

This commit is contained in:
Omar Sobh
2026-09-16 07:28:42 -05:00
parent f3f6ac21fb
commit 0de750bad1
8 changed files with 58 additions and 62 deletions
@@ -46,17 +46,15 @@ mod cuda_tests {
d_phi = kernel_manager.copy_to_device(&phi)?;
// Run advection kernel
advection_kernel.apply(
&d_phi,
&mut d_phi_new,
velocity as f32,
dt as f32,
dx as f32,
)?;
// CFL = v dt / dx ≈ 0.1: march 50 steps so the pulse moves several cells.
for _ in 0..50 {
advection_kernel.apply(&d_phi, &mut d_phi_new, velocity as f32, dt as f32, dx as f32)?;
std::mem::swap(&mut d_phi, &mut d_phi_new);
}
// Copy result back
let mut result = vec![0.0f32; nx];
result = kernel_manager.copy_from_device(&d_phi_new)?;
result = kernel_manager.copy_from_device(&d_phi)?;
// Verify that the pulse has moved (mass conservation)
let initial_mass: f32 = phi.iter().sum();
@@ -206,7 +204,7 @@ mod cuda_tests {
d_source = kernel_manager.copy_to_device(&source)?;
// Solve Poisson equation
let max_iterations = 1000;
let max_iterations = 20_000; // Jacobi needs O(n²) sweeps on this grid
let tolerance = 1e-6;
let iterations = poisson_kernel.solve_2d(
&mut d_phi,