frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Faster sorting with SIMD CUDA intrinsics (2024)

https://winwang.blog/posts/bitonic-sort/
92•winwang•8mo ago
Code at https://github.com/wiwa/blog-code/

Comments

ashvardanian•8mo ago
The article covers extremely important CUDA warp-level synchronization/exchange primitives, but it's not what is generally called SIMD in the CUDA land .

Most "CUDA SIMD" intrinsics are designed to process a 32-bit data pack containing 2x 16-bit or 4x 8-bit values (<https://docs.nvidia.com/cuda/cuda-math-api/cuda_math_api/gro...>). That significantly shrinks their applicability in most domains outside of video and string processing. I've had pretty high hopes for DPX on Hopper (<https://developer.nvidia.com/blog/boosting-dynamic-programmi...>) instructions and started integrating them in StringZilla last year, but the gains aren't huge.

winwang•8mo ago
Oh wow, TIL, thanks. I usually call stuff like that SWAR, and every now-and-then I try to think of a way to (fruitfully) use it. The "SIMD" in this case was just an allusion to warp-wide functions looking like how one might use SIMD in CPU code, as opposed to typical SIMT CUDA.

Also, StringZilla looks amazing -- I just became your 1000th Github follower :)

ashvardanian•8mo ago
Thanks, appreciate the gesture :)

Traditional SWAR on GPUs is a fascinating topic. I've begun assembling a set of synthetic benchmarks to compare DP4A vs. DPX (<https://github.com/ashvardanian/less_slow.cpp/pull/35>), but it feels incomplete without SWAR. My working hypothesis is that 64-bit SWAR on properly aligned data could be very useful in GPGPU, though FMA/MIN/MAX operations in that PR might not be the clearest showcase of its strengths. Do you have a better example or use case in mind?

winwang•8mo ago
I don't -- unfortunately not too well-versed in this field! But I was a bit fascinated with SWAR after I randomly thought of how to prefix-sum with int multiplication, later finding out that it is indeed an old trick as I suspected (I'm definitely not on this thread btw): https://mastodon.social/@dougall/109913251096277108

As for 64-bit... well, I mostly avoid using high-end GPUs, but I was of the impression that i64 is just simulated. In fact, I was thinking of using the full warp as a "pipeline" to implement u32 division (mostly as a joke), almost like anti-SWAR. There was some old-ish paper detailing arithmetic latencies in GPUs and division was approximately more than 32x multiplication (...or I could be misremembering).

bobmcnamara•8mo ago
Parallel compares: https://graphics.stanford.edu/~seander/bithacks.html#ZeroInW...
DennisL123•8mo ago
Interesting stuff. Not sure if I read this right that it‘s 16 und 32 bit values of integers that get sorted. If yes, I‘d love to see if the GPU implementation can beat a competitive Radix sort implementation on a CPU.
winwang•8mo ago
It's 32 32-bit values which get sorted. I don't think a GPU sort would beat a CPU sort at this scale, even if you don't take kernel launch time into account. CPUs are simply too fast for (super-)small data, especially with AVX-512. But if we're talking about a larger amount of data, that would be a different story, i.e. as part of a normal gpu mergesort.
maeln•8mo ago
It is also useful if your data already lives on the GPU memory. For example, when you need to z-sort a bunch of particles in a 3d renderer particle system.
exDM69•8mo ago
A 32 way GPU sorting algorithm might be just what I need for sorting and deduplicating triangle id's in a visibility buffer renderer I am working on.

Thanks for sharing.

winwang•8mo ago
As someone who doesn't know very much about graphics (ironically), you're welcome and hope it helps!
fourseventy•8mo ago
What are the biggest use cases of GPU accelerated sorting?

East Germany balloon escape

https://en.wikipedia.org/wiki/East_Germany_balloon_escape
285•robertvc•8h ago•92 comments

Cloudflare acquires Astro

https://astro.build/blog/joining-cloudflare/
697•todotask2•10h ago•327 comments

Releasing rainbow tables to accelerate Net-NTLMv1 protocol deprecation

https://cloud.google.com/blog/topics/threat-intelligence/net-ntlmv1-deprecation-rainbow-tables
67•linolevan•3h ago•36 comments

LLM Structured Outputs Handbook

https://nanonets.com/cookbooks/structured-llm-outputs
91•vitaelabitur•1d ago•20 comments

6-Day and IP Address Certificates Are Generally Available

https://letsencrypt.org/2026/01/15/6day-and-ip-general-availability
330•jaas•9h ago•200 comments

Cursor's latest “browser experiment” implied success without evidence

https://embedding-shapes.github.io/cursor-implied-success-without-evidence/
388•embedding-shape•10h ago•165 comments

Michelangelo's first painting, created when he was 12 or 13

https://www.openculture.com/2026/01/discover-michelangelos-first-painting.html
299•bookofjoe•11h ago•155 comments

Just the Browser

https://justthebrowser.com/
484•cl3misch•13h ago•236 comments

Install.md: A standard for LLM-executable installation

https://www.mintlify.com/blog/install-md-standard-for-llm-executable-installation
28•npmipg•3h ago•50 comments

Patching the Wii News Channel to serve local news (2025)

https://raulnegron.me/2025/wii-news-pr/
50•todsacerdoti•12h ago•12 comments

Dell UltraSharp 52 Thunderbolt Hub Monitor

https://www.dell.com/en-us/shop/dell-ultrasharp-52-thunderbolt-hub-monitor-u5226kw/apd/210-bthw/m...
123•cebert•8h ago•158 comments

FLUX.2 [Klein]: Towards Interactive Visual Intelligence

https://bfl.ai/blog/flux2-klein-towards-interactive-visual-intelligence
9•GaggiX•1h ago•1 comments

Lock-Picking Robot

https://github.com/etinaude/Lock-Picking-Robot
256•p44v9n•4d ago•119 comments

STFU

https://github.com/Pankajtanwarbanna/stfu
622•tanelpoder•7h ago•430 comments

Reading across books with Claude Code

https://pieterma.es/syntopic-reading-claude/
58•gmays•6h ago•18 comments

Elasticsearch was never a database

https://www.paradedb.com/blog/elasticsearch-was-never-a-database
97•jamesgresql•5d ago•76 comments

HTTP RateLimit Headers

https://dotat.at/@/2026-01-13-http-ratelimit.html
26•zdw•2d ago•9 comments

Slop is everywhere for those with eyes to see

https://www.fromjason.xyz/p/notebook/slop-is-everywhere-for-those-with-eyes-to-see/
187•speckx•5h ago•98 comments

Why DuckDB is my first choice for data processing

https://www.robinlinacre.com/recommend_duckdb/
211•tosh•14h ago•78 comments

Emoji Use in the Electronic Health Record is Increasing

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2843883
47•giuliomagnifico•7h ago•42 comments

Re: Mix: open-source repairable blender

https://github.com/openfunkHQ/reMix
8•rishikeshs•2h ago•2 comments

Launch HN: Indy (YC S21) – A support app designed for ADHD brains

https://www.shimmer.care/indy-redirect
65•christalwang•9h ago•75 comments

Zep AI (Agent Context Engineering, YC W24) Is Hiring Forward Deployed Engineers

https://www.ycombinator.com/companies/zep-ai/jobs/
1•roseway4•8h ago

An Ode to the Return of Wysiwyg

https://jeffverkoeyen.com/blog/2026/01/13/WYSIWYG/
14•featherless•3d ago•10 comments

Show HN: B-IR – An LLM-optimized programming language

https://github.com/ImJasonH/ImJasonH/blob/main/articles/llm-programming-language.md
51•ImJasonH•4d ago•34 comments

Dev-owned testing: Why it fails in practice and succeeds in theory

https://dl.acm.org/doi/10.1145/3780063.3780066
106•rbanffy•11h ago•136 comments

CLI's completion should know what options you've typed

https://hackers.pub/@hongminhee/2026/optique-context-aware-cli-completion
14•dahlia•3d ago•6 comments

Show HN: 1Code – Open-source Cursor-like UI for Claude Code

https://github.com/21st-dev/1code
51•Bunas•1d ago•29 comments

Read_once(), Write_once(), but Not for Rust

https://lwn.net/SubscriberLink/1053142/8ec93e58d5d3cc06/
110•todsacerdoti•10h ago•33 comments

psc: The ps utility, with an eBPF twist and container context

https://github.com/loresuso/psc
84•tanelpoder•12h ago•26 comments