rtx-cfd legacy GPU tests: the Jacobi Poisson test stops at 1e-4 (the accuracy check is the pin); rustfmt
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 / Python Bindings (maturin) (ubuntu-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
Documentation / Build User Guide (push) Successful in 7s
CI / Format Check (push) Failing after 13s
CI / Clippy Check (push) Failing after 13s
CI / Build CPU-Only (Explicit) (push) Failing after 14s
Documentation / Build API Documentation (push) Failing after 23s
CI / Build (ubuntu-latest) (push) Failing after 1m32s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m6s

This commit is contained in:
Omar Sobh
2026-09-16 07:32:30 -05:00
parent 1f77ec637a
commit 52fd40f8f2
2 changed files with 13 additions and 4 deletions
@@ -671,7 +671,8 @@ __global__ void d3q19_bounce_back_boundaries(
}
/// Get macroscopic variables at a specific point (copy from GPU)
pub fn gpu_macroscopic_variables_at(&mut self,
pub fn gpu_macroscopic_variables_at(
&mut self,
x: usize,
y: usize,
z: usize,
@@ -48,7 +48,13 @@ mod cuda_tests {
// Run advection kernel
// 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)?;
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);
}
@@ -204,8 +210,10 @@ mod cuda_tests {
d_source = kernel_manager.copy_to_device(&source)?;
// Solve Poisson equation
let max_iterations = 20_000; // Jacobi needs O(n²) sweeps on this grid
let tolerance = 1e-6;
// Jacobi needs O(n²) sweeps on this grid and its residual floor in f32 sits
// above 1e-6; the accuracy check below is the pin, the stop is loose.
let max_iterations = 20_000;
let tolerance = 1e-4;
let iterations = poisson_kernel.solve_2d(
&mut d_phi,
&d_source,