rtx-cfd legacy GPU tests: the current CudaKernelManager API (Arc-held manager, allocate-on-copy, copy_from_device returning the host vector), MatrixOpsKernel::tridiagonal_matvec added over the existing kernel, PoissonKernel::solve_jacobi_2d kept as the older name; CfdConfig literals take ..Default
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
CI / Build (ubuntu-latest) (push) Failing after 6s
Documentation / Build API Documentation (push) Failing after 6s
Documentation / Build User Guide (push) Successful in 7s
CI / Format Check (push) Failing after 13s
CI / Clippy Check (push) Failing after 37s
Performance Benchmarks / Run Benchmarks (push) Successful in 3m23s
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
CI / Build (ubuntu-latest) (push) Failing after 6s
Documentation / Build API Documentation (push) Failing after 6s
Documentation / Build User Guide (push) Successful in 7s
CI / Format Check (push) Failing after 13s
CI / Clippy Check (push) Failing after 37s
Performance Benchmarks / Run Benchmarks (push) Successful in 3m23s
This commit is contained in:
@@ -25,20 +25,21 @@ mod cuda_tests {
|
||||
viscosity: 0.01,
|
||||
density: 1.0,
|
||||
device_id: 0,
|
||||
..CfdConfig::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_cuda_kernel_manager_creation() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let _manager = CudaKernelManager::new(&config)?;
|
||||
let _manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_memory_operations() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
|
||||
// Test allocation
|
||||
let size = 1000;
|
||||
@@ -63,7 +64,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_advection_kernel_1d() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = AdvectionKernel::new(&manager, AdvectionScheme::Upwind)?;
|
||||
|
||||
let n = 100;
|
||||
@@ -99,7 +100,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_advection_kernel_2d() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = AdvectionKernel::new(&manager, AdvectionScheme::Upwind)?;
|
||||
|
||||
let nx = 32;
|
||||
@@ -147,7 +148,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_diffusion_kernel_explicit() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = DiffusionKernel::new(&manager, DiffusionScheme::Explicit)?;
|
||||
|
||||
let n = 100;
|
||||
@@ -182,7 +183,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_diffusion_kernel_2d() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = DiffusionKernel::new(&manager, DiffusionScheme::Explicit)?;
|
||||
|
||||
let nx = 32;
|
||||
@@ -225,7 +226,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_poisson_kernel_jacobi() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = PoissonKernel::new(&manager)?;
|
||||
|
||||
let nx = 32;
|
||||
@@ -267,7 +268,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_matrix_ops_tridiagonal() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = MatrixOpsKernel::new(&manager)?;
|
||||
|
||||
let n = 100;
|
||||
@@ -303,7 +304,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_matrix_ops_dot_product() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = MatrixOpsKernel::new(&manager)?;
|
||||
|
||||
let n = 1000;
|
||||
@@ -325,7 +326,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_matrix_ops_vector_norm() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = MatrixOpsKernel::new(&manager)?;
|
||||
|
||||
let n = 100;
|
||||
@@ -345,7 +346,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_matrix_ops_axpy() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
let kernel = MatrixOpsKernel::new(&manager)?;
|
||||
|
||||
let n = 100;
|
||||
@@ -372,7 +373,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_performance_comparison() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
|
||||
let n = 10000;
|
||||
let host_data: Vec<f32> = (0..n).map(|i| i as f32 * 0.1).collect();
|
||||
@@ -394,7 +395,7 @@ mod cuda_tests {
|
||||
#[test]
|
||||
fn test_kernel_error_handling() -> CfdResult<()> {
|
||||
let config = create_test_config();
|
||||
let manager = CudaKernelManager::new(&config)?;
|
||||
let manager = std::sync::Arc::new(CudaKernelManager::new(&config)?);
|
||||
|
||||
// Test with mismatched array sizes (should not crash)
|
||||
let small_array = manager.allocate_f32(10)?;
|
||||
@@ -434,6 +435,7 @@ mod cpu_fallback_tests {
|
||||
reference_length: 1.0,
|
||||
reference_velocity: 1.0,
|
||||
use_gpu: true,
|
||||
..CfdConfig::default()
|
||||
};
|
||||
|
||||
let result = CudaKernelManager::new(&config);
|
||||
|
||||
Reference in New Issue
Block a user