rtx-cfd: rustfmt over the repaired GPU modules and tests
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 (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 5s
CI / Build CPU-Only (Explicit) (push) Failing after 7s
CI / Format Check (push) Failing after 14s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m30s
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 (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 5s
CI / Build CPU-Only (Explicit) (push) Failing after 7s
CI / Format Check (push) Failing after 14s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m30s
This commit is contained in:
@@ -228,7 +228,10 @@ impl D2Q9GpuSolver {
|
|||||||
.arg(&(ny as i32))
|
.arg(&(ny as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
CfdError::gpu_error(&format!("Equilibrium init kernel launch failed: {}", e))
|
CfdError::gpu_error(&format!(
|
||||||
|
"Equilibrium init kernel launch failed: {}",
|
||||||
|
e
|
||||||
|
))
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,7 +406,9 @@ __global__ void d3q19_bounce_back_boundaries(
|
|||||||
.arg(&(buffers.ny as i32))
|
.arg(&(buffers.ny as i32))
|
||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| CfdError::gpu_error(&format!("Collision kernel launch failed: {}", e)))?;
|
.map_err(|e| {
|
||||||
|
CfdError::gpu_error(&format!("Collision kernel launch failed: {}", e))
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.kernel_manager.synchronize()?;
|
self.kernel_manager.synchronize()?;
|
||||||
@@ -448,7 +450,9 @@ __global__ void d3q19_bounce_back_boundaries(
|
|||||||
.arg(&(buffers.ny as i32))
|
.arg(&(buffers.ny as i32))
|
||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| CfdError::gpu_error(&format!("Streaming kernel launch failed: {}", e)))?;
|
.map_err(|e| {
|
||||||
|
CfdError::gpu_error(&format!("Streaming kernel launch failed: {}", e))
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swap buffers: f = f_temp
|
// Swap buffers: f = f_temp
|
||||||
@@ -592,7 +596,9 @@ __global__ void d3q19_bounce_back_boundaries(
|
|||||||
.arg(&(buffers.ny as i32))
|
.arg(&(buffers.ny as i32))
|
||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| CfdError::gpu_error(&format!("Boundary kernel launch failed: {}", e)))?;
|
.map_err(|e| {
|
||||||
|
CfdError::gpu_error(&format!("Boundary kernel launch failed: {}", e))
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.kernel_manager.synchronize()?;
|
self.kernel_manager.synchronize()?;
|
||||||
|
|||||||
@@ -212,7 +212,10 @@ impl KEpsilonGpuModel {
|
|||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
CfdError::gpu_error(&format!("Velocity gradients kernel launch failed: {}", e))
|
CfdError::gpu_error(&format!(
|
||||||
|
"Velocity gradients kernel launch failed: {}",
|
||||||
|
e
|
||||||
|
))
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -427,7 +430,9 @@ impl KEpsilonGpuModel {
|
|||||||
.arg(&(buffers.ny as i32))
|
.arg(&(buffers.ny as i32))
|
||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| CfdError::gpu_error(&format!("Update kernel launch failed: {}", e)))?;
|
.map_err(|e| {
|
||||||
|
CfdError::gpu_error(&format!("Update kernel launch failed: {}", e))
|
||||||
|
})?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,11 @@ impl SmagorinskyGpuModel {
|
|||||||
/// Load and compile Smagorinsky CUDA kernels
|
/// Load and compile Smagorinsky CUDA kernels
|
||||||
fn load_smagorinsky_kernels(&mut self) -> CfdResult<()> {
|
fn load_smagorinsky_kernels(&mut self) -> CfdResult<()> {
|
||||||
// In real implementation, would compile or load PTX for Smagorinsky kernels
|
// In real implementation, would compile or load PTX for Smagorinsky kernels
|
||||||
self.smagorinsky_module = Some(self.kernel_manager.get_module("smagorinsky_kernels")?.clone());
|
self.smagorinsky_module = Some(
|
||||||
|
self.kernel_manager
|
||||||
|
.get_module("smagorinsky_kernels")?
|
||||||
|
.clone(),
|
||||||
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,7 +246,10 @@ impl SmagorinskyGpuModel {
|
|||||||
.arg(&(buffers.nz as i32))
|
.arg(&(buffers.nz as i32))
|
||||||
.launch(config)
|
.launch(config)
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
CfdError::gpu_error(&format!("Velocity gradients kernel launch failed: {}", e))
|
CfdError::gpu_error(&format!(
|
||||||
|
"Velocity gradients kernel launch failed: {}",
|
||||||
|
e
|
||||||
|
))
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,13 @@ mod cuda_tests {
|
|||||||
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, &mut 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];
|
||||||
@@ -101,7 +107,13 @@ mod cuda_tests {
|
|||||||
let mut 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, &mut 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)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user