Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
545 commits
Select commit Hold shift + click to select a range
e16b921
Add changelog skill & commit-sweep playbook
Nucs Aug 23, 2026
4fc8e8d
test(oracle): isolate random-parity replay from the global np.random …
Nucs Aug 23, 2026
3ba078b
docs(oracle): add Tests & Oracle inventory tool + website dashboard
Nucs Aug 23, 2026
279d3e8
bench: refresh benchmark reports and publish the 2026-08-22 history s…
Nucs Aug 23, 2026
64dda28
docs(release): add NumSharp 0.70.0 release notes and the changelog ho…
Nucs Aug 23, 2026
5a69cfe
perf(kernels): OptimizeAndInline the SIMD/bit-transform kernel surface
Nucs Aug 23, 2026
32732a0
fix(reduce): float16 sum via a float32 widen-compute-narrow shadow (N…
Nucs Aug 23, 2026
8231b3c
ci: fix journey3 PR CI failures across test, interop, signing and cov…
Nucs Aug 23, 2026
e0dc1c9
ci: coverage cross-platform determinism + macOS sin/cos inf gate + in…
Nucs Aug 23, 2026
ee2ceb1
ci: regenerate Tests & Oracle inventory for shifted line numbers + cr…
Nucs Aug 23, 2026
330cd9a
ci(gitattributes): mark generated data subtrees binary to drop them f…
Nucs Aug 23, 2026
5e70a9d
ci: fix journey3 PR CI failures across the test and interop-test jobs
Nucs Aug 23, 2026
b3ba6bc
ci(interop): force numpy's OpenBLAS wheel on macOS so byte-parity hol…
Nucs Aug 24, 2026
02e6929
ci+fix: green journey3 cross-platform CI — host-pin libm oracle tiers…
Nucs Aug 24, 2026
1b4e776
feat(lifetime): NDScope ambient reclamation scope — eager buffer rele…
Nucs Aug 23, 2026
e387758
perf(kernels): OptimizeAndInline the reduction/sliding-dot/introselec…
Nucs Aug 23, 2026
99583e2
feat(lifetime): widen NDScope coverage across the np.* surface + NDSc…
Nucs Aug 23, 2026
ba9c2ca
feat(build): [NDScoped] IL weaver — build-time NDScope injection, sit…
Nucs Aug 23, 2026
726ec48
harden(lifetime): NDScope out-of-order Dispose safety + thread assert…
Nucs Aug 24, 2026
e0d9f19
perf(lifetime): scope the LinAlg/Math composition tier ([NDScoped]) —…
Nucs Aug 24, 2026
1c42486
perf(lifetime): scope the polynomial / N-D FFT / norm composition tie…
Nucs Aug 24, 2026
3686f6a
test(lifetime): cover the woven NDScope through nested scopes and nes…
Nucs Aug 24, 2026
9c84a62
test(lifetime): pin NDScope thread-safety invariants (thread-confined…
Nucs Aug 24, 2026
5c01d0f
perf(lifetime): scope linalg backend compositions + fft Hermitian + n…
Nucs Aug 24, 2026
af21fec
test(lifetime): detailed correctness + allocation-discipline verifica…
Nucs Aug 24, 2026
f0187d2
test(lifetime): verify manual Dispose() inside a scope is flawless (n…
Nucs Aug 24, 2026
19dbf19
docs(inventory): refresh test/oracle dashboard snapshot for the journ…
Nucs Aug 24, 2026
27eccaf
Refresh changelog style and release notes
Nucs Aug 24, 2026
6c96beb
test(interop): tolerate <=1 ULP in the managed small-kernel convolve …
Nucs Aug 24, 2026
7e6c127
test(interop): skip arm64 + widen x64 tolerance to <=2 ULP for manage…
Nucs Aug 24, 2026
edc946c
docs(inventory): refresh test/oracle report line numbers after the co…
Nucs Aug 24, 2026
020e654
feat(lifetime): weave carrier returns — ValueTuple-of-NDArray + resul…
Nucs Aug 24, 2026
0db431a
feat(lifetime): generalize tuple weaving via ITuple (any arity up to …
Nucs Aug 24, 2026
09b47a4
fix(lifetime): ~NDArray abandons its buffer ref instead of freeing — …
Nucs Aug 24, 2026
5e2874b
docs(inventory): refresh test/oracle dashboard for the ArcLifecycleTe…
Nucs Aug 24, 2026
cfc7b94
feat(lifetime): weave bare IArraySlice/UnmanagedStorage returns with …
Nucs Aug 24, 2026
3ea2e97
docs(website): add the [NDScoped] / NumSharp.Weaver page
Nucs Aug 24, 2026
1216115
test(lifetime): prove woven [NDScoped] storage-touching methods never…
Nucs Aug 24, 2026
8306fa6
perf(storage): collapse the 15 per-dtype ArraySlice<T> fields into on…
Nucs Aug 24, 2026
793949f
Merge remote-tracking branch 'origin/journey3' into journey3
Nucs Aug 24, 2026
8a039e8
docs(inventory): refresh test/oracle dashboard for TypedSlicesUnionTests
Nucs Aug 24, 2026
c4b7283
bench: refresh full NumPy-vs-NumSharp matrix + subsystems, snapshot 2…
Nucs Aug 24, 2026
5753cf4
docs(union): stamp CI-matrix + ILVerify outcomes into the union desig…
Nucs Aug 24, 2026
cbd39cb
feat(weaver): ship NumSharp.Weaver as an installable build-time weave…
Nucs Aug 24, 2026
76a0dd9
test(weaver): adversarial battery + 14-step gate; cross-platform path…
Nucs Aug 24, 2026
bb21b7d
feat(weaver): harden targets with Nucs.JsonSettings.Autosave's battle…
Nucs Aug 24, 2026
5811381
test(weaver): stress harness — source-mode, nupkg-mode, and 8-way par…
Nucs Aug 24, 2026
0d38e15
bench: measure O(1)/scalar ops with proper averages (>=50 samples, >=…
Nucs Aug 24, 2026
938d044
Add NumSharp.Weaver to solution
Nucs Aug 24, 2026
160ecbb
perf(pool): GC pacing + coarse pressure + burst-sized buckets — fix s…
Nucs Aug 25, 2026
46dbb9c
perf(bool): bool bitwise/logical family rides byte-lane SIMD with Num…
Nucs Aug 25, 2026
7bd4f38
perf(predicates): SIMD isnan/isinf/isfinite kernels for float32/float…
Nucs Aug 25, 2026
d967d99
perf(bool): argmax/argmin find-first scans, comparisons on byte lanes…
Nucs Aug 25, 2026
4dfe761
perf(predicates): isnan/isinf/isfinite return via AsGeneric (shared s…
Nucs Aug 25, 2026
48f894e
perf(argmax): SIMD tournament argmax/argmin for float32/float64 — por…
Nucs Aug 25, 2026
87a8bb8
perf(exp2): SIMD float32 exp2 kernel — hybrid double-2^r + float scal…
Nucs Aug 25, 2026
e89d6d8
perf(openblas): thread-local retained scratch pool — LAPACK factorisa…
Nucs Aug 26, 2026
66ebe78
bench(methodology): min-based ratios + universal sample rule (>=50 ro…
Nucs Aug 26, 2026
d9be201
docs: clarify unit tests and oracle dashboard
Nucs Aug 26, 2026
09963a9
bench(methodology): close the review gaps in the min-basis + sample-r…
Nucs Aug 26, 2026
568f461
feat(weaver): [NDScoped] weaves async/iterator state machines + Task/…
Nucs Aug 26, 2026
3906015
test(oracle): scope gate — undisposed-intermediate detection over the…
Nucs Aug 26, 2026
d37c428
fix(weaver): sniff a Task<T> up-cast to plain Task in ReturnsTask + a…
Nucs Aug 26, 2026
d150678
test(oracle): outside-pool allocation detection — runtime bypass verd…
Nucs Aug 26, 2026
7942e7f
Replace MakeGeneric<bool> with AsGeneric<bool>
Nucs Aug 26, 2026
a004c1e
fix(scope): weave [NDScoped] onto the leaking composition families th…
Nucs Aug 26, 2026
1a01815
fix(scope): engine disposes the NEP50 scalar-cast temp and the copy('…
Nucs Aug 26, 2026
ef9cb0c
test(oracle): trim KnownEscapes for the families the scope fix wave c…
Nucs Aug 26, 2026
41b1d03
fix(scope): [NDScoped] the second wave of composition families (sorti…
Nucs Aug 26, 2026
2b327e4
test(oracle): dispose harness composition intermediates + trim KnownE…
Nucs Aug 26, 2026
14edcbc
fix(scope): the third wave — raw-scratch + field-egress leaks NDScope…
Nucs Aug 26, 2026
99f4db3
fix(scope): comparison copy('F') path orphaned its fResult via AsGene…
Nucs Aug 26, 2026
227aa91
fix(scope): random sampler compositions + harness draw scaffolding — …
Nucs Aug 26, 2026
3c21b0d
bench: publish 2026-08-24_938d0449 benchmark snapshot [skip ci]
Nucs Aug 26, 2026
652af21
fix(ndarray): honor fillZeros in int-size constructor
Nucs Aug 26, 2026
a0a6a43
perf(openblas): shave managed wrapper overhead on cond/vdot/eig/vecma…
Nucs Aug 27, 2026
a381986
perf(broadcast): route small same-dtype single-broadcasts to direct S…
Nucs Aug 27, 2026
3010c33
bench(openblas): fair single-thread matmul cells — pin NumPy threads …
Nucs Aug 27, 2026
bd65574
perf(shift): route small/medium bool<<scalar through astype+SIMD (100…
Nucs Aug 27, 2026
6e94dbc
perf(diff/ediff1d): fused adjacent-difference stencil kernel (6x @1K,…
Nucs Aug 28, 2026
d64f3df
perf(cov/corrcoef): managed symmetric-Gram (syrk) GEMM path (cov/corr…
Nucs Aug 28, 2026
4f666fc
perf(matmul): specialized managed gemv / gevm paths (matvec/vecmat/in…
Nucs Aug 28, 2026
498c42e
docs(skill): add 'specialized-path' — discover/experiment/create/meas…
Nucs Aug 28, 2026
8c6ca42
docs(skill): generalize 'specialized-path' to any function + any kind…
Nucs Aug 28, 2026
a13238a
perf(diag/fill_diagonal): IL strided-store kernel for the diagonal-wr…
Nucs Aug 28, 2026
8c09dc1
perf(reduce): stream int64/uint64 mean axis reductions + unroll flat …
Nucs Aug 28, 2026
9df43fd
docs(specialized-path skill): complete single-thread pinning + the Pu…
Nucs Aug 28, 2026
1c709bf
perf(reduce): parallel integer min/max flat reductions — ~5x NumPy at…
Nucs Aug 28, 2026
7bfc27a
perf(nditer/copy): pre-state cpblk fast path for trivial same-layout …
Nucs Aug 28, 2026
7b8dac6
Revert "perf(reduce): parallel integer min/max flat reductions"
Nucs Aug 28, 2026
48b00e0
feat(linalg): managed LU fallback — det/slogdet/solve/inv compute wit…
Nucs Aug 28, 2026
4125fb3
Add PyTorch pythonnet interoperability
Nucs Aug 28, 2026
99a5b64
Expand PyTorch interop edge coverage
Nucs Aug 28, 2026
480c278
feat(logic): np.nan_to_num + np.isposinf/np.isneginf (NumPy 2.4.2 par…
Nucs Aug 28, 2026
03884ee
perf(linalg): IL-SIMD-power the managed LU — Vector256+FMA register-b…
Nucs Aug 28, 2026
6d471cf
feat(ufunc): np.getbufsize / np.setbufsize — thread-local buffer size…
Nucs Aug 28, 2026
3ba7ac3
Integrate Python array adapters into interop bridge
Nucs Aug 28, 2026
2904a85
Expose Python array adapter registry
Nucs Aug 28, 2026
d126d7e
bench: enforce complete tier and backend coverage
Nucs Aug 28, 2026
cae3514
Add Pandas pythonnet interoperability
Nucs Aug 28, 2026
8668246
perf(ops): reclaim operator NDArray leftovers via [NDScoped]
Nucs Aug 28, 2026
759c385
Expand Pandas interop edge coverage
Nucs Aug 28, 2026
95c512c
test(ufunc): strengthen np.setbufsize suite — chained return + failed…
Nucs Aug 28, 2026
f8683d4
feat(analyzer): NDArray leak detection (NDW012) + weaver-missing guar…
Nucs Aug 28, 2026
feb130e
test(analyzer): NumSharp.Tests.Analyzer suite + intentional-warning f…
Nucs Aug 28, 2026
8bcf461
fix(analyzer): keep NDW012 a warning, never an error (+ contract test)
Nucs Aug 28, 2026
9ee4d1f
docs(analyzer): coverage-expansion plan for the analyzer test suite
Nucs Aug 28, 2026
358bd87
Add examples/NDScoping/Examples.cs — a single-file, leak-to-[NDScoped…
Nucs Aug 28, 2026
445dc6e
perf(dispose): second-pass leak sweep — reclaim linalg LU / delete / …
Nucs Aug 28, 2026
333d169
feat(analyzer): [NDScopedHelper] caller-coverage hint for NDW012 + ap…
Nucs Aug 28, 2026
d839e7d
refactor(analyzer): rename [NDScopedHelper] -> [NDScopedCovered] + ex…
Nucs Aug 28, 2026
6f07062
test(oracle): allowlist ManagedLu's 2 LU-scratch raw allocations in t…
Nucs Aug 28, 2026
1d51e2c
fix(dispose): NDW012 sweep, manipulation + logic — scope the un-scope…
Nucs Aug 28, 2026
1b69785
fix(dispose): NDW012 sweep, indexing + selection + creation + storage…
Nucs Aug 28, 2026
d4c1680
fix(dispose): NDW012 sweep, math + random + statistics — scope modf(T…
Nucs Aug 28, 2026
a67437a
fix(dispose): NDW012 sweep, linalg + polynomial — scope the factorisa…
Nucs Aug 28, 2026
6837c91
fix(dispose): NDW012 sweep, engine kernels — precise disposal on the …
Nucs Aug 28, 2026
4041e30
refactor(build): rename weaver/analyzer subsystem NumSharp.Weaver -> …
Nucs Aug 28, 2026
fd38a41
bench: keep only the latest benchmark history snapshot on this branch
Nucs Aug 28, 2026
fbbda5f
perf(isclose): compute in NumPy's exact result_type, not blanket floa…
Nucs Aug 28, 2026
374dd64
docs(data): move dashboard data to orphan master-code-data branch wit…
Nucs Aug 29, 2026
9b20007
docs(skill): document master-code-data dashboard-data delivery in the…
Nucs Aug 29, 2026
5598192
docs(dashboard): refresh hand-maintained benchmark numbers for the 20…
Nucs Aug 29, 2026
1a63390
bench(openblas): align backend-profile inner/ndarray.dot/correlate/co…
Nucs Aug 29, 2026
dc73a80
bench(openblas): republish the 2026-08-29 backend profiles with shape…
Nucs Aug 29, 2026
f9013d1
bench: make every 10M cell measurable — dispose the widening bit shif…
Nucs Aug 29, 2026
8abae53
fix(benchmarks): enforce credible comparison rollups
Nucs Aug 29, 2026
0e1326f
bench: guard the tier-key invariant — a memory-heavy 1M row must publ…
Nucs Aug 29, 2026
a05b5b1
perf(f16): bit-level AVX2 flat min/max reduce for float16 — 6-60x Num…
Nucs Aug 29, 2026
b1b4c42
docs: refresh benchmark and API documentation
Nucs Aug 29, 2026
f340565
perf(f16): bit-level AVX2 elementwise maximum/minimum/fmax/fmin — 5.6…
Nucs Aug 29, 2026
3a46cfe
perf(f16): bit-level AVX2 comparisons ==/!=/</<=/>/>= — 1.8-40x NumPy
Nucs Aug 29, 2026
c9e141c
perf(f16): bit-level AVX2 nanmin/nanmax — 8-43x NumPy, all-NaN first-…
Nucs Aug 29, 2026
498a68f
perf(f16): bit-level AVX2 np.clip — 4.3-48x NumPy; fix NaN-max-bound …
Nucs Aug 29, 2026
c8b0573
perf(f16): SIMD widen-compute-narrow add/subtract/multiply/divide — 2…
Nucs Aug 29, 2026
c8babf2
perf(f16): bit-level AVX2 floor/ceil/trunc/rint — 6-26x NumPy, exhaus…
Nucs Aug 29, 2026
168e8a3
docs(f16): FLOAT16_DESIGN.md — how float16 is fast in NumSharp; refre…
Nucs Aug 29, 2026
043370e
feat(np): logaddexp, logaddexp2, nextafter, interp (NumPy 2.4.2 parity)
Nucs Aug 29, 2026
26d014e
feat(np): copysign — IEEE sign-copy ufunc (NumPy 2.4.2 parity)
Nucs Aug 29, 2026
735c071
refactor(kernels): align logaddexp/nextafter/copysign helpers with th…
Nucs Aug 29, 2026
ea0fa27
feat(benchmark): audit dtype scenarios and add run depths
Nucs Aug 29, 2026
b6348bb
build(packaging): the NDW analyzer ships inside the NumSharp package;…
Nucs Aug 29, 2026
2a0171d
test(analyzer): fix Ndw013BuildTests on the net10.0 host; gate the to…
Nucs Aug 29, 2026
c101199
chore(test): delete the dead NumSharp.ConsumePackage relic
Nucs Aug 29, 2026
3bd5ee2
docs: align docs with the analyzer-in-NumSharp packaging split; surfa…
Nucs Aug 29, 2026
f57d38c
fix(analyzer): composite producers (tuple/array/conditional) + store-…
Nucs Aug 29, 2026
2459963
test(gate): step 10b — the pure-nupkg product path also runs on net10.0
Nucs Aug 29, 2026
2bbfe66
chore(rename): verify_weaver_package.sh -> verify_build_package.sh; t…
Nucs Aug 29, 2026
4325fb5
fix(analyzer): four leak-exit fixes (cast-dispose FP, collection expr…
Nucs Aug 29, 2026
0a84691
docs(analyzer): LEAK_ANALYZER.md — the NDW012 supported-case matrix +…
Nucs Aug 29, 2026
6eed4bc
fix(ndscope): close the egress gap between the leak analyzer's carrie…
Nucs Aug 29, 2026
c9b46c7
fix(interp): [NDScoped] the two np.interp entries - scope-audit gate …
Nucs Aug 29, 2026
77d6aae
docs(build): ndscoped.md -> numsharp-build-compiler.md + full content…
Nucs Aug 29, 2026
7f2c09a
fix(half): strided/broadcast float16 add/sub/mul/div — coalescer nega…
Nucs Aug 30, 2026
5c7e3ad
fix(creation): 7 AuditV2 Tier-1 ctor/creation OpenBugs — F-order ctor…
Nucs Sep 2, 2026
fa49157
fix(logic): np.isreal/np.iscomplex inspect the imaginary part (+ fix …
Nucs Sep 2, 2026
feb9cd1
test(interop): live-numpy byte-parity gate for the 7 AuditV2 creation…
Nucs Sep 2, 2026
0ae977d
fix(reduction): preserve F-contiguity through axis reductions via KEE…
Nucs Sep 2, 2026
d56d31f
test(printing): broadcast-of-a-view ToString parity — retire stale Op…
Nucs Sep 2, 2026
6d11802
test(reduction): edge-case + rare-scenario coverage for KEEPORDER red…
Nucs Sep 2, 2026
99424bd
test(interop): edge-case + rare-scenario live-numpy parity for the 7 …
Nucs Sep 2, 2026
459a478
test(reduction): negative-axis, 4-D, and offset-view KEEPORDER edge c…
Nucs Sep 2, 2026
d5a716a
test(printing): +42 byte-exact broadcast-view / view ToString parity …
Nucs Sep 2, 2026
ea38573
test(math): edge/rare coverage for np.clip and ~/invert on non-contig…
Nucs Sep 2, 2026
f6f5b65
fix(math): np.clip on non-contiguous Boolean arrays (parity with NumP…
Nucs Sep 2, 2026
1796077
fix(hashset): correct 35 composite entries in HashHelpersLong prime t…
Nucs Sep 2, 2026
f46bd21
fix(shape): OWNDATA flag now maintained on Shape — audit T1.29/T1.64 …
Nucs Sep 2, 2026
c352430
refactor(storage): rename SyncOwnDataFlag -> OnReshaped
Nucs Sep 2, 2026
15154b0
perf(nditer): cut the iterator's fixed cost — single recycled state b…
Nucs Sep 3, 2026
3d4bc47
np-function: caveat against inlining large scripts in <<'EOF' heredocs
Nucs Sep 3, 2026
52d2559
docs(nditer): performance discovery document + the reproducible probe…
Nucs Sep 3, 2026
af25a74
perf(nditer): 2-D block kernel for narrow strided rows — 0.82x→1.4-2.…
Nucs Sep 3, 2026
c5993e8
docs(nditer): report for the 2-D block kernel (narrow strided rows)
Nucs Sep 3, 2026
fb6e34c
np-function: scratch probes go in the session scratchpad, not the repo
Nucs Sep 3, 2026
ccadeef
perf(nditer): 2-D block kernel second generation — masked sub-vector …
Nucs Sep 3, 2026
09d1fc5
perf(nditer): Tier 1 closed — fancy index on take/put flat kernels, w…
Nucs Sep 3, 2026
bce0a2f
docs(nditer): the int32-index-in-place kernel variants are kept on me…
Nucs Sep 3, 2026
9cc0d7e
docs(nditer): continuation document — state after Tier 1, measured re…
Nucs Sep 3, 2026
f5c3974
Update OpenBugs.FuzzGate.cs
Nucs Sep 4, 2026
4cc9cac
feat(analyzer): NDW016/NDW017 type-level NDArray ownership, contagion…
Nucs Sep 4, 2026
9507839
docs: move 24 superseded design/plan docs to docs/stale-docs/
Nucs Sep 4, 2026
760bb5b
fix(complex): byte-identical NaN sign for all complex128 unary ufuncs…
Nucs Sep 4, 2026
298e7c6
fix(complex): byte-identical NaN sign for complex abs + sign (finishi…
Nucs Sep 4, 2026
56a5571
test(oracle): add the `nan` tier — a dedicated NaN-parity oracle vs N…
Nucs Sep 4, 2026
8e1f3cd
fix(ci): green journey3 across all 3 OSes — Half arm64 NaN sign, comp…
Nucs Sep 4, 2026
fbd8fae
fix(ci): macOS arm64 — gate complex square's x86-FMA residual + the c…
Nucs Sep 4, 2026
1628f4b
chore(inventory): refresh Tests & Oracle snapshot for the fbd8fae8 te…
Nucs Sep 4, 2026
4a98c14
fix(ci): macOS arm64 — gate complex square's FMA-specific OVERFLOW to…
Nucs Sep 4, 2026
2fd9d78
fix(complex): arch-consistent complex square via portable FMA off x86…
Nucs Sep 4, 2026
92555f2
fix(ci): docs job 'Execute every official C# benchmark body once' (st…
Nucs Sep 4, 2026
25a35f4
feat(dtype): add unified DType descriptor — one dtype spelling for th…
Nucs Sep 4, 2026
c4ebbfb
refactor(dtype): migrate the engine + all Math np.* ufuncs to the sin…
Nucs Sep 4, 2026
8b13234
refactor(dtype): migrate reductions + logic + exp to the single DType…
Nucs Sep 4, 2026
1e7a0c8
refactor(repo): relocate vendored reference trees src/ -> refs/ (mech…
Nucs Sep 5, 2026
e811a73
chore: git-blame-ignore the src->refs vendored-tree relocation
Nucs Sep 5, 2026
fdddcbf
feat(build): [NDScoped] on a virtual/abstract/interface member is a c…
Nucs Sep 5, 2026
4eca2f8
feat(examples): add NumSharp Life and Pong
Nucs Sep 5, 2026
a574bae
fix(examples): clear game input on deactivation
Nucs Sep 5, 2026
1af1226
test(build): in-process weaver harness + 69 weaver stability gates (s…
Nucs Sep 5, 2026
996dba5
feat(examples): finish Life and Pong desktop play session
Nucs Sep 5, 2026
2a7dbe7
docs(examples): document finished Life and Pong release
Nucs Sep 5, 2026
5851a58
docs(specialized-path skill): absorb the post-Aug-28 perf sessions — …
Nucs Sep 5, 2026
9240fa0
chore(benchmark): rename OpenBLAS profile runner to NumSharp.Benchmar…
Nucs Sep 5, 2026
e529af4
docs(examples): adopt unified Life Arcade game design
Nucs Sep 5, 2026
8589175
fix(core): drop (int)size truncation in flat argsort/argpartition/cum…
Nucs Sep 5, 2026
9dce441
Fix benchmark script test paths
Nucs Sep 5, 2026
fe42db9
fix(core): chain inner exceptions when re-wrapping into NumPy-style e…
Nucs Sep 5, 2026
f1c3f8c
test(examples): rename NN verify scripts to descriptive Verify*Tests …
Nucs Sep 5, 2026
2f805f5
docs(skills): document the benchmark coverage audit and new oracle gates
Nucs Sep 5, 2026
69e54cb
docs(releases): expand the 0.70.0 notes
Nucs Sep 5, 2026
8d6a31f
chore(benchmark): remove orphaned backend-profiles POC dashboard
Nucs Sep 5, 2026
7ea7049
test(longindexing): add byte >int.MaxValue oracle sweep across np.* ops
Nucs Sep 5, 2026
ab15b16
fix(core): 64-bit the sort/select core so sort/argsort/partition/argp…
Nucs Sep 5, 2026
b527170
test(longindexing): confirm cumsum/cumprod/astype >int.MaxValue; spli…
Nucs Sep 5, 2026
e6b9900
feat(examples): build the unified Life Arcade
Nucs Sep 5, 2026
659ed82
feat(threading): TensorEngine.Threading — unified, per-module threadi…
Nucs Sep 5, 2026
52b0945
feat(examples): apply per-shot scoring and 70-percent Life arena
Nucs Sep 5, 2026
4a0d6d3
refactor(ndscope): drop redundant/misplaced [NDScoped] from pure-dele…
Nucs Sep 5, 2026
397cc99
fix(examples): disambiguate effect vectors and test score versioning
Nucs Sep 5, 2026
5a55d06
fix(einsum_path): arbitrary-precision (BigInteger) cost model to matc…
Nucs Sep 5, 2026
8cc21dd
fix(examples): guard deferred rendering and replace milestone rings
Nucs Sep 5, 2026
ddd5efe
refactor(selection): rename FancyIndexKernels -> FancyIndexKernelRoute
Nucs Sep 5, 2026
408b942
refactor(ndscope): drop redundant [NDScoped] from the *_indices_from …
Nucs Sep 5, 2026
1a1eaa9
fix(examples): preserve milestone notices and clear stale run feedback
Nucs Sep 5, 2026
4a62bae
test(examples): capture steered arena and milestone render fixtures
Nucs Sep 5, 2026
15c2bae
fix(sln): correct Examples->examples case in NeuralNetwork.NumSharp path
Nucs Sep 5, 2026
398c350
feat(examples): resolve real contact trajectories with five-percent n…
Nucs Sep 5, 2026
9af9b5d
fix(examples): use immutable shared arena brushes
Nucs Sep 5, 2026
430a6e3
test(examples): refresh swept-physics arcade previews
Nucs Sep 5, 2026
ef489d3
feat(interop/pythonnet): runnable examples tour + PyTorch gate floor …
Nucs Sep 5, 2026
ef28010
build: nuget.org-valid OpenBLAS license, no pack-on-build, one Versio…
Nucs Sep 5, 2026
80f963a
build(openblas): fix the license ids at their SOURCE (manifest + fetc…
Nucs Sep 5, 2026
bde905d
build(ndscope): one weave target for Core and consumers; analyzer bec…
Nucs Sep 5, 2026
a2b5420
build(ndscope): NumSharp.Build is not contagious - NDW018 refuses to …
Nucs Sep 5, 2026
2a32d2a
feat(interop/pythonnet): tuple codec + encoder handoff; examples beco…
Nucs Sep 5, 2026
f337569
ci: move workflows to .NET 10 GA + pin SDK via global.json; int32 ben…
Nucs Sep 5, 2026
f74cce5
test(oracle): allowlist the 64-bit sort/select scratch in the native-…
Nucs Sep 5, 2026
0588437
chore(dashboards): regenerate stale coverage + tests/oracle inventory…
Nucs Sep 5, 2026
f3523da
Update CLAUDE.md
Nucs Sep 5, 2026
0159662
fix(interop/openblas): make the bundled macOS dylib loadable from a N…
Nucs Sep 5, 2026
cd2025b
fix(interop/openblas): IsBundledLibrary identifies the bundle by cont…
Nucs Sep 5, 2026
3893b41
fix(release-qa): seven consumer-visible 0.70.0 defects found by packi…
Nucs Sep 5, 2026
02a6b03
fix(interop/openblas): Unix build cache lands in ~/.cache (MSBuild fa…
Nucs Sep 5, 2026
6b1723b
test(interop/openblas): consumer smoke step 6 makes the cache entry w…
Nucs Sep 5, 2026
5f6b551
build(examples): give Life Arcade its own contributor solution
Nucs Sep 5, 2026
241e962
test(interop/openblas): override gate step 15 compares the wheel coun…
Nucs Sep 5, 2026
0ef335d
docs(examples): document Life Arcade contributors
Nucs Sep 5, 2026
38c238e
docs(examples): clarify Life Arcade package staging
Nucs Sep 5, 2026
8bc5483
docs(releases): 0.70.0 notes - Overview section, round-3 sweep, PR-po…
Nucs Sep 5, 2026
1bd3ca4
docs(website): regroup DocFX docs sidebar TOC + fix two broken links
Nucs Sep 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,961 changes: 1,918 additions & 43 deletions .claude/CLAUDE.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .claude/commands/np-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NumPy is the source of truth and if NumPy does A, we do A but in NumSharp's C# w
- Do not implement struct kernel.
## 2. Implement np method/s
- Implement np methods to the fullest, integrating into our existing infrastructure and patterns.
- Our implementation might differ from NumPy's because NumPy uses C++ macros while we generate IL methods during runtime to achieve peak performance and cpu acceleration. But any input given to NumPy will produce same output with complete parity.
- Our implementation might differ from NumPy's because NumPy uses C++ macros while we generate IL methods during runtime to achieve peak performance and cpu acceleration on 1k, 100k, 1m/10m length (1m on large dtypes). But any input given to NumPy will produce same output with complete parity.
- Our implementation must provide same parameters as the NumPy function and support all dtypes NumSharp currently supports.
- Do not create a function per dtype/NPTypeCode or if-else/switch-case per dtype/NPTypeCode to call a specialized path.
- Do not use struct kernel pattern.
Expand All @@ -41,6 +41,8 @@ NumPy is the source of truth and if NumPy does A, we do A but in NumSharp's C# w
These cli functions allow rapid development and experimentation.
Specifying '#:project' and other '#' with paths must be absolute path.

> **Large or quote-dense scripts:** do NOT inline them in a `<<'EOF'` heredoc — the Bash tool wraps every command in `eval '…'` and re-escapes each `'`, so a quote-dense heredoc stops balancing at scale and fails with `unexpected EOF while looking for matching '`. Write the script to a file in the session scratchpad directory (the path given in the system prompt — never the repo cwd, never `/tmp`; a bare `probe.cs` lands in the repo tree) and redirect it in: `dotnet run -c Release - < <scratchpad>/probe.cs` or `python <scratchpad>/probe.py`. Short snippets can stay inline. (Timing/benchmark scripts are file-based anyway — the `benchmark` skill mandates `dotnet run -c Release - < script.cs` with a fresh filename per rebuild.)

### Benchmarking
Use "dotnet run <<'EOFDOTNET'" and "python <<'EOFPYTHON'" to produce professional benchmarks.

Expand Down
81 changes: 62 additions & 19 deletions .claude/skills/benchmark/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
name: benchmark
description: >-
NumSharp's NumPy-vs-NumSharp performance harness — the op/dtype/N matrix (C# BenchmarkDotNet vs a
warm NumPy process) plus five appended subsystems (nditer, layout, operand, cast, fusion), all in
warm NumPy process), unified Managed/OpenBLAS backend profiles, and five appended subsystems
(nditer, layout, operand, cast, fusion), all in
the NPY/NS convention. Use this whenever you add a benchmark for an np.* op, wire a C# benchmark to
its NumPy twin, run the official suite or a subset, read/interpret the ratio matrix or history
snapshots, add a whole subsystem, or debug a suspicious measurement (the Debug-taint 2x pitfall,
the InProcessEmit toolchain). Trigger on: "benchmark", "add a benchmark", "how fast is <op> vs
the InProcessEmit toolchain). Trigger on: "benchmark", "add a benchmark", "how fast is np.add vs
numpy", "run_benchmark.py", "BenchmarkDotNet", "NPY/NS ratio", "perf comparison", "benchmark
<op>", "benchmark-report", "history snapshot", "why is my timing 2x slow". Reach for it before
np.add", "benchmark-report", "history snapshot", "why is my timing 2x slow". Reach for it before
quoting any NumSharp-vs-NumPy speed number.
---

Expand All @@ -20,9 +21,18 @@ is the distilled map + the actionable playbooks. Read `benchmark/CLAUDE.md` when
## THE convention: NPY/NS (memorize this)

> **ratio = NumPy_ms / NumSharp_ms.** `>1` = NumSharp **faster**, `<1` = slower, `=1` = parity. **Higher is better.**

Used everywhere — matrices, geomeans, commit messages, every `*_sheet.py`. Icons: ✅ `≥1.0` · 🟡 `≥0.5` · 🟠 `≥0.2`
· 🔴 `<0.2`. (The legacy `run-benchmarks.ps1` prints the INVERSE NS/NPY — prefer NPY/NS for anything new.)
> **Timing basis: best window (min)** — ratios compare each side's per-case *minimum*, never the mean. Interference
> (GC pauses, page-fault storms, ambient machine load) only ever *adds* time, and it lands almost entirely in the
> NumSharp side's right tail, so comparing means turned machine state into fake ratio regressions. Min-based
> harnesses run each case to a ~200 ms time budget (a >20 ms/call op runs exactly 100 times); the C# op-matrix keeps
> BenchmarkDotNet's 50 iterations. Per-case means stay in the JSON (`numpy_mean_ms`/`numsharp_mean_ms`) as tail
> diagnostics — a large mean/min gap on one side flags a contaminated window.

Used everywhere — matrices, geomeans, commit messages, every `*_sheet.py`. The report's status icons
(✅/🟡/🟠/🔴 faster→slower · ▫ negligible/excluded · ⚪ pending · ❌ crashed) and their exact cutoffs live in
`references/run-and-report.md`; the source of truth is `get_status()` + `classify()` in `scripts/merge-results.py`,
so read those rather than trusting a hardcoded threshold. (The legacy `run-benchmarks.ps1` prints the INVERSE
NS/NPY — prefer NPY/NS for anything new.)

## THE pitfall: Debug taints timings ~2×

Expand All @@ -36,23 +46,45 @@ script assembly, not Core. The BenchmarkDotNet projects are exempt (they mandate

| Side | Where | What |
|------|-------|------|
| C# | `benchmark/NumSharp.Benchmark.CSharp/Benchmarks/<Category>/*.cs` | BenchmarkDotNet classes; `[Benchmark(Description="np.foo(a)")]` methods. |
| C# | `benchmark/NumSharp.Benchmark.CSharp/Benchmarks/<Category>/*.cs` | Core-only BenchmarkDotNet project plus shared benchmark classes; `[Benchmark(Description="np.foo(a)")]` methods. |
| OpenBLAS C# | `benchmark/NumSharp.Benchmark.CSharp.OpenBLAS/` | Enables one-thread OpenBLAS and reruns the shared official LinearAlgebra classes/config. |
| NumPy | `benchmark/NumSharp.Benchmark.Python/numpy_benchmark.py` | `run_<suite>_benchmarks(...)` emitting `BenchmarkResult` rows. |
| Merge | `benchmark/scripts/merge-results.py` | Joins on `(normalize_op_name(name), dtype, N)`. |
| Merge | `benchmark/scripts/{merge-results,merge-backend-profiles}.py` | Joins language timings, then backend profiles on the exact cell. |
| Orchestrator | `benchmark/run_benchmark.py` | Builds C#, runs each suite (BDN) + warm NumPy across 1K/100K/10M, merges, snapshots. |

`run_benchmark.py --depth pass|light|measure` is the execution-depth contract shared by BDN and
NumPy (defined once in `scripts/benchmark_modes.py`, so the two languages can't drift). `pass` is an
execution gate (one workload call, zero warmups); `light` uses 8 BDN measurements after 3 warmups plus
one-sixth of NumPy's normal time budget; `measure` is the full 50-measurement / 5-warmup BDN + full
NumPy publication profile. Pass/light write only under `benchmark/results/` and must never replace
root/docs/history artifacts. `--dtypes f32,float64` selects comma-separated dtypes/aliases (canonical
set + aliases in `benchmark_modes.py`); a multi-dtype scenario (for example src→dst casts) matches when
any dtype side is requested.

The join is by **normalized op name**: `normalize_op_name` strips the dtype tag, `[annotations]`, and
identifier-only arg lists — so C# `"np.foo(a)"` and NumPy `"np.foo"` both collapse to `np.foo` and join. Get the
names to normalize identically or the row shows as "C# not run" / "NumPy only".

## The matrix + subsystems

- **Op matrix** — 14 comparison suites, each a C# namespace filter in `run_benchmark.py`'s `SUITES` map
- **Op matrix** — 18 comparison suites, each a C# namespace filter in `run_benchmark.py`'s `SUITES` map
(`arithmetic, unary, reduction, broadcast, creation, manipulation, slicing, comparison, bitwise, logic,
statistics, sorting, linalg, selection`). Swept over 1K/100K/10M × the 15 dtypes.
statistics, sorting, linalg, selection, fft, random, ndarray, api`). Universal-tier rule: an
operation/dtype with both 1K and 100K must also schedule 10M; the official merge checks NumPy and C#
independently. Scalar/1K-only dispatch cases are the only intentional non-throughput exception.
Allocation-heavy families map the 10M label to 1M physical elements symmetrically on both sides;
1M is not a separate report/dashboard tier.
- **Backend profiles** — the complete official LinearAlgebra BDN classes run under both the Core-only
executable and `NumSharp.Benchmark.CSharp.OpenBLAS`; a merge gate rejects any missing exact-cell OpenBLAS
peer. `benchmark/backends/backend_profiles.py` supplements backend-only product/LAPACK routes with
the same schema; MissingBackendException and NotSupportedException are availability outcomes. Every
profile publishes `1K / 100K / 10M`; operation-specific physical work remains bounded (LAPACK maps
those tiers to matrix sides `32 / 96 / 128`). Separate profile JSON files are merged into one
effective dataset, with `actual_backend: managed` retained for controls that never dispatch to BLAS.
- **Five appended subsystems** (own result models, appended not merged): `nditer` (iterator machinery),
`layout` (op × 8 memory layouts × dtype), `operand` (1-D/scalar/mixed/broadcast), `cast` (astype 15×15 × layout),
`fusion` (`np.evaluate`). Each is a `*_bench.{cs,py}` pair + a `*_sheet.py` renderer.
and `fusion` (`np.evaluate`). Each is a
`*_bench.{cs,py}` pair + a `*_sheet.py` renderer.

## Playbook — add a benchmark for a new op

Expand All @@ -65,14 +97,19 @@ The most common task. Full worked example in **`references/add-benchmark.md`**.
2. **NumPy twin** — append to the matching `run_<suite>_benchmarks(...)` in `numpy_benchmark.py`, setting
`r.name, r.category, r.suite, r.dtype`. Make `.name` normalize to the C# Description (`"np.foo"` ↔ `"np.foo(a)"`).
3. **Smoke it** (this is usually the right scope — a full measured run is the post-release CI job):
`dotnet build -c Release`; `dotnet run -c Release --no-build -f net10.0 -- --list flat | grep <Class>` to confirm
BenchmarkDotNet discovers it; `python numpy_benchmark.py --suite <suite> --quick` to confirm the NumPy rows emit.
4. **Full numbers** come from `python run_benchmark.py` (or the `benchmark.yml` post-release workflow).
`python benchmark/run_benchmark.py --depth pass --suites <suite> --dtypes <dtype>` executes each
selected BDN/NumPy cell exactly once and fails on workload errors. Use `--depth light` for a rough ratio.
4. **Full numbers** come from `python run_benchmark.py --depth measure` (or the `benchmark.yml` post-release workflow).

## Other tasks → where to go

- **Run the suite (official / subset), interpret the report, snapshots** → `references/run-and-report.md`.
- **Add or edit a matrix subsystem (nditer/layout/operand/cast/fusion)** → `references/subsystems.md`.
- **Run the suite (official / subset), interpret the report, the reports/UI surfaces + snapshots** → `references/run-and-report.md`. (The human-facing UI is the DocFX page `docs/website-src/docs/benchmarks-dashboard.md`; its Function Explorer data is generated, while narrative cards are curated. Generated dashboard data is delivered via the orphan **`master-code-data`** branch with a build-time date-priority resolver in `tools/dashboard_data/` — see `references/run-and-report.md`.)
- **Add or edit a matrix subsystem or backend profile case** → `references/subsystems.md`.
- **"Is `np.<foo>` benchmarked yet? What's still missing?"** → the generated coverage ledger
`benchmark/coverage/generated/summary.md` (+ `coverage.{json,csv}`), refreshed by `scripts/audit_coverage.py`
from the `[Benchmark(Description)]` attributes across the op-matrix namespaces plus the reviewed
`coverage/overrides.json`. Its "Missing benchmark coverage" table is the to-do list; its route map says which
APIs need OpenBLAS. This is a source-level audit, not a timing run.
- **Everything else (all suites, config internals, troubleshooting, type map)** → `benchmark/CLAUDE.md`.

## Gotchas
Expand All @@ -83,12 +120,18 @@ The most common task. Full worked example in **`references/add-benchmark.md`**.
trying to run BDN ad-hoc.
- **What we commit is `benchmark/history/<date>_<sha>/`**, not the gitignored `benchmark/results/<ts>/` scratch.
Reference `benchmark/history/latest/benchmark-report.md`.
- **A row shows "C# not run" / "NumPy only"?** The two sides' names didn't normalize to the same join key — the
first thing to check for any new/renamed benchmark. `scripts/check_smoke_joins.py` verifies every C#
`[Benchmark(Description)]` ↔ NumPy name join in both directions using the exact merge normalizer (from a quick
`numpy_benchmark.py --quick --size small` smoke run), so it catches the mismatch without a full measured run.
- **These are mostly view ops → sub-µs.** flip/rot90/transpose-aliases are O(1) views; their benchmark tracks
allocation/dispatch overhead, not throughput. Ops doing real work (trim_zeros, reductions) are where ratios
are meaningful.
allocation/dispatch overhead, not throughput. `benchmark/scripts/credibility.py` marks every reviewed
O(1)-in-N scenario negligible regardless of measured duration, and every dashboard rollup must honor that
status. The proof ledger is `benchmark/O1_EXCLUSIONS.md`. Ops doing real work (trim_zeros, reductions) are
where ratios are meaningful.

## References

- `references/add-benchmark.md` — the detailed add-a-benchmark playbook (C# + NumPy twin + join-key rules + smoke).
- `references/run-and-report.md` — running the official run / subsets, the report + history snapshots, InProcessEmit.
- `references/subsystems.md` — the five subsystems and how to add one (`*_bench.{cs,py}` + `*_sheet.py`).
- `references/subsystems.md` — backend profiles plus the five appended subsystems.
10 changes: 8 additions & 2 deletions .claude/skills/benchmark/references/add-benchmark.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,20 @@ A full measured run is expensive and normally the post-release `benchmark.yml` j
```bash
cd benchmark/NumSharp.Benchmark.CSharp
dotnet build -c Release -v q --nologo
dotnet run -c Release --no-build -f net10.0 -- --list flat | grep FlipRot # BDN discovers the 7 methods
dotnet run -c Release --no-build -f net10.0 -- --list flat | grep FlipRot # BDN discovers the FlipRot methods
cd ../NumSharp.Benchmark.Python
python numpy_benchmark.py --suite manipulation --quick --size medium | grep -iE "flip|trim_zeros" # NumPy rows emit
```

`--list flat` is reflection-only (no toolchain), so it works despite the out-of-process-toolchain limitation.
A direct-call `dotnet run -c Release` script (mirroring each benchmark body) confirms the C# calls execute.

Two source-level checks confirm the wiring without a measured run: `python benchmark/scripts/check_smoke_joins.py`
(after the smoke run above) proves the C# `[Benchmark(Description)]` and the NumPy `.name` normalize to the same
join key in both directions; and — if you benchmarked a *new* API — `python benchmark/scripts/audit_coverage.py`
refreshes `benchmark/coverage/generated/summary.md`, which should now count your op and drop it from that file's
"Missing benchmark coverage" table (register a deliberate non-benchmark in `coverage/overrides.json`).

## 5. Full run (optional)

`python run_benchmark.py --suites manipulation` measures just your suite; `python run_benchmark.py` runs everything
Expand All @@ -121,7 +127,7 @@ Only when your ops form a new category with no existing home:
4. (legacy) optionally add the filter to `run-benchmarks.ps1`'s `ValidateSet` and Program.cs menu.

Then the new suite runs in `python run_benchmark.py --suites <newsuite>` (and in the full run), joined and reported
exactly like the built-in 14. Keep the C# `[Benchmark(Description)]` labels normalizing onto the NumPy `.name`s.
exactly like the built-in 18. Keep the C# `[Benchmark(Description)]` labels normalizing onto the NumPy `.name`s.

## Choosing base class & size (quick reference)

Expand Down
Loading
Loading