refactor(cuda): remove all #[cfg(not(feature = "cuda"))] dead CPU paths

Delete every CPU fallback block across 14 files (-286 lines):
- dqn.rs: CPU replay buffer, tensor construction, PER fallback, gradient paths
- hyperopt/adapters/ppo.rs: CPU curiosity modules, trajectory generation
- hyperopt/adapters/dqn.rs: CPU backtest fallback, sync no-op
- trainers/ppo.rs: CPU training error stub
- l2_cache.rs: CPU stub functions (gate callers behind cuda too)
- replay_buffer_type.rs: CPU is_gpu_prioritized fallback
- validation/harness.rs: CPU regime breakdown fallback
- build.rs: cpu_only_build cfg (never referenced)
- evaluate_baseline.rs: CPU gpu_handled fallback
- testing/integration/gpu: CPU test stubs

Zero #[cfg(not(feature = "cuda"))] remains in the codebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-16 16:26:41 +01:00
parent d95e205d4b
commit c5961cb766
14 changed files with 39 additions and 286 deletions

View File

@@ -342,22 +342,6 @@ mod tests {
}
}
#[cfg(not(feature = "cuda"))]
#[test]
fn test_cuda_feature_disabled() {
init_gpu_test_env();
info!("⚠️ CUDA feature not enabled - testing graceful handling");
// Test that the system handles missing CUDA gracefully
assert!(!cuda_available(), "CUDA should not be available when feature is disabled");
// Test that we can still get a CPU device
let device = get_test_device();
assert!(!device.is_cuda(), "Should fallback to CPU device");
info!("✅ Graceful CUDA feature disabled handling verified");
}
#[test]
fn test_cuda_kernel_integration_framework() {
init_gpu_test_env();