diff --git a/README.md b/README.md index 3ec1507..5db3500 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ describes**: | Source | Published under | | --- | --- | -| branch `main`, with `params.ndarray.version: v0.40.2` in `hugo.yaml` | `https://go-ndarray.github.io/docs//`, here `/docs/0.40/` | +| branch `main`, with `params.ndarray.version: v0.40.3` in `hugo.yaml` | `https://go-ndarray.github.io/docs//`, here `/docs/0.40/` | | the newest version | also `https://go-ndarray.github.io/docs/latest/` | `https://go-ndarray.github.io/docs/` redirects to `latest/`. Each push to diff --git a/content/en/accuracy.md b/content/en/accuracy.md index 987b446..bf38668 100644 --- a/content/en/accuracy.md +++ b/content/en/accuracy.md @@ -8,7 +8,7 @@ description: "What go-ndarray promises about its results: a stated error bound, tags: [accuracy, numpy, math/big] --- -> Mirrored from [`README.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/README.md#accuracy-contract) at v0.40.2. +> Mirrored from [`README.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/README.md#accuracy-contract) at v0.40.3. The contract is **correct, and as fast as possible**. "Correct" means a stated error bound, checked against an exact oracle. Equality with NumPy's bits is not the contract: wherever it holds today, it is how a function was ported, and a faster default that stays within its bound may replace it. diff --git a/content/en/dtypes.md b/content/en/dtypes.md index bf9d843..34c7774 100644 --- a/content/en/dtypes.md +++ b/content/en/dtypes.md @@ -8,7 +8,7 @@ description: "Why the dtype is a run-time property of one Array type, how arrays tags: [dtypes, numpy] --- -> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/design-dtypes.md) at v0.40.2. +> Mirrored from [`docs/design-dtypes.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/design-dtypes.md) at v0.40.3. > Status: implemented (Phase 2). Supersedes decision 4 of > [plan-ndarray.md](roadmap.md) ("`float64` first"). diff --git a/content/en/linalg.md b/content/en/linalg.md index 142c71c..027294a 100644 --- a/content/en/linalg.md +++ b/content/en/linalg.md @@ -8,9 +8,9 @@ description: "Solve, Inv, Det, Cholesky, QR, SVD, Eig and the rest of numpy.lina tags: [linalg, numpy] --- -> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/linalg.md) at v0.40.2. +> Mirrored from [`docs/linalg.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/linalg.md) at v0.40.3. -Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.40.2/linalg) gives ndarray arrays the functions of +Package [`linalg`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.40.3/linalg) gives ndarray arrays the functions of `numpy.linalg`, written in Go without cgo or assembly of its own: the matrix products it relies on are the ndarray package's packed SIMD GEMM. diff --git a/content/en/performance.md b/content/en/performance.md index 1eb93ef..56fea3d 100644 --- a/content/en/performance.md +++ b/content/en/performance.md @@ -8,11 +8,11 @@ description: "go-ndarray against the pinned NumPy on one core, both sides: the m tags: [performance, numpy, refbench] --- -> Mirrored from [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/perf.md) at v0.40.2. +> Mirrored from [`docs/perf.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/perf.md) at v0.40.3. -The table is [perf-table.md](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/perf-table.md), generated by +The table is [perf-table.md](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/perf-table.md), generated by [refbench](https://github.com/go-scikit/refbench) (go-scikit/refbench v0.1.2) -from [perf.json](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/perf.json); nothing in it is edited by hand. The rules are +from [perf.json](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/perf.json); nothing in it is edited by hand. The rules are those of the go-scikit performance campaign ([go-scikit/roadmap#27](https://github.com/go-scikit/roadmap/issues/27)): @@ -36,46 +36,9 @@ those of the go-scikit performance campaign `TestRefSmoke` runs every NumPy call once. - **One case per public function** (a function with several shapes of use has several rows, `Array.SumAxis/axis0` and `/axis1`), or a named exemption with - its reason in [perf-exempt.md](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/perf-exempt.md). CI fails on a public function + its reason in [perf-exempt.md](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/perf-exempt.md). CI fails on a public function with neither. -## float32 Max and Min (v0.39.0) - -`Array.Max` and `Array.Min` on float32 call go-simd/floats `Float32Max` and -`Float32Min`; ndarray's own extrema32 kernels were removed (#110). go-simd/floats -v0.15.0 adds an AVX2 path on amd64 (#111). On one Zen 3 core, 16 384 elements -take 0.77 µs (Max) and 0.74 µs (Min), against 1.40 and 1.32 µs with SSE2 and -2.61 to 3.32 µs with NumPy 2.5.4. At 1 M elements the timing is memory-bound and -NumPy varied from 64 to 113 µs across runs, so no ranking is claimed at that -size ([go-simd/floats#46](https://github.com/go-simd/floats/issues/46)). - -## riscv64 float32 GEMM (v0.40.0) - -On riscv64 with vector registers of at least 256 bits, float32 `MatMul` uses an -8×16 tile at LMUL=2 (#112). SpacemiT X60, one core, square float32 products: - -| | 64² | 256² | 1024² | -|---|---:|---:|---:| -| before | 185 µs | 7.19 ms | 462 ms | -| after | ~142 µs | 4.49 ms | 356 ms | -| OpenBLAS 0.3.34 | 105 µs | 5.34 ms | 380 ms | - -At 256² and 1024² it is faster than OpenBLAS; at 64² it is still 1.35× slower, so -[#107](https://github.com/go-ndarray/ndarray/issues/107) stays open. The entry is -in [performance history](performance-history.md). - -## random Choice allocations (v0.40.2) - -`Choice` gathers through a byte view instead of one `reflect.Value.Slice` per -index (#115, closes [#103](https://github.com/go-ndarray/ndarray/issues/103)). -Allocations for 100 000 draws: - -| | before | after | -|---|---:|---:| -| `Generator.Choice` | 200 013 | 13 | -| `RandomState.Choice` | 200 012 | 12 | -| `random.Choice` | 200 012 | 12 | - ## What a row times Each row calls the Go function once on a vector of 100 000 elements (a 1000 x @@ -119,4 +82,8 @@ Defects visible from the allocation counts alone are filed: [#103](https://github.com/go-ndarray/ndarray/issues/103) (`Choice`: 200 013 allocations for 100 000 draws, fixed in v0.40.2: 13) and [#104](https://github.com/go-ndarray/ndarray/issues/104) (`linalg` -decompositions: 90 to 276 allocations per 64 x 64 call). +decompositions: 90 to 276 allocations per 64 x 64 call; partly addressed in +v0.40.3, which takes the serial GEMM path at one worker and pools `fastGemm`'s +temporary: Lstsq 276 to 250, SVD 265 to 241, Pinv 255 to 230, Eigh 166 to 154, +QR 93 to 81, Eig 89 to 80, Solve 40 to 37, Inv 30 to 27, `MatMul`/`Dot` 128² 13 +to 8; the issue stays open). diff --git a/content/en/random.md b/content/en/random.md index 36dfccc..e461606 100644 --- a/content/en/random.md +++ b/content/en/random.md @@ -8,9 +8,9 @@ description: "numpy.random with NumPy's numbers for the same seed: the bit gener tags: [random, numpy] --- -> Mirrored from [`docs/random.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/random.md) at v0.40.2. +> Mirrored from [`docs/random.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/random.md) at v0.40.3. -Package [`random`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.40.2/random) is `numpy.random` over go-ndarray arrays. Its goal +Package [`random`](https://pkg.go.dev/github.com/go-ndarray/ndarray@v0.40.3/random) is `numpy.random` over go-ndarray arrays. Its goal is migration: a notebook moved from NumPy to Go keeps its numbers for the same seed. @@ -24,7 +24,7 @@ u, _ := random.Rand(3) // np.random.rand(3) ``` `Example`, `ExampleSeed` and `ExampleGenerator_ChoiceN` in -[`example_test.go`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/random/example_test.go) print NumPy's own numbers. +[`example_test.go`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/random/example_test.go) print NumPy's own numbers. ## What is implemented @@ -142,7 +142,7 @@ random arguments. Used as-is, that made 3% of `np.random.randn` values and 10% of `lognormal` values one ULP off. So `random` rounds `log`, `log1p`, `exp`, `expm1` and `pow` **correctly** -([`libm.go`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/random/libm.go)): a fast evaluation to about 2⁻⁶⁸ with Ziv's +([`libm.go`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/random/libm.go)): a fast evaluation to about 2⁻⁶⁸ with Ziv's rounding test, and a double-double fallback (about 2⁻¹⁰⁰) for the one argument in ~2¹⁵ that needs it. Checked against mpmath at 300 bits on 63,000 arguments (0 misrounded; the committed `libm.json` keeps 8,400), and the fast paths diff --git a/content/en/roadmap.md b/content/en/roadmap.md index bb83fad..75eda16 100644 --- a/content/en/roadmap.md +++ b/content/en/roadmap.md @@ -8,7 +8,7 @@ description: "The plan for go-ndarray and what ships today." tags: [roadmap] --- -> Mirrored from [`docs/plan-ndarray.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.2/docs/plan-ndarray.md) at v0.40.2. +> Mirrored from [`docs/plan-ndarray.md`](https://github.com/go-ndarray/ndarray/blob/v0.40.3/docs/plan-ndarray.md) at v0.40.3. > Goal: a **pure-Go (CGO=0)** NumPy-style N-dimensional array library, as a > **standalone, reusable** module with correct scalar kernels now and a clean @@ -112,7 +112,7 @@ suite (plus the per-arch CI jobs already wired in `.github/workflows/ci.yml`). - **Performance — DONE (beats NumPy on its core ops; matmul at tuned-BLAS parity).** Several levers behind the kernel seam, measured honestly vs NumPy 2.2.4 (see [docs/perf.md](performance.md) and the repo's - [BENCHMARKS.md](https://github.com/go-ndarray/ndarray/blob/v0.40.2/BENCHMARKS.md)): + [BENCHMARKS.md](https://github.com/go-ndarray/ndarray/blob/v0.40.3/BENCHMARKS.md)): - **Multicore.** `Add/Sub/Mul/Div/Map`, `Sum/Max/Min`, the axis reductions, `Concatenate`/`Stack`, and the GEMM fan out across `GOMAXPROCS` above a size threshold (small arrays stay serial). Plus an allocation fix: the diff --git a/content/en/security.md b/content/en/security.md index 55c25e5..49efac9 100644 --- a/content/en/security.md +++ b/content/en/security.md @@ -8,7 +8,7 @@ description: "How to report a vulnerability, what the library guarantees, and th tags: [security] --- -> Mirrored from [`SECURITY.md`](https://github.com/go-ndarray/ndarray/blob/main/SECURITY.md) at v0.40.2. +> Mirrored from [`SECURITY.md`](https://github.com/go-ndarray/ndarray/blob/main/SECURITY.md) at v0.40.3. ## Reporting diff --git a/hugo.yaml b/hugo.yaml index f4cb91b..13e43a2 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -100,7 +100,7 @@ params: # The ndarray release these pages describe. Its minor version is the # documentation's version label (v0.9.1 -> 0.9): the CI reads it here. ndarray: - version: "v0.40.2" + version: "v0.40.3" navbar: displayTitle: true