fix: pass 3 missing args to experience_action_select in backtest evaluator

The kernel was updated with portfolio_states, min_hold_bars, max_position
params (Task 3 of trade lifecycle fix) but the backtest evaluator's launch
site wasn't updated. It passed 10 args to a 13-param kernel, causing
SIGSEGV from reading garbage for the missing params.

Fix: pass NULL/0/0.0 for the 3 new params (hold enforcement disabled
during evaluation for now — will be enabled in eval cleanup plan).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-03-26 00:47:15 +01:00
parent 6414f57e34
commit cfcec6bc94

View File

@@ -1205,7 +1205,11 @@ impl GpuBacktestEvaluator {
}
// ── Phase 4: Greedy action selection on chunked Q-values ─────────
// Kernel signature: (q_values, out_actions, rng_states, out_q_gaps, epsilon, N, b0, b1, b2, q_gap_threshold)
// Kernel signature: (q_values, out_actions, rng_states, out_q_gaps, epsilon, N,
// b0, b1, b2, q_gap_threshold, portfolio_states, min_hold_bars, max_position)
let null_portfolio: u64 = 0; // NULL — backtest has no hold enforcement yet
let eval_min_hold: i32 = 0; // 0 = disabled during evaluation
let eval_max_pos: f32 = 0.0;
unsafe {
self.stream
.launch_builder(as_kernel)
@@ -1219,6 +1223,9 @@ impl GpuBacktestEvaluator {
.arg(&b1)
.arg(&b2)
.arg(&self.q_gap_threshold)
.arg(&null_portfolio) // portfolio_states (NULL — no hold masking in eval)
.arg(&eval_min_hold) // min_hold_bars (0 = disabled)
.arg(&eval_max_pos) // max_position (unused when disabled)
.launch(launch_cfg)
.map_err(|e| MLError::ModelError(format!(
"chunked action_select chunk_start={chunk_start}: {e}"