You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f638f7a
Browse filesBrowse the repository at this point in the historyBrowse files
Landing: ppc64le VSX kernels and ndarray v0.2.3 (#11)
ndarray v0.2.3 (go-ndarray/ndarray#20) adds VSX SIMD kernels on ppc64le.
The SIMD wording now names amd64, arm64 and ppc64le, ppc64le leaves the
list of targets running the pure-Go reference code, the GEMM blurb lists
the VSX 8x8 micro-kernel next to NEON and AVX2/FMA, and the library card
shows v0.2.3.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
description = "go-ndarray is a pure-Go (CGO=0) NumPy-style n-dimensional array library for float64 — slicing/views, broadcasting, ufuncs, reductions and linear algebra, multicore + SIMD on amd64and arm64, with a Workspace arena for loops."
15
+
description = "go-ndarray is a pure-Go (CGO=0) NumPy-style n-dimensional array library for float64 — slicing/views, broadcasting, ufuncs, reductions and linear algebra, multicore + SIMD on amd64, arm64 and ppc64le, with a Workspace arena for loops."
16
16
17
17
# The colours are read by partials/styles.html. Emerald, shared with go-fft:
18
18
# the two are one scientific-computing family, told apart by their glyphs.
# its card, "kind" as the card's tag, "href" as both links, "blurb" in full.
73
73
[[params.repos]]
74
74
name = "ndarray"
75
-
kind = "library · v0.2.2"
75
+
kind = "library · v0.2.3"
76
76
href = "https://github.com/go-ndarray/ndarray"
77
-
blurb = "The library. Creation (<code>Zeros</code>/<code>Arange</code>/<code>Linspace</code>/…), strided <strong>views</strong>, broadcasting elementwise + ufuncs, reductions (<code>Sum</code>/<code>Max</code>/<code>ArgMax</code>/<code>CumSum</code>/<code>Clip</code>/<code>Where</code>), manipulation (<code>Reshape</code>/<code>Concatenate</code>/<code>Stack</code>), linalg (<code>MatMul</code>/<code>Dot</code>) via a panel-packed cache-blocked GEMM with a go-asmgen SIMD-FMA micro-kernel (NEON 4×8 on arm64, AVX2/FMA 6×8 on amd64), and a <code>Workspace</code> arena for loops (<code>Use</code>/<code>Reset</code>/<code>Detach</code>)."
77
+
blurb = "The library. Creation (<code>Zeros</code>/<code>Arange</code>/<code>Linspace</code>/…), strided <strong>views</strong>, broadcasting elementwise + ufuncs, reductions (<code>Sum</code>/<code>Max</code>/<code>ArgMax</code>/<code>CumSum</code>/<code>Clip</code>/<code>Where</code>), manipulation (<code>Reshape</code>/<code>Concatenate</code>/<code>Stack</code>), linalg (<code>MatMul</code>/<code>Dot</code>) via a panel-packed cache-blocked GEMM with a go-asmgen SIMD-FMA micro-kernel (NEON 4×8 on arm64, AVX2/FMA 6×8 on amd64, VSX 8×8 on ppc64le), and a <code>Workspace</code> arena for loops (<code>Use</code>/<code>Reset</code>/<code>Detach</code>)."
<pclass="lead">NumPy is the lingua franca of numerical computing, but in Go the choices are <code>gonum</code> (matrix-centric, amd64-only assembly) or a C extension. go-ndarray brings the <b>n-dimensional array</b> vocabulary — shapes, strided views, broadcasting, ufuncs, reductions and linear algebra — to Go with <b>no cgo</b>, cross-compiling to a static binary everywhere. The hot paths are multicore, and SIMD on amd64and arm64.</p>
63
+
<pclass="lead">NumPy is the lingua franca of numerical computing, but in Go the choices are <code>gonum</code> (matrix-centric, amd64-only assembly) or a C extension. go-ndarray brings the <b>n-dimensional array</b> vocabulary — shapes, strided views, broadcasting, ufuncs, reductions and linear algebra — to Go with <b>no cgo</b>, cross-compiling to a static binary everywhere. The hot paths are multicore, and SIMD on amd64, arm64 and ppc64le.</p>
64
64
<divclass="grid" id="quality">
65
65
<divclass="card"><divclass="ico">🐹</div><h3>Pure Go</h3><p><code>CGO_ENABLED=0</code> across the org. No cgo, no BLAS shim.</p></div>
66
66
<divclass="card"><divclass="ico">✅</div><h3>100% test coverage</h3><p>Gated in CI, differentially checked against <code>numpy</code>.</p></div>
67
67
<divclass="card"><divclass="ico">🔢</div><h3>NumPy semantics</h3><p>Row-major strided arrays, <b>NumPy broadcasting</b>, and NumPy basic-indexing <code>Slice</code> returning strided views that share data.</p></div>
68
68
<divclass="card"><divclass="ico">♻️</div><h3><code>Workspace</code> arena for loops</h3><p>Bind the inputs with <code>ws.Use</code>, compute as usual, <code>ws.Reset()</code> at the end of each pass: results stop costing the garbage collector anything. On a Zen 3, <code>x + y</code> on 1 024 elements drops from 2.6 to 0.38 µs (2.1× NumPy).</p></div>
69
-
<divclass="card"><divclass="ico">⚡</div><h3>SIMD on amd64& arm64</h3><p>go-asmgen SIMD kernels on amd64 (SSE2, AVX2/FMA picked at run time) and arm64 (NEON); riscv64, loong64, ppc64le, s390x and the 32-bit targets run the same pure-Go code those kernels are tested against.</p></div>
69
+
<divclass="card"><divclass="ico">⚡</div><h3>SIMD on amd64, arm64 & ppc64le</h3><p>go-asmgen SIMD kernels on amd64 (SSE2, AVX2/FMA picked at run time), arm64 (NEON) and ppc64le (VSX); riscv64, loong64, s390x and the 32-bit targets run the same pure-Go code those kernels are tested against.</p></div>
70
70
<divclass="card"><divclass="ico">🎯</div><h3>Accurate <code>Exp</code>/<code>Log</code></h3><p>Ports of Arm's optimized-routines: worst 0.504 / 0.508 ULP against a 300-bit reference, and correct where Go's amd64 <code>math.Exp</code> returns +Inf (<ahref="https://github.com/golang/go/issues/81995"><u>golang/go#81995</u></a>) and <code>math.Log</code> is wrong on subnormals (<ahref="https://github.com/golang/go/issues/56600"><u>golang/go#56600</u></a>).</p></div>
71
71
<divclass="card"><divclass="ico">🧪</div><h3>Multi-arch CI</h3><p>The suite runs on amd64, arm64 and 386 natively and on riscv64/loong64/ppc64le/s390x/arm under qemu, on Linux, macOS and Windows, and compiles for every <code>GOOS/GOARCH</code> pair Go supports; v0.2.0 was also run on real amd64, arm64, ppc64le, riscv64 and loong64 hardware.</p></div>
72
72
<divclass="card"><divclass="ico">💎</div><h3>The cgo-free ndarray that was missing</h3><p>Ruby has no cgo-free ndarray (<code>Numo::NArray</code> and <code>NMatrix</code> are C extensions) and <code>gonum</code>'s optimized assembly is amd64-only. go-ndarray pairs a portable pure-Go core with multicore fan-out and SIMD kernels.</p></div>
<h2>The cgo-free ndarray the Go and Ruby ecosystems lacked.</h2>
103
-
<p>No cgo, no BLAS shim. A portable pure-Go core, multicore, with SIMD kernels on amd64and arm64 and a <code>Workspace</code> arena that takes the garbage collector out of loops. Faster than NumPy on whole-array and row reductions, on large <code>Exp</code> and on <code>MatMul</code> against single-threaded BLAS, slower against 16-thread BLAS — the numbers are on the <ahref="https://go-ndarray.github.io/docs/latest/performance/"><u>performance page</u></a>.</p>
103
+
<p>No cgo, no BLAS shim. A portable pure-Go core, multicore, with SIMD kernels on amd64, arm64 and ppc64le and a <code>Workspace</code> arena that takes the garbage collector out of loops. Faster than NumPy on whole-array and row reductions, on large <code>Exp</code> and on <code>MatMul</code> against single-threaded BLAS, slower against 16-thread BLAS — the numbers are on the <ahref="https://go-ndarray.github.io/docs/latest/performance/"><u>performance page</u></a>.</p>
104
104
<aclass="btn btn-ghost" href="https://github.com/go-ndarray/ndarray">Read the source on GitHub →</a>
0 commit comments