Add rev11 real-input AZI_CHUNK sweep benchmark, scoped rev12, and rev11-vs-rev12 validator#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eec404382a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| end | ||
| end | ||
|
|
||
| sub_array_agg_check_mc_dBm(loop_idx,1)=10.*log10(max(max_azi_agg_mw,realmin('double'))); |
There was a problem hiding this comment.
Preserve -Inf when aggregate power is zero
This conversion now clamps zero aggregate power to realmin before log10, which returns a large finite negative value (~-3076 dBm) instead of the -Inf produced by rev11 (pow2db(0)). In scenarios with no active BS contributions (or all contributions omitted as NaN), this changes the output contract from non-finite to finite and can alter downstream filtering/statistics that use isfinite to detect no-signal cases.
Useful? React with 👍 / 👎.
| finite_mask=isfinite(x11) & isfinite(x12); | ||
| x11=x11(finite_mask); | ||
| x12=x12(finite_mask); |
There was a problem hiding this comment.
Treat non-finite output mismatches as validation failures
The validator drops any sample where either rev11 or rev12 is non-finite before computing drift metrics, so regressions that introduce NaN/Inf (or contract changes in non-finite handling) are silently excluded from overall_pass. That undermines the stated fail-closed behavior because the comparison can pass while problematic samples are ignored.
Useful? React with 👍 / 👎.
Motivation
subchunk_agg_check_maxazi_rev11across AZI_CHUNK values to choose a safe default for further optimization.rev12that preservesrev11's one-time RNG/pre-generated random matrices and chunking while addressing the next likely bottlenecks.rev12remains statistically equivalent torev11and to measure runtime impact.Description
benchmark_subchunk_agg_check_maxazi_rev11_chunk_sweep_real.mwhich timessubchunk_agg_check_maxazi_rev11on real inputs over chunk sizes[32 64 128 256 512 1024], usestimeitwhen available, prints a clean summary table, and returnschunk_sizes,runtimes,best_chunk,best_runtime, andspeedup_vs_128.subchunk_agg_check_maxazi_rev12.mwhich preserves the one-time RNG/pre-generated random matrices and AZI chunking (defaultAZI_CHUNK=128, optional override), vectorizes the off-axis gain lookup via a flattenednearestpoint_apppass, and reduces temporary allocation by accumulating in linear mW domain and converting once per MC.validate_subchunk_agg_check_maxazi_rev11_rev12_statistical.mwhich runsrev11andrev12on identical inputs, captures runtimes, compares metrics (mean,std,min,max,median,p90,p95,p99, and optionalp99.9), emphasizes upper-tail checks, applies documented absolute/relative thresholds, prints a structured summary, and fails closed if thresholds are exceeded.DEBUG_CHECKS=falseand avoid changing aggregation semantics or helper-function call patterns to preserve statistical behavior.Testing
sed/nlandgit status --shortshowed the three new files present); these checks succeeded.octave --versionwhich failed in this container, so the MATLAB/Octave runtime benchmarks and the statistical validation could not be executed here.Codex Task