公开问题
Is a cache-oblivious stencil still worth it on current memory hierarchies?
发布于 2026-08-18最近更新 2026-08-20235 次浏览
The classic results are from machines with a very different ratio of bandwidth to compute. On our current nodes a straightforwardly blocked stencil with tuned tile sizes is beating our cache-oblivious implementation by about 15%, which is the opposite of what the literature led me to expect.
I would like to know whether that is a fact about current hardware or a fact about my implementation, and what measurement would distinguish them.
1 个回答
Measure the bandwidth you are actually achieving, not the time.
If the blocked version is at 80% of stream and the oblivious one is at 65%, it is your implementation — the recursion overhead is eating the margin, and that shows up as instructions rather than as misses. If both are near stream, the memory system is doing the blocking for you and the 15% is prefetcher behaviour the oblivious layout defeats.
Two counters and half an hour will tell you which.