Speeding up GPU copies by permuting iteration spaces, or, optimising the identity function
Web page · https://futhark-lang.org/blog/2026-10-31-faster-copying.html
First seen by Oriel on .
AI summary
Futhark accelerates difficult GPU array copies by dynamically permuting LMAD iteration dimensions according to memory strides, improving coalescing and delivering up to 36× speedups in targeted cases.
- Futhark represents array layouts with linear memory access descriptors (LMADs), storing dimension sizes and strides for runtime copy optimization.
- The new optimization sorts LMAD dimensions by source stride, secondarily destination stride, so neighboring GPU threads access nearby memory locations.
- The approach targets copies that cannot use memcpy() or recognized transpose kernels, while retaining parallel elementwise copying as a fallback.
- On an AMD RX 7900 XT, slice_2d improved from 17,561μs to 971μs for [8192][8193]i32, approximately 18× faster.
- Across the Futhark benchmark suite, overall gains were modest, with most programs unchanged and exceptions improving by at most 10%; CPU effects remain prospective.
#futhark #gpu programming #array layouts #memory coalescing
Generated by gpt-5.6-sol. Check the original for details.
Metric trends
Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained
Points
Score reported by the source.
- Lobsters: 6, latest observation ; +5 over observed period since
Comments
Comment count reported by the source.
- Lobsters: 2, latest observation ; +2 over observed period since
Aliases
| Source | External ID | URL |
|---|---|---|
| Lobsters | 1abkzu | https://futhark-lang.org/blog/2026-10-31-faster-copying.html Read discussion |