rtx-cfd/rtx-fsi PERF-2 P3-iii K-stream mode: each lane thread's device operator lives on its own CUDA stream (no rendezvous; set_plane_streams, RTX_FSI2O_PLANE_MODE=streams default | batch); stream-mode unit test digit-identical to the solo apply
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
CI / Format Check (push) Failing after 5s
CI / Clippy Check (push) Failing after 5s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 5s
Performance Benchmarks / Run Benchmarks (push) Failing after 17s
CI / Build CPU-Only (Explicit) (push) Failing after 2m59s
Documentation / Build API Documentation (push) Failing after 3m4s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-17 06:40:43 -05:00
co-authored by Claude Fable 5.1
parent 95ffde9591
commit 7e135893a2
4 changed files with 138 additions and 21 deletions
@@ -10,6 +10,9 @@
//! (the `p7_points.txt` format; `#` comments and blank lines skipped).
//! Without it the test returns.
//! - `RTX_FSI2O_PLANE_DIR`: each lane's CSV goes to `<dir>/<tag>.csv`.
//! - `RTX_FSI2O_PLANE_MODE`: `streams` (default; one CUDA stream per lane
//! thread, no rendezvous — the K-stream design) or `batch` (the
//! rendezvous: every lane inside a CG gathered into one batched launch).
//! - `RTX_FSI2O_PLANE_STACK_MB`: the lane threads' stack (default 64).
//! Requires `RTX_FSI2O_MG_RB=1 RTX_FSI2O_MG_DEVICE=1` on a
//! `--features rtx-cfd/cuda` build; the test fails loudly otherwise (a
@@ -21,7 +24,7 @@ mod fsi2_harness;
use fsi2_harness::overset_march::{OversetMarchConfig, run_march_overset};
use fsi2_harness::{BenchmarkCase, FSI2, FSI3};
use rtx_cfd::solvers::incompressible::{plane_counters, set_plane_lane};
use rtx_cfd::solvers::incompressible::{plane_counters, set_plane_lane, set_plane_streams};
use std::time::Instant;
struct Point {
@@ -80,6 +83,13 @@ fn fsi2_overset_plane() {
device_on,
"the plane needs RTX_FSI2O_MG_RB=1 RTX_FSI2O_MG_DEVICE=1 on a cuda build"
);
let mode = std::env::var("RTX_FSI2O_PLANE_MODE").unwrap_or_else(|_| "streams".into());
let streams = match mode.as_str() {
"streams" => true,
"batch" => false,
other => panic!("RTX_FSI2O_PLANE_MODE must be streams or batch, got {other:?}"),
};
set_plane_streams(streams);
let points = read_points(&points_path);
let k = points.len();
assert!(k >= 1, "no plane points in {points_path}");
@@ -113,7 +123,7 @@ fn fsi2_overset_plane() {
FSI2
};
println!(
" MARCH PLANE: {k} lanes in one process ({} base, ny {}, t_end {}, coupler {}, s = {}); points from {points_path}, CSVs under {dir}",
" MARCH PLANE: {k} lanes in one process, mode {mode} ({} base, ny {}, t_end {}, coupler {}, s = {}); points from {points_path}, CSVs under {dir}",
base.name, config.ny, config.t_end, config.coupler, config.subcycle
);
for (i, p) in points.iter().enumerate() {
@@ -176,7 +186,7 @@ fn fsi2_overset_plane() {
let plane_wall = t_plane.elapsed().as_secs_f64();
let (batches, served) = plane_counters();
println!(
" MARCH PLANE done: {k} lanes in {plane_wall:.0} s wall; {batches} batched V-cycle launches served {served} lane calls ({:.2} lanes per batch)",
" MARCH PLANE done: {k} lanes in {plane_wall:.0} s wall, mode {mode}; {batches} batched V-cycle launches served {served} lane calls ({:.2} lanes per batch)",
if batches > 0 {
served as f64 / batches as f64
} else {