Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ title = 'go-ndarray'
disableKinds = ['taxonomy', 'term', 'rss', 'sitemap']

[params]
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, faster than NumPy on the parallelizable core."
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 and arm64, with a Workspace arena for loops."
brand = "go-ndarray"
github = "go-ndarray"
heroAccent = "go-ndarray"
heroTagline = "NumPy-style n-dimensional arrays in pure Go. float64, multicore + SIMD."

heroIntro = [
"<strong>go-ndarray</strong> is the <code>numpy</code> equivalent for Go: a float64 n-dimensional array with creation routines, <strong>strided views that share data</strong>, broadcasting elementwise ops and ufuncs, reductions (incl. arg / cumulative / clip / where), manipulation, and linear algebra (a panel-packed, cache-blocked GEMM) — all in <strong>pure Go, with cgo disabled</strong>.",
"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 scalar core with multicore fan-out and go-asmgen SIMD kernels, beating single-threaded NumPy on the parallelizable core. 100% test coverage is the bar, differentially checked against numpy 2.2."
"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, on amd64 and arm64, go-asmgen SIMD kernels; a <code>Workspace</code> arena takes the garbage collector out of loops. Measured against NumPy 2.5.3 on a 16-core Zen 3 it is faster on whole-array and row reductions, on <code>Exp</code> from 256 Ki elements and on <code>MatMul</code> against single-threaded OpenBLAS, and slower against 16-thread BLAS. 100% test coverage is the bar, differentially checked against NumPy."
]

[menu]
Expand Down
19 changes: 11 additions & 8 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ <h2>Why go-ndarray</h2>
brings the <strong>n-dimensional array</strong> vocabulary &mdash; shapes, strided
views, broadcasting, ufuncs, reductions and linear algebra &mdash; to Go with
<strong>no cgo</strong>, cross-compiling to a static binary everywhere. The hot paths
are multicore + SIMD, so it <strong>beats single-threaded NumPy</strong> on the
parallelizable core. It is the cgo-free ndarray the Go and Ruby ecosystems lacked.
are multicore, and SIMD on amd64 and arm64, so it <strong>beats NumPy</strong> on
whole-array and row reductions, large <code>Exp</code> and <code>MatMul</code> against
single-threaded BLAS; a <code>Workspace</code> arena removes the garbage-collector cost
of temporaries in loops. It is the cgo-free ndarray the Go and Ruby ecosystems lacked.
</p>
</section>

Expand All @@ -28,11 +30,11 @@ <h2>Repositories</h2>
<div class="grid">
<div class="card">
<h4><a href="https://github.com/go-ndarray/ndarray">ndarray</a></h4>
<p>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>), and linalg (<code>MatMul</code>/<code>Dot</code>) via a panel-packed cache-blocked GEMM with a go-asmgen SIMD-FMA micro-kernel.</p>
<p>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&times;8 on arm64, AVX2/FMA 6&times;8 on amd64), and a <code>Workspace</code> arena for loops (<code>Use</code>/<code>Reset</code>/<code>Detach</code>).</p>
</div>
<div class="card">
<h4><a href="https://go-ndarray.github.io/docs/">docs</a></h4>
<p>Versioned documentation site (MkDocs Material): API reference, the roadmap, and honest benchmark pages versus NumPy 2.2 / OpenBLAS. <a href="https://github.com/go-ndarray/docs">Source →</a></p>
<p>Versioned documentation site (MkDocs Material): API reference, the roadmap, and honest benchmark pages versus NumPy 2.5.3 / OpenBLAS 0.3.34. <a href="https://github.com/go-ndarray/docs">Source →</a></p>
</div>
<div class="card">
<h4><a href="https://github.com/go-ndarray/brand">brand</a></h4>
Expand All @@ -45,10 +47,11 @@ <h4><a href="https://github.com/go-ndarray/brand">brand</a></h4>
<h2>Quality bar</h2>
<ul class="features">
<li><strong>Pure Go.</strong> <code>CGO_ENABLED=0</code> across the org. No cgo, no BLAS shim.</li>
<li><strong>100% test coverage.</strong> Gated in CI, differentially checked against <code>numpy</code> 2.2.</li>
<li><strong>Faster than NumPy</strong> on the parallelizable core (Add/Mul/Sum/Sqrt/Max) — multicore fan-out + SIMD. The packed GEMM reaches <strong>tuned-BLAS parity at 1024&sup2;</strong> (&approx;1.00&times; single-threaded vecLib, ~373 GFLOP/s) and beats the pure-Go <code>gonum</code> <strong>4&ndash;10&times;</strong>; <code>Dot</code> wins at parity. Honest where tuned BLAS still leads at small n.</li>
<li><strong>Multi-arch.</strong> Portable scalar core on all six 64-bit targets; go-asmgen SIMD kernels where the Go assembler allows it.</li>
<li><strong>BSD-3-Clause</strong> on every source file.</li>
<li><strong>100% test coverage.</strong> Gated in CI, differentially checked against <code>numpy</code>.</li>
<li><strong>Measured, wins and losses.</strong> Against NumPy 2.5.3 + OpenBLAS 0.3.34 on a 16-core AMD Zen 3: <strong>faster</strong> on whole-array <code>Sum</code>/<code>Mean</code>/<code>Max</code> at 4&nbsp;Mi (2.3&ndash;4.5&times;), <code>SumAxis(1)</code> (2.2&times;), <code>MaxAxis(1)</code> (1.7&times;), <code>Exp</code> from 256&nbsp;Ki elements (2.4&ndash;5.6&times;) and <code>MatMul</code> against single-threaded OpenBLAS (3.7&ndash;5.9&times; from 512&sup2;); <strong>slower</strong> against 16-thread OpenBLAS (<code>MatMul</code> 0.55&times; at 1024&sup2;, <code>Dot</code>/mat&middot;vec 0.16&times;) and on allocating elementwise forms outside a <code>Workspace</code>. In a <code>Workspace</code>, <code>x + y</code> on 1&nbsp;024 elements drops from 2.6 to 0.38&nbsp;&micro;s (2.1&times; NumPy). On Apple silicon the packed GEMM reaches <strong>tuned-BLAS parity at 1024&sup2;</strong> and beats the pure-Go <code>gonum</code> <strong>4&ndash;10&times;</strong>.</li>
<li><strong>Accurate <code>Exp</code>/<code>Log</code>.</strong> 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 (<a href="https://github.com/golang/go/issues/81995">golang/go#81995</a>) and <code>math.Log</code> is wrong on subnormals (<a href="https://github.com/golang/go/issues/56600">golang/go#56600</a>).</li>
<li><strong>Multi-arch.</strong> 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. CI runs the suite on amd64, arm64 and 386 natively and on riscv64/loong64/ppc64le/s390x/arm under qemu, on Linux, macOS and Windows, and compiles it for every <code>GOOS/GOARCH</code> pair Go supports; v0.2.0 was also run on real amd64, arm64, ppc64le, riscv64 and loong64 hardware.</li>
<li><strong>BSD-3-Clause</strong> licensed; <code>Exp</code> and <code>Log</code> are MIT-licensed ports of Arm's optimized-routines.</li>
</ul>
</section>
{{ end }}
Loading