Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
ddf8ea0
Fix: Safeguard `try` for `std::thread`
ashvardanian Oct 9, 2025
0ec9ae9
Docs: Why no Miri or Loom?
ashvardanian Oct 9, 2025
916e641
Add: Draft Zig binding
ashvardanian Oct 10, 2025
d9455c8
Improve: Thread name formatting
ashvardanian Oct 10, 2025
fb063a7
Fix: Use aligned allocs for `opaque_pool_t`
ashvardanian Oct 11, 2025
0b9ed05
Improve: Handle `void` contexts
ashvardanian Oct 11, 2025
6d6283a
Make: Upgrade Zig to v0.16
ashvardanian Oct 11, 2025
bf998f9
Add: Bench against libXEV and Spice
ashvardanian Oct 11, 2025
ca3d42b
Improve: Static slicing for `std.Thread.Pool`
ashvardanian Oct 11, 2025
e8c6b48
Improve: Test C stable API
ashvardanian Oct 11, 2025
a21ac35
Make: Skip C11 tests on MSVC - lacking atomics
ashvardanian Oct 11, 2025
1e9540f
Make: Apple's `libSystem` contains Blocks runtime
ashvardanian Oct 11, 2025
18b6d63
Improve: Add `worker_yield_t` hook for idle backoff
guillaumeriousat Oct 8, 2025
101a955
Fix: Route `standard_worker_yield` through `micro_yield()`
guillaumeriousat Oct 8, 2025
53e1b5d
Improve: Select worker-yield overloads with `if constexpr`
guillaumeriousat Oct 9, 2025
541842c
Improve: Shared `call_yield_` with & w/out thread
ashvardanian Oct 11, 2025
ac41200
Merge branch 'pr/feat-worker-yield' into main-dev
ashvardanian Oct 11, 2025
86b95aa
Merge branch 'zig' into main-dev
ashvardanian Oct 11, 2025
bbb9e90
Add: NUMA-aware allocator for Zig
ashvardanian Oct 11, 2025
0167211
Make: Backport to Zig 0.15
ashvardanian Oct 11, 2025
a707d55
Fix: Deprecate `spice` comparison
ashvardanian Oct 11, 2025
9982ad9
Improve: `RoundRobinVec` code nesting
ashvardanian Oct 18, 2025
46bb382
Improve: Validate `CacheAligned` padding
ashvardanian Oct 18, 2025
3bf34e9
Fix: Over-aligned `AllocationResult`
ashvardanian Oct 19, 2025
e7932c4
Add: Reductions in Rust
ashvardanian Oct 19, 2025
cb6b257
Add: Stoppable & Exception-handling `try_for`
ashvardanian Oct 19, 2025
0911619
Break: Name spacing/capitalization
ashvardanian Oct 19, 2025
9a08a62
Make: Bump CI
ashvardanian Oct 22, 2025
6da19ed
Break: New project name & link
ashvardanian Mar 16, 2026
7de0186
Merge: WFET patches
ashvardanian Mar 25, 2026
1545311
Break: Generation tokens for non-blocking multi-pool coordination
ashvardanian Jul 9, 2026
0c92de8
Merge: v3 redesign & hardware checks
ashvardanian Jul 9, 2026
39b007c
Fix: Rust examples for by-reference `for_threads`
ashvardanian Jul 9, 2026
d3a2a5a
Chore: Drop decorative comment banners
ashvardanian Jul 9, 2026
d230ab1
Make: Bump CI runners and add Arm64 + sanitizer coverage
ashvardanian Jul 9, 2026
64d4bdf
Break: Split topology into compute and memory domains
ashvardanian Jul 9, 2026
f12d0ef
Docs: Reword prong metadata for two-axis topology
ashvardanian Jul 9, 2026
c27faf8
Add: Memory tiers, cpuless domains, HMAT metrics, and macOS harvest
ashvardanian Jul 9, 2026
d8e170f
Make: Rename allocator numa_node to memory_domain
ashvardanian Jul 9, 2026
b71341f
Add: Rust scope() API replacing the SafePtr smuggle
ashvardanian Jul 9, 2026
6c7f62d
Add: Miri coverage of the pure-Rust unsafe
ashvardanian Jul 9, 2026
0272b39
Docs: Reword stale topology phrasing to compute/memory domains
ashvardanian Jul 9, 2026
3ebeea5
Fix: NUMA topology harvesting on multi-socket hosts
ashvardanian Jul 9, 2026
95df7bc
Improve: Compute-domain metadata across the bindings
ashvardanian Jul 9, 2026
384bef5
Break: Sound, allocation-free `RoundRobinVec` bulk operations
ashvardanian Jul 9, 2026
8350177
Improve: NUMA backends for the Rust N-body, and dual-socket results
ashvardanian Jul 9, 2026
82ee57d
Chore: Drop the last decorative rule lines
ashvardanian Jul 9, 2026
5ea9298
Improve: Private claim cursors for `for_n_dynamic`
ashvardanian Jul 9, 2026
1cbd17f
Merge: Multi-socket harvesting & sound Rust bulk ops
ashvardanian Jul 9, 2026
c5f30cd
Fix: Seed where a stealing thread starts probing, not just its stride
ashvardanian Jul 9, 2026
ec013e8
Break: Layer capability macros, split the umbrella header
ashvardanian Jul 10, 2026
0020411
Make: Expose each capability as an AUTO/ON/OFF tri-state
ashvardanian Jul 10, 2026
818151a
Break: Remove every back-compatibility shim
ashvardanian Jul 10, 2026
93a92b9
Chore: One documentation convention, enforced by hooks
ashvardanian Jul 10, 2026
2ae8150
Add: Windows support for topology, NUMA pools, and pinning
ashvardanian Jul 10, 2026
33497ab
Fix: Size and pin pools from the cores we were given
ashvardanian Jul 10, 2026
586e138
Add: Owning arrays, and rebuild the topology on them
ashvardanian Jul 10, 2026
fa78301
Break: One vocabulary, one canonical order, across every surface
ashvardanian Jul 10, 2026
f7f53bb
Chore: Name detection macros consistently
ashvardanian Jul 10, 2026
d7774e5
Add: Monitored waits, per-loop wait bounds, and Zawrs
ashvardanian Jul 10, 2026
6d29828
Fix: Restore Windows NUMA allocation and page-size probe
ashvardanian Jul 10, 2026
c2e9669
Improve: Cleaner feature controls, one set across the SDKs
ashvardanian Jul 10, 2026
90546ed
Improve: Unified capability enumeration, `pool_kind_t`, leaner ABI
ashvardanian Jul 11, 2026
6903711
Break: Explicit `fu_topology_t` handle across the C ABI, no singletons
ashvardanian Jul 11, 2026
06bf8fe
Break: DomainAllocator, symmetric containers, SDK benchmark alignment
ashvardanian Jul 13, 2026
12bab43
Improve: Full backend matrix via one compile-time-policy dispatch per…
ashvardanian Jul 13, 2026
05ed868
Fix: Assemble the WFET capability probe on stock toolchains
ashvardanian Jul 13, 2026
3833a67
Fix: Build clean under -Wall -Wextra -Werror
ashvardanian Jul 13, 2026
d171746
Make: Expand CI to validate cross-platform compatibility
ashvardanian Jul 13, 2026
7560030
Chore: Split Rust and Zig bindings into per-header modules
ashvardanian Jul 13, 2026
e85d35f
Fix: Harden pool-completion tests against scheduler starvation
ashvardanian Jul 13, 2026
a960fa3
Improve: Reach the CPU yield intrinsics on MSVC
ashvardanian Jul 13, 2026
1da97c7
Fix: Assemble the RISC-V pause hint on stock toolchains
ashvardanian Jul 13, 2026
7a4fd4e
Improve: Flatten the libc and hwprobe capability detection
ashvardanian Jul 13, 2026
b903e50
Improve: Model Android and FreeBSD affinity and scheduling
ashvardanian Jul 13, 2026
5f26aba
Make: Build the old-glibc floor on manylinux_2_28
ashvardanian Jul 13, 2026
315da41
Fix: Cross-platform CI test failures
ashvardanian Jul 13, 2026
ef3d11c
Make: Static-link the qemu-run cross-compile test binaries
ashvardanian Jul 14, 2026
c427d6c
Improve: Locate and value-print test failures, backtrace on crash
ashvardanian Jul 14, 2026
239e3b0
Fix: Robust NUMA placement under sandboxed and single-node hosts
ashvardanian Jul 14, 2026
f30ce60
Fix: Route platform checks through the FU_* vocabulary
ashvardanian Jul 14, 2026
c7be3fb
Improve: Steer Apple efficiency-core pools via QoS
ashvardanian Jul 14, 2026
e351fd1
Make: Refresh retired CI runners, fix FreeBSD linkage
ashvardanian Jul 14, 2026
4ce5b40
Make: Bump Zig to 0.16 for macOS 26
ashvardanian Jul 14, 2026
4145073
Add: Cache-line demote & promote hints for x86, Arm, and RISC-V
ashvardanian Jul 14, 2026
ea5399a
Improve: Pools carry a cache-hints policy beside the yield
ashvardanian Jul 14, 2026
c525460
Improve: Private cursors, read-probes, and demotions in dynamic stealing
ashvardanian Jul 14, 2026
134b7f6
Improve: Dispatch curated yield-and-hints pool variants at runtime
ashvardanian Jul 14, 2026
50d39e2
Improve: Flatten the distributed pool's colocations into one array
ashvardanian Jul 14, 2026
11aa660
Fix: Hoist dead work and stale docs out of the pool internals
ashvardanian Jul 14, 2026
ef68bca
Make: Align benchmark builds and add Taskflow as a baseline
ashvardanian Jul 14, 2026
2604198
Add: Label-propagation benchmark replacing triangle counting
ashvardanian Jul 14, 2026
198b04f
Make: Install git in the FreeBSD CI VM for Taskflow fetch
ashvardanian Jul 14, 2026
6a84509
Add: FreeBSD reschedule, topology, memory placement, and superpages
ashvardanian Jul 14, 2026
45eb844
Improve: Time-budgeted benchmarks, symmetric across C++, Rust, and Zig
ashvardanian Jul 14, 2026
6b77064
Improve: Deepen test coverage across schedulers, lifecycles, and the …
ashvardanian Jul 14, 2026
02bb703
Improve: Normalize the N-body kernels across languages
ashvardanian Jul 14, 2026
feeaddd
Improve: Flatten test bodies into helpers and split bundled concerns
ashvardanian Jul 14, 2026
e3d7ff2
Make: Restructure the pre-release CI around matrices and ctest
ashvardanian Jul 14, 2026
c2eb3a7
Fix: Probe FreeBSD's memory placement at runtime, not just compile time
ashvardanian Jul 14, 2026
a52dfef
Make: Rewrite the pre-commit hook single-pass and Windows-proof
ashvardanian Jul 14, 2026
e3396ec
Docs: Refresh the README against the v3 APIs and slim the benchmarks
ashvardanian Jul 14, 2026
1be2492
Make: Green the CI matrix - apt sources, tar, shellcheck, cross rows
ashvardanian Jul 14, 2026
0891489
Fix: Build the timed-wait monitors under -march=native
ashvardanian Jul 14, 2026
4e87654
Fix: Sync build-system references to place-* feature names
ashvardanian Jul 15, 2026
c2ee9d5
Chore: Add dprint/taplo config-file formatters
ashvardanian Jul 15, 2026
45e4753
Docs: Refresh the intro and complete the v3 API coverage
ashvardanian Jul 15, 2026
c322c93
Add: Enumerate per-domain cache sizes from sysfs and CPUID
ashvardanian Jul 15, 2026
3465c2d
Improve: Hoist the SplitMix64 avalanche into the shared types
ashvardanian Jul 15, 2026
49290e7
Break: Measure the memory fabric in-process, replacing HMAT and kerne…
ashvardanian Jul 15, 2026
35e439b
Add: Bind the measured fabric to Rust and Zig
ashvardanian Jul 15, 2026
a6e9843
Docs: Rewrite the topology guide around the declared-versus-observed …
ashvardanian Jul 15, 2026
6fc9312
Make: Version the duplicated macros in types.hpp
ashvardanian Jul 15, 2026
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
Prev Previous commit
Next Next commit
Improve: Private claim cursors for for_n_dynamic
A single shared counter serialized every dynamic dispatch: one core at a time
may own its cache line, so no dispatch retired tasks faster than that line
circulated. At a grain of 8 iterations per task, 18 threads spent 288 ms where
a static split spent 8 ms.

Give each thread its own cursor over a contiguous slice. A thread drains its
own slice with an uncontended `fetch_add`, then walks the others in a coprime
order and drains theirs. Tasks are still claimed one at a time, so the makespan
guarantee of greedy list scheduling survives; only the cost of a claim changes.
An uncontended read-modify-write measures 0.13 ns here against 6.63 ns for a
contended one, and two sharers cost nearly what eighteen do - the price is the
line transfer, not the crowd. The same dispatch now takes 9.0 ms.

No compare-exchange is used: under contention it measured 26.4 ns per success
with 1.3 retries, four times the cost of `fetch_add`. This mirrors what
`invoke_distributed_for_n_dynamic` already did across compute domains, one
level down.

The cursors allocate nothing. `basic_pool` folds each into the padded per-thread
cell that already holds its `std::thread`, and the NUMA pool folds each into the
`numa_pthread_t` it already allocates on the right node. A single-thread pool
allocates nothing at all and runs the loop directly.

Also fixes two defects found on the way:

- `coprime_permutation_range` was not a permutation for small index types.
  `offset_ + stride_` was truncated before the wrap, so on `std::uint8_t` over a
  length of 253 it revisited 155 values and skipped 155. A stealing thread would
  drain a victim twice, overrun its cursor past the index type, and re-run tasks.
  The test only counted values and checked bounds, so it never noticed; it now
  asserts each value appears exactly once.
- `basic_pool::try_spawn` rolled back by deallocating `threads` objects where it
  had allocated `worker_threads`.
  • Loading branch information
ashvardanian committed Jul 9, 2026
commit 5ea9298e4c20d5d77fe3e6dfa03bf37c52e02a64
Loading