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?

Any application that can be written in a system language, eventually will be

https://www.avraam.dev/blog/system-language-corollary
42•almonerthis•3d ago•39 comments

ChatGPT Containers can now run bash, pip/npm install packages and download files

https://simonwillison.net/2026/Jan/26/chatgpt-containers/
198•simonw•7h ago•170 comments

The Hidden Engineering of Runways

https://practical.engineering/blog/2026/1/20/the-hidden-engineering-of-runways
183•crescit_eundo•6d ago•53 comments

AI code and software craft

https://alexwennerberg.com/blog/2026-01-25-slop.html
98•alexwennerberg•9h ago•62 comments

There is an AI code review bubble

https://www.greptile.com/blog/ai-code-review-bubble
184•dakshgupta•11h ago•136 comments

Apple introduces new AirTag with longer range and improved findability

https://www.apple.com/newsroom/2026/01/apple-introduces-new-airtag-with-expanded-range-and-improv...
288•meetpateltech•13h ago•400 comments

People who know the formula for WD-40

https://www.wsj.com/business/the-secret-society-of-people-who-know-the-formula-for-wd-40-e9c0ff54
89•fortran77•6h ago•162 comments

RIP Low-Code 2014-2025

https://www.zackliscio.com/posts/rip-low-code-2014-2025/
155•zackliscio•11h ago•68 comments

JuiceSSH – Give me my pro features back

https://nproject.io/blog/juicessh-give-me-back-my-pro-features/
226•jandeboevrie•9h ago•114 comments

Dithering – Part 2: The Ordered Dithering

https://visualrambling.space/dithering-part-2/
126•ChrisArchitect•7h ago•17 comments

Windows 11's Patch Tuesday nightmare gets worse

https://www.windowscentral.com/microsoft/windows-11/windows-11s-botched-patch-tuesday-update-nigh...
171•01-_-•12h ago•139 comments

You have to know how to drive the car

https://www.seangoedecke.com/knowing-how-to-drive-the-car/
37•alexwennerberg•4h ago•26 comments

Show HN: TetrisBench – Gemini Flash reaches 66% win rate on Tetris against Opus

https://tetrisbench.com/tetrisbench/
74•ykhli•8h ago•32 comments

The Adolescence of Technology

https://www.darioamodei.com/essay/the-adolescence-of-technology
143•jasondavies•10h ago•97 comments

Pharos: The Lighthouse at Alexandria

https://penelope.uchicago.edu/encyclopaedia_romana/greece/paganism/pharos.html
13•teleforce•6d ago•2 comments

iPhone 5s Gets New Software Update 13 Years After Launch

https://www.macrumors.com/2026/01/26/iphone-5s-software-update/
51•angott•2h ago•13 comments

Why autosave is not recovery

https://zippers.dev/blog/why-savior-exists
5•Pepp38•2d ago•2 comments

France Aiming to Replace Zoom, Google Meet, Microsoft Teams, etc.

https://twitter.com/lellouchenico/status/2015775970330882319
554•bwb•10h ago•467 comments

Television is 100 years old today

https://diamondgeezer.blogspot.com/2026/01/tv100.html
539•qassiov•12h ago•189 comments

Fedora Asahi Remix is now working on Apple M3

https://bsky.app/profile/did:plc:okydh7e54e2nok65kjxdklvd/post/3mdd55paffk2o
442•todsacerdoti•9h ago•168 comments

Porting 100k lines from TypeScript to Rust using Claude Code in a month

https://blog.vjeux.com/2026/analysis/porting-100k-lines-from-typescript-to-rust-using-claude-code...
164•ibobev•13h ago•112 comments

Y Combinator website no longer lists Canada as a country it invests in

https://betakit.com/y-combinator-website-no-longer-lists-canada-as-a-country-it-invests-in/
103•TheLegace•3h ago•58 comments

Qwen3-Max-Thinking

https://qwen.ai/blog?id=qwen3-max-thinking
417•vinhnx•11h ago•384 comments

San Francisco Graffiti

https://walzr.com/sf-graffiti
148•walz•17h ago•176 comments

After two years of vibecoding, I'm back to writing by hand

https://atmoio.substack.com/p/after-two-years-of-vibecoding-im
655•mobitar•13h ago•502 comments

OpenFlexure Microscope

https://openflexure.org/projects/microscope/
55•o4c•5d ago•10 comments

Show HN: Only 1 LLM can fly a drone

https://github.com/kxzk/snapbench
146•beigebrucewayne•16h ago•79 comments

I let ChatGPT analyze a decade of my Apple Watch data, then I called my doctor

https://www.msn.com/en-us/news/technology/i-let-chatgpt-analyze-a-decade-of-my-apple-watch-data-t...
42•zdw•4h ago•48 comments

Google AI Overviews cite YouTube more than any medical site for health queries

https://www.theguardian.com/technology/2026/jan/24/google-ai-overviews-youtube-medical-citations-...
366•bookofjoe•12h ago•197 comments

Find 'Abbey Road when type 'Beatles abbey rd': Fuzzy/Semantic search in Postgres

https://rendiment.io/postgresql/2026/01/21/pgtrgm-pgvector-music.html
74•nethalo•5d ago•23 comments