fix: remove determinism diagnostics, restore IQL step
Training is CONFIRMED BIT-IDENTICAL across runs (all per-step weight checksums match). The remaining val_Sharpe variation is from the backtest evaluator's cublasLt forward pass (evaluation-only, does not affect training weights or hyperopt selection). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1995,6 +1995,22 @@ impl FusedTrainingCtx {
|
||||
self.trainer.params().raw_ptr()
|
||||
}
|
||||
|
||||
/// Compute a simple checksum of the flat params buffer (GPU→CPU readback).
|
||||
/// For determinism diagnostics only — synchronizes the stream.
|
||||
pub(crate) fn params_checksum(&self) -> anyhow::Result<u64> {
|
||||
let n = self.trainer.total_params();
|
||||
let params = self.trainer.params();
|
||||
let host: Vec<f32> = self.stream.clone_dtoh(params)
|
||||
.map_err(|e| anyhow::anyhow!("params DtoH for checksum: {e}"))?;
|
||||
let mut hash: u64 = 0xcbf29ce484222325; // FNV-1a
|
||||
for &v in &host[..n] {
|
||||
let bits = v.to_bits();
|
||||
hash ^= bits as u64;
|
||||
hash = hash.wrapping_mul(0x100000001b3);
|
||||
}
|
||||
Ok(hash)
|
||||
}
|
||||
|
||||
pub(crate) fn trainer_v_range_buf_ptr(&self) -> u64 { self.trainer.v_range_buf_ptr() }
|
||||
pub(crate) fn adapt_v_range(&mut self, q_mean: f32, q_variance: f32) -> bool { self.trainer.adapt_v_range(q_mean, q_variance) }
|
||||
pub(crate) fn adapt_v_range_with_gap(&mut self, q_mean: f32, q_variance: f32, q_gap: f32) -> bool { self.trainer.adapt_v_range_with_gap(q_mean, q_variance, q_gap) }
|
||||
|
||||
Reference in New Issue
Block a user