From cdcc46236859afeca4f85311796ecf05927f404b Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Wed, 8 Apr 2026 00:11:36 +0200 Subject: [PATCH] fix: backtest evaluator action_select kernel arg mismatch (SIGSEGV) The action_select kernel signature changed from single `float epsilon` to 4 args (eps_start, eps_end, current_epoch, total_epochs) for GPU-side cosine schedule. The backtest evaluator wasn't updated, causing a segfault from misaligned kernel args. Fix: pass eps_start=0, eps_end=0 (greedy in backtest, no exploration). Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/ml/src/cuda_pipeline/gpu_backtest_evaluator.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ml/src/cuda_pipeline/gpu_backtest_evaluator.rs b/crates/ml/src/cuda_pipeline/gpu_backtest_evaluator.rs index e540ac91c..8bd55787e 100644 --- a/crates/ml/src/cuda_pipeline/gpu_backtest_evaluator.rs +++ b/crates/ml/src/cuda_pipeline/gpu_backtest_evaluator.rs @@ -1031,7 +1031,6 @@ impl GpuBacktestEvaluator { let b2 = dqn_cfg.branch_2_size as i32; let v_min_f = dqn_cfg.v_min; let v_max_f = dqn_cfg.v_max; - let epsilon = 0.0_f32; let state_row_bytes = n * state_dim * std::mem::size_of::(); let total_chunks = (self.max_len + DQN_BACKTEST_CHUNK_SIZE - 1) / DQN_BACKTEST_CHUNK_SIZE; @@ -1132,7 +1131,10 @@ impl GpuBacktestEvaluator { .arg(ch_actions) .arg(ch_rng) .arg(ch_q_gaps) - .arg(&epsilon) + .arg(&0.0_f32) // eps_start (greedy in backtest) + .arg(&0.0_f32) // eps_end + .arg(&0_i32) // current_epoch + .arg(&1_i32) // total_epochs .arg(&batch_i32) .arg(&b0) .arg(&b1)