rtx-cfd legacy GPU: per-block buffer mutability; the D3Q19 getters extract before borrowing
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
Performance Benchmarks / Run Benchmarks (push) Failing after 7s
CI / Build (ubuntu-latest) (push) Failing after 7s
CI / Clippy Check (push) Failing after 7s
Documentation / Build API Documentation (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 6s
CI / Build CPU-Only (Explicit) (push) Failing after 1m11s
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
Performance Benchmarks / Run Benchmarks (push) Failing after 7s
CI / Build (ubuntu-latest) (push) Failing after 7s
CI / Clippy Check (push) Failing after 7s
Documentation / Build API Documentation (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 6s
CI / Build CPU-Only (Explicit) (push) Failing after 1m11s
This commit is contained in:
@@ -284,7 +284,7 @@ impl PisoGpuSolver {
|
|||||||
let iterations = {
|
let iterations = {
|
||||||
let buffers = self
|
let buffers = self
|
||||||
.gpu_buffers
|
.gpu_buffers
|
||||||
.as_ref()
|
.as_mut()
|
||||||
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
||||||
self.poisson_kernel.solve_2d(
|
self.poisson_kernel.solve_2d(
|
||||||
&mut buffers.pressure_correction,
|
&mut buffers.pressure_correction,
|
||||||
@@ -303,7 +303,7 @@ impl PisoGpuSolver {
|
|||||||
{
|
{
|
||||||
let buffers = self
|
let buffers = self
|
||||||
.gpu_buffers
|
.gpu_buffers
|
||||||
.as_ref()
|
.as_mut()
|
||||||
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
||||||
self.matrix_ops_kernel
|
self.matrix_ops_kernel
|
||||||
.axpy(1.0, &buffers.pressure_correction, &mut buffers.p)?;
|
.axpy(1.0, &buffers.pressure_correction, &mut buffers.p)?;
|
||||||
|
|||||||
@@ -731,12 +731,12 @@ __global__ void d3q19_bounce_back_boundaries(
|
|||||||
|
|
||||||
/// Calculate total mass on GPU
|
/// Calculate total mass on GPU
|
||||||
pub fn gpu_total_mass(&mut self) -> CfdResult<f64> {
|
pub fn gpu_total_mass(&mut self) -> CfdResult<f64> {
|
||||||
|
self.gpu_extract_macroscopic_variables()?;
|
||||||
let buffers = self
|
let buffers = self
|
||||||
.gpu_buffers
|
.gpu_buffers
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
||||||
|
|
||||||
self.gpu_extract_macroscopic_variables()?;
|
|
||||||
let density_host = self.kernel_manager.copy_from_device(&buffers.density)?;
|
let density_host = self.kernel_manager.copy_from_device(&buffers.density)?;
|
||||||
let total_mass: f32 = density_host.iter().sum();
|
let total_mass: f32 = density_host.iter().sum();
|
||||||
Ok(total_mass as f64)
|
Ok(total_mass as f64)
|
||||||
@@ -744,12 +744,12 @@ __global__ void d3q19_bounce_back_boundaries(
|
|||||||
|
|
||||||
/// Calculate kinetic energy on GPU
|
/// Calculate kinetic energy on GPU
|
||||||
pub fn gpu_kinetic_energy(&mut self) -> CfdResult<f64> {
|
pub fn gpu_kinetic_energy(&mut self) -> CfdResult<f64> {
|
||||||
|
self.gpu_extract_macroscopic_variables()?;
|
||||||
let buffers = self
|
let buffers = self
|
||||||
.gpu_buffers
|
.gpu_buffers
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
.ok_or_else(|| CfdError::gpu_error("GPU buffers not initialized"))?;
|
||||||
|
|
||||||
self.gpu_extract_macroscopic_variables()?;
|
|
||||||
let density_host = self.kernel_manager.copy_from_device(&buffers.density)?;
|
let density_host = self.kernel_manager.copy_from_device(&buffers.density)?;
|
||||||
let velocity_x_host = self.kernel_manager.copy_from_device(&buffers.velocity_x)?;
|
let velocity_x_host = self.kernel_manager.copy_from_device(&buffers.velocity_x)?;
|
||||||
let velocity_y_host = self.kernel_manager.copy_from_device(&buffers.velocity_y)?;
|
let velocity_y_host = self.kernel_manager.copy_from_device(&buffers.velocity_y)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user