frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•1y ago

Comments

LegNeato•1y ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•1y ago
Surprisingly, it seems this project just supports Spir-V and PTX, but not DXIL or AMDGCN.

I say surprisingly, because I'd expect Rust support to be more mature than Zig's.

lostmsu•1y ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•1y ago
I am a complete noob in GPU but is AMDGCN the older generation with the new one being RDNA? If you generate a binary for AMDGCN, will it run on the newest cards?

Also, I though that these GPU ISAs were "proprietary". I wonder how reliable the binary generation can be.

AliChraghi•1y ago
AMD ISAs are changing for almost every generation so LLVM[1] continues to keep the architecture name "amdgcn" and handle the variation based on the model flag (e.g., -mcpu=gfx1030 for RDNA2, -mcpu=gfx1100 for RDNA3).

> I though that these GPU ISAs were "proprietary"

PTX spec[2] is publicly available but the actual hardware assembly (SASS) is not. Although i believe Nsight allows you to view it.

1. https://llvm.org/docs/AMDGPUUsage.html#processors

2. https://docs.nvidia.com/cuda/parallel-thread-execution

imtringued•1y ago
If LLVM can target AMD GPUs what exactly prevents AMD and ROCm from supporting all the damn GPUs?

At this point I'm convinced that the real problem with AMD GPUs isn't necessarily the compilers (although they do produce mediocre code) or even the hardware itself, but some crappy C++ driver code that can't handle running graphics and compute at the same time. The datacenter GPUs never had to run graphics in the first place, so they are safe.

slavik81•1y ago
In my experience, the compiler, compute drivers, and HIP runtime work fine for all modern AMD GPUs. The only parts of the stack that don't run on all GPUs are the math and AI libraries. And that is mostly because AMD isn't building and testing those libraries for unsupported GPUs. The actual work required to enable functional support was straightforward enough that I ported them myself when packaging the libraries for Debian. Though, I had a lot of help on the testing.

See the Debian Trixie Supported GPU list: https://salsa.debian.org/rocm-team/community/team-project/-/...

SomaticPirate•1y ago
While I admire the work of hobbyists it still looks like C/C++ will be the default until a GPU vender makes the decision to support these libraries.

From my understanding, Vulkan and OpenGL are nice but the true performance lies in the specific toolkits (ie CUDA, Metal).

Wrapping the vendor provided frameworks is liable to break and that isn't tenable for someone who wants to do this on a professional basis.

pjmlp•1y ago
They also miss that on CUDA's case it is an ecosystem.

Actually it is C, C++, Fortran, OpenACC and OpenMP, PTX support for Java, Haskell, Julia, C#, alongside the libraries, IDE tooling and GPU graphical debugging.

Likewise Metal is plain C++14 plus extensions.

On the graphics side, HLSL dominates, following by GLSL and now slang. There are then MSL, PSSL and whatever NVN uses.

By the way, at GTC NVIDIA announced going all in with Python JIT compilers for CUDA, with feature parity with existing C++ tooling. There is now a new IR for doing array programming, Tile IR.

dismalaf•1y ago
I don't quite get this comment.

This is supposed to be used in place of CUDA, HIP, Metal, Vulkan, OpenGL, etc... It's targeting the hardware directly so doesn't need to be supported as such.

The site also seems to clearly state it's a work in progress. It's just an interesting blog post...

slowmovintarget•1y ago
The Zig compiler can compile C, though.

When science communicators spread misinformation

https://sunshowers.io/posts/science-communicator-misinformation/
2•hasheddan•5m ago•0 comments

Anna Groza and Bruce Dang – 0-Click Remote Exploits in an AI World [video]

https://www.youtube.com/watch?v=11EoBiBh5QY
1•beachhead•9m ago•0 comments

Bare Metal Qwen

https://github.com/alesha-pro/llm.asm/tree/main/02-baremetal-os
1•miohtama•10m ago•0 comments

How do you make friends?

1•ViktorPetrov•12m ago•1 comments

Tell HN: Stop using MLX, start telling your agent to write custom kernels

2•thesnarkitecht•13m ago•0 comments

Load balancing across AI subscriptions

2•kevin1chun•13m ago•0 comments

Deploying a payphone on a tiny Pacific Island for fun and zero profit

https://nickvsnetworking.com/deploying-a-payphone-on-a-tiny-pacific-island-for-fun-and-zero-profit/
2•qzervaas•13m ago•0 comments

Canaries in the Coal Mine? Six Facts about the Recent Employment Effects of AI

https://digitaleconomy.stanford.edu/publication/canaries-in-the-coal-mine-six-facts-about-the-rec...
1•softwaredoug•15m ago•0 comments

Voyager 1 Stops Sending Data, Reaches One Light-Day from Earth

https://hackaday.com/2026/11/25/voyager-1-stops-sending-data-reaches-one-light-day-from-earth/
1•CJason•17m ago•0 comments

Aftershock: Yesterday's Linux Kernel Bugs, Tomorrow's Android Exploits

https://arxiv.org/abs/2611.31547
1•beachhead•19m ago•0 comments

I'm a Therapist. I Wish These Patients Would Not Cut Off Their Family Members

https://www.nytimes.com/2026/11/25/opinion/politics-family-midterms-voting-holidays.html
1•vinni2•19m ago•1 comments

ML compiler eng, your job is NP-hard

https://ianbarber.blog/2026/11/24/ml-compiler-eng-your-job-is-np-hard/
1•gmays•20m ago•0 comments

Fail2Install: Turning System Limits into Pre-Auth RCE in Drupal

https://www.slcyber.io/research/fail2install-system-limits-pre-auth-rce-drupal
1•acossta•21m ago•0 comments

Playing with CSS Layers

https://kittygiraudel.com/2026/11/01/playing-with-css-layers/
1•vladde•21m ago•0 comments

Show HN: HN topics bar chart race,I use HTML-in-Canvas (need Chrome 157)

https://iantpe.github.io/hn-topic-race/?cat=langHist
3•iantpe•25m ago•1 comments

Show HN: I made a little gratitude wall for Thanksgiving

https://www.bravoboard.xyz/board/069c3cd2ef614c8397b5bfe250c626b2/
2•tumidpandora•26m ago•0 comments

Show HN: Anvil has won pricing among AI web builders plan starting at $5

https://www.tryanvil.dev/
2•Alumu•28m ago•0 comments

Metamath Proof Explorer Home Page

https://us.metamath.org/mpeuni/mmset.html
3•antiquark•29m ago•0 comments

Anchor – a habit app that doesn't reset your progress when you miss a day

https://getanchor.help/
1•eleventech•30m ago•0 comments

Gordon Ramsay revealed as new Top Gear host

https://www.rte.ie/entertainment/2026/1125/1600666-gordon-ramsay-revealed-as-new-top-gear-host/
1•FinnLobsien•32m ago•0 comments

Happily Ever After?

https://cinemasojourns.com/2026/11/25/happily-ever-after/
1•jjgreen•35m ago•0 comments

Paper Folding Puzzles: Can Multimodal LLMs Perform Spatial Reasoning?

https://ojs.aaai.org/index.php/AAAI/article/view/38364/42326
1•bryanrasmussen•36m ago•0 comments

Much shorter version of GRH Lean verification from Anthropic

https://github.com/lsernau/grh-lean
40•nb-t•37m ago•12 comments

Defang Security Incident

https://defang.io/blog/post/security-incident-november-2026/
22•gregsadetsky•38m ago•4 comments

A Man in Denver Has Been Trapping Waymo Vehicles

https://www.nytimes.com/2026/11/25/us/waymo-denver-egg-throwing.html
2•donohoe•39m ago•0 comments

First publicly-documented wartime interception of a jet-powered drone by laser

https://twitter.com/bayraktar_1love/status/2125619358453911742
4•nomilk•40m ago•1 comments

Prof. Sam Lawler: FUCK FUCK FUCK FUCK FUCK FUCK FUCK

https://mastodon.social/@sundogplanets/117678381079935502
41•marvinborner•41m ago•14 comments

Peco customers will see electric supply rate increase because of data centers

https://www.inquirer.com/business/energy/peco-electricity-rate-increase-data-centers-20261123.html
1•bkandel•44m ago•1 comments

Huang vs. Trump Lol

https://discuss.google.dev/t/trusted-automation-with-google-antigravity-scaling-secure-finance-in...
1•gutwrbetecg•45m ago•0 comments

Ask HN: Nobel Prizes for OpenAI and Anthropic: When?

1•LinaLauneBaer•52m ago•2 comments