Files
foxhunt/crates/ml-hyperopt/Cargo.toml
jgrusewski b616d024ad fix(dqn): IQN GPU PER weights, staged GPU buffer, CUDA default in all ML crates
Three fixes for GPU PER hot path:

1. IQN quantile loss used empty CPU weights Vec instead of GPU-resident
   weights_tensor_cached — caused CUDA_ERROR_ILLEGAL_ADDRESS from
   uninitialized GPU memory. Now uses cached GPU tensor matching C51
   and standard DQN paths.

2. GpuPrioritized add()/add_batch() replaced with StagedGpuBuffer:
   add() stages on CPU (Vec::push, zero GPU ops), sample() batch-flushes
   staging→GPU in one DMA before sampling. Production path (insert_batch_tensors)
   bypasses staging entirely — GPU→GPU with zero CPU.

3. All 9 ML sub-crates default to cuda feature so `cargo test -p ml-dqn`
   exercises GPU code paths on CUDA workstations. CI service crates use
   default-features=false, unaffected.

Test results: 350 passed (was 343+7 failed), 0 failed, 1 ignored.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:31:49 +01:00

44 lines
1.2 KiB
TOML

[package]
name = "ml-hyperopt"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
publish.workspace = true
keywords.workspace = true
categories.workspace = true
description = "ML hyperparameter optimization — PSO, TPE, campaigns, sensitivity analysis"
[features]
default = ["cuda"]
cuda = ["candle-core/cuda", "candle-core/cudnn"]
[dependencies]
ml-core = { path = "../ml-core", default-features = false }
common.workspace = true
candle-core = { git = "https://github.com/huggingface/candle", rev = "671de1db" }
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
chrono.workspace = true
tracing.workspace = true
anyhow.workspace = true
rand.workspace = true
rand_distr.workspace = true
ndarray = { workspace = true, features = ["rayon"] }
rayon.workspace = true
statrs.workspace = true
argmin = { version = "0.8", features = ["rayon"] }
argmin-math = "0.3"
[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "macros"] }
rand_chacha = "0.3"
approx = "0.5"
[lints]
workspace = true