rtx-cfd legacy GPU modules: the launches that already sat in unsafe blocks are not wrapped twice
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 4s
Performance Benchmarks / Run Benchmarks (push) Failing after 6s
CI / Build (ubuntu-latest) (push) Failing after 6s
CI / Build CPU-Only (Explicit) (push) Failing after 4s
CI / Clippy Check (push) Failing after 10s
Documentation / Build API Documentation (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 5s

This commit is contained in:
Omar Sobh
2026-09-16 07:20:51 -05:00
parent 7f4d437199
commit f429bdd415
4 changed files with 290 additions and 337 deletions
@@ -377,23 +377,21 @@ impl PisoGpuSolver {
};
unsafe {
unsafe {
self.kernel_manager
.stream()
.launch_builder(&func)
.arg(&mut buffers.mass_source)
.arg(u)
.arg(v)
.arg(&(density / dt))
.arg(&dx)
.arg(&dy)
.arg(&(buffers.nx as i32))
.arg(&(buffers.ny as i32))
.launch(config)
.map_err(|e| {
CfdError::gpu_error(&format!("Divergence kernel launch failed: {}", e))
})?;
}
self.kernel_manager
.stream()
.launch_builder(&func)
.arg(&mut buffers.mass_source)
.arg(u)
.arg(v)
.arg(&(density / dt))
.arg(&dx)
.arg(&dy)
.arg(&(buffers.nx as i32))
.arg(&(buffers.ny as i32))
.launch(config)
.map_err(|e| {
CfdError::gpu_error(&format!("Divergence kernel launch failed: {}", e))
})?;
}
self.kernel_manager.synchronize()?;
@@ -462,23 +460,21 @@ impl PisoGpuSolver {
let correction_factor = -dt / density;
unsafe {
unsafe {
self.kernel_manager
.stream()
.launch_builder(&func)
.arg(&buffers.pressure_correction)
.arg(&mut buffers.u_correction.clone())
.arg(&mut buffers.v_correction.clone())
.arg(&correction_factor)
.arg(&dx)
.arg(&dy)
.arg(&(buffers.nx as i32))
.arg(&(buffers.ny as i32))
.launch(config)
.map_err(|e| {
CfdError::gpu_error(&format!("Gradient kernel launch failed: {}", e))
})?;
}
self.kernel_manager
.stream()
.launch_builder(&func)
.arg(&buffers.pressure_correction)
.arg(&mut buffers.u_correction.clone())
.arg(&mut buffers.v_correction.clone())
.arg(&correction_factor)
.arg(&dx)
.arg(&dy)
.arg(&(buffers.nx as i32))
.arg(&(buffers.ny as i32))
.launch(config)
.map_err(|e| {
CfdError::gpu_error(&format!("Gradient kernel launch failed: {}", e))
})?;
}
self.kernel_manager.synchronize()?;