PERF-2 P3-ii: the device V-cycle as the CG's preconditioner — poisson/device.rs (one CUDA runtime per process, persistent per-operator buffers, the mg_vcycle.cu kernels at K = 1; upload r, run the V-cycle, download z; the f64 CG unchanged), MultigridParameters::device, Prepared holds the device hierarchy, the CG driver destructures the prepared operator instead of cloning it; EmbeddedPisoSolver::set_poisson_device, overset pass-through, harness knob RTX_FSI2O_MG_DEVICE=1; export_levels factored out; the quarantine's dangling cfg attribute fixed
CI / Build CPU-Only (Explicit) (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 8s
CI / Format Check (push) Failing after 13s
CI / Build (ubuntu-latest) (push) Failing after 2m10s
CI / Clippy Check (push) Failing after 2m28s
Performance Benchmarks / Run Benchmarks (push) Successful in 3m18s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 8s
CI / Format Check (push) Failing after 13s
CI / Build (ubuntu-latest) (push) Failing after 2m10s
CI / Clippy Check (push) Failing after 2m28s
Performance Benchmarks / Run Benchmarks (push) Successful in 3m18s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJPeT6WA2e7YvAnS875AHL
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
3b7f8fb362
commit
fc556f8a88
@@ -180,6 +180,9 @@ pub struct EmbeddedPisoSolver {
|
||||
pcg_cache: std::cell::RefCell<super::poisson::PcgCache>,
|
||||
/// PERF-2 P2: threads for the multigrid's red-black maps (default 1).
|
||||
poisson_threads: usize,
|
||||
/// PERF-2 P3-ii: the V-cycle on the CUDA device (needs the `cuda`
|
||||
/// feature and the red-black smoother; default off).
|
||||
poisson_device: bool,
|
||||
moving: bool,
|
||||
/// Mask hysteresis band in multiples of the min cell size (0 = off).
|
||||
mask_hysteresis: f64,
|
||||
@@ -209,6 +212,7 @@ impl EmbeddedPisoSolver {
|
||||
poisson_profile: std::cell::Cell::new((0, 0, 0, 0)),
|
||||
pcg_cache: std::cell::RefCell::new(super::poisson::PcgCache::default()),
|
||||
poisson_threads: 1,
|
||||
poisson_device: false,
|
||||
moving: false,
|
||||
mask_hysteresis: 0.0,
|
||||
time: 0.0,
|
||||
@@ -234,6 +238,11 @@ impl EmbeddedPisoSolver {
|
||||
self.poisson_threads = threads.max(1);
|
||||
}
|
||||
|
||||
/// The V-cycle on the CUDA device (PERF-2 P3-ii; a regime, band-gated).
|
||||
pub fn set_poisson_device(&mut self, on: bool) {
|
||||
self.poisson_device = on;
|
||||
}
|
||||
|
||||
/// Mask hysteresis for the moving-body rebuild, as a fraction of the
|
||||
/// min cell size (default 0, exactly the plain rebuild). With a band,
|
||||
/// a cell within `band * h_min` of the surface keeps the
|
||||
|
||||
@@ -301,6 +301,7 @@ impl EmbeddedPisoSolver {
|
||||
precision: self.parameters.poisson_precision,
|
||||
smoother: self.parameters.poisson_smoother,
|
||||
threads: self.poisson_threads,
|
||||
device: self.poisson_device,
|
||||
..MultigridParameters::default()
|
||||
},
|
||||
inner_stop,
|
||||
|
||||
Reference in New Issue
Block a user