rtx-cfd legacy GPU tests: the kernels' output buffers are &mut
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 / Build CPU-Only (Explicit) (push) Failing after 6s
Documentation / Build API Documentation (push) Failing after 6s
CI / Clippy Check (push) Failing after 9s
CI / Format Check (push) Failing after 12s
Documentation / Build User Guide (push) Successful in 5s
CI / Build (ubuntu-latest) (push) Failing after 17s
Performance Benchmarks / Run Benchmarks (push) Successful in 3m41s

This commit is contained in:
Omar Sobh
2026-09-16 07:18:58 -05:00
parent 1381b5b633
commit 534801e16a
@@ -40,13 +40,13 @@ mod cuda_tests {
// Allocate GPU memory // Allocate GPU memory
let mut d_phi = kernel_manager.allocate_f32(nx)?; let mut d_phi = kernel_manager.allocate_f32(nx)?;
let d_phi_new = kernel_manager.allocate_f32(nx)?; let mut d_phi_new = kernel_manager.allocate_f32(nx)?;
// Copy to GPU // Copy to GPU
d_phi = kernel_manager.copy_to_device(&phi)?; d_phi = kernel_manager.copy_to_device(&phi)?;
// Run advection kernel // Run advection kernel
advection_kernel.apply(&d_phi, &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)?;
// Copy result back // Copy result back
let mut result = vec![0.0f32; nx]; let mut result = vec![0.0f32; nx];
@@ -98,10 +98,10 @@ mod cuda_tests {
} }
let mut d_phi = kernel_manager.allocate_f32(nx)?; let mut d_phi = kernel_manager.allocate_f32(nx)?;
let d_phi_new = kernel_manager.allocate_f32(nx)?; let mut d_phi_new = kernel_manager.allocate_f32(nx)?;
d_phi = kernel_manager.copy_to_device(&phi)?; d_phi = kernel_manager.copy_to_device(&phi)?;
advection_kernel.apply(&d_phi, &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)?;
let mut result = vec![0.0f32; nx]; let mut result = vec![0.0f32; nx];
result = kernel_manager.copy_from_device(&d_phi_new)?; result = kernel_manager.copy_from_device(&d_phi_new)?;
@@ -133,10 +133,10 @@ mod cuda_tests {
} }
let mut d_temp = kernel_manager.allocate_f32(nx)?; let mut d_temp = kernel_manager.allocate_f32(nx)?;
let d_temp_new = kernel_manager.allocate_f32(nx)?; let mut d_temp_new = kernel_manager.allocate_f32(nx)?;
d_temp = kernel_manager.copy_to_device(&temperature)?; d_temp = kernel_manager.copy_to_device(&temperature)?;
diffusion_kernel.apply(&d_temp, &d_temp_new, alpha as f32, dt as f32, dx as f32)?; diffusion_kernel.apply(&d_temp, &mut d_temp_new, alpha as f32, dt as f32, dx as f32)?;
let mut result = vec![0.0f32; nx]; let mut result = vec![0.0f32; nx];
result = kernel_manager.copy_from_device(&d_temp_new)?; result = kernel_manager.copy_from_device(&d_temp_new)?;