nx_conv_speedup.nx
buildroot/runtime/nx_conv_speedup.nx
about
THE PAYOFF: a real 2D convolution (1024x1024, 15x15 kernel), run SERIAL then THREADED (nx_thread_pool, 8
workers on disjoint output-row bands -- no shared writes, no atomics), with a measured wall-time speedup.
Pointers travel via a ctx struct (NOT module statics -- the compiler has a PRE-EXISTING multi-static bug,
proven pre-dating all recent compiler work), which is the same pattern nx_parallel uses.
dependencies 2 imports · 0 importers
imports: nx_thread_pool.nxnx_fmt.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| 13 | struct ConvCtx |
consts
| 8 | const IMG_W: i64 = 1024 |
| 9 | const IMG_H: i64 = 1024 |
| 10 | const K: i64 = 15 |
| 11 | const NWORK: i64 = 8 |
| 20 | const CONVCTX_BYTES: i64 = 40 |
functions
| 22 | func conv_range(in_p: *i64, out_p: *i64, ker_p: *i64, y0: i64, y1: i64) -> i64 |
| 50 | func conv_task(ctx_i: i64) -> i64 calls 1: conv_range |
| 56 | func main() -> i64 |