jgrusewski
208cee4cf5
docs: fix 5 chunk 2 re-review issues in CUDA backtest plan
...
- Task 9: memcpy_stod_inplace → memcpy_htod (cudarc 0.17 API)
- Task 9: Fix transposed actions_history layout — accumulate CPU-side
in window-major [window][step] layout, upload once before metrics kernel
- Task 9: Replace non-existent Tensor::from_raw_buffer with download-
and-reupload pattern (temporary, replaced by Task 11 GPU gather kernel)
- Task 10: DqnOptimizer → DQNTrainer (hyperopt adapter) (actual struct name)
- Task 10: internal_trainer type → &InternalDQNTrainer (avoids name conflict
with adapter's own DQNTrainer alias)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 09:40:51 +01:00
jgrusewski
33bcc44bd4
docs: fix Task 6 min/max API — candle min(D)/max(D) returns Tensor not tuple
...
In candle-core (git 671de1d), min(D) and max(D) return Result<Tensor>,
not Result<(Tensor, Tensor)>. Use flatten_all() then min(0)/max(0) for
scalar reduction instead of the tuple destructuring pattern.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 09:38:12 +01:00
jgrusewski
b704af9112
docs: fix Task 14 path and Task 15 EvaluationEngine API in plan
...
- Task 14: evaluate_baseline is at crates/ml/examples/evaluate_baseline.rs
(not bin/fxt/src/commands/), fix cargo check command and git add path
- Task 15: process_bar_factored takes (usize, &OHLCVBarF32, &FactoredAction)
not (f64, usize, f64, f64), fix test to use correct types
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 09:37:33 +01:00
jgrusewski
dce318b47f
docs: fix 22 review issues in CUDA backtest implementation plan
...
Chunk 1 fixes:
- Task 1: Replace shared-memory epoch state with global memory + __threadfence()
(shared memory is per-block, multi-block launch would read uninitialized shmem)
- Task 2: Move atomicMin_float/atomicMax_float before kernel definition
- Task 3: Add pub getters for private GPU buffers, fix broken pnl_history logic
(pushing mean_reward N times gives zero std → NaN Sharpe)
- Task 4: Add missing accumulate_q_value/read_q_accumulator methods to GpuTrainingGuard
- Task 6: Fix sort_last_dim tuple destructuring, batch 3 to_scalar into single
8-float readback, move function off GpuTrainingGuard to free function
Chunk 2 fixes:
- Task 8: Add shared-memory parallel reduction for drawdown, win_rate, trade_count
(previously only reduced on thread 0's 1/256th data subset)
- Task 9: Remove dead code, fix task cross-references (12→11), implement
actions_history DtoD copy (was TODO → trade count always 0)
- Task 10: Flesh out BacktestMetrics mapping (6 GPU fields → 16 struct fields),
fix cfg compilation with nested block pattern
Chunk 3 fixes:
- Task 12: Replace "follow same pattern" with actual PPO/supervised code,
enumerate all 8 supervised adapter files, add regression→action mapping
- Task 13: Add complete bitonic sort kernel code for VaR/CVaR extraction,
document intentional spec deviation and deferred Phase 3 capabilities
- Task 14: Specify exact binary path (bin/fxt/src/commands/evaluate_baseline.rs)
- Task 15: Replace placeholder test comments with full synthetic-data validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 09:32:58 +01:00
jgrusewski
6436c15d6d
docs: CUDA backtest & GPU-residency implementation plan
...
15-task plan covering Phase 1 (seal GPU→CPU roundtrips in training loop),
Phase 2 (vectorized GPU backtest environment for hyperopt), and Phase 3
(general GPU backtester integration).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-11 09:22:17 +01:00