frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•11mo ago

Comments

LegNeato•11mo ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•11mo 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•11mo ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo ago
The Zig compiler can compile C, though.

Excellence Is a Habit

https://www.flyingbarron.com/2026/04/excellence-is-habit.html
1•mooreds•36s ago•0 comments

Ideas for marketing a dev centric product (2019)

https://www.mooreds.com/wordpress/archives/3197
1•mooreds•1m ago•0 comments

Is the 'Holy Grail of batteries' ready to bless us with its presence?

https://www.theverge.com/transportation/909480/solid-state-battery-donut-lab-ev-china
1•neilfrndes•2m ago•1 comments

New town every hour blue sky account

https://bsky.app/profile/townsusa.bsky.social
1•mooreds•3m ago•0 comments

Vance Says U.S.-Iran Peace Talks Break Down over Nuclear Issue

https://www.wsj.com/livecoverage/iran-war-latest-news-israel-us-lebanon-2026
2•kamaraju•7m ago•0 comments

iPhone 18 Pro Leaked Designs

https://9to5mac.com/2026/04/09/leaker-gives-iphone-18-pro-updates-on-two-design-changes/
2•anujbans•8m ago•0 comments

Bella: Hypergrah memory for AI agent(10x time horizon)

https://github.com/immartian/bellamem
1•newsathere•16m ago•0 comments

Online Phreak Box

https://phreaknet.org/bluebox/
1•etothet•17m ago•0 comments

The Local Universe's Expansion Rate Clearer Than Ever. But Still Doesn't Add Up

https://noirlab.edu/public/news/noirlab2611/?lang
1•nobody9999•19m ago•1 comments

Why meaningful days look like nothing while you are living them

https://pilgrima.ge/p/the-grand-line
1•momentmaker•30m ago•0 comments

Show HN: Posse – Open-Source Web UI for Anthropic Managed Agents

https://github.com/oguzbilgic/posse
1•obilgic•34m ago•0 comments

Jury reaches no verdict on first day deliberating at Live Nation monopoly trial

https://www.boston25news.com/entertainment/jury-starts/V36MJOVVPA373JW3P5TFJZJ7OI/
1•1vuio0pswjnm7•36m ago•0 comments

Building a better crossword page for my daily cryptic hit – Whitebeard's Realm

https://whitebeard.blog/posts/building-a-better-crossword-page/
1•techbelly•36m ago•0 comments

How Ship Anchors Work [video]

https://www.youtube.com/shorts/X7bWj115UwY
1•modinfo•37m ago•0 comments

Building a Z-Machine in the worst possible language – Whitebeard's Realm

https://whitebeard.blog/posts/building-a-z-machine-in-elm/
2•techbelly•37m ago•0 comments

A Mac Studio for Local AI – 6 Months Later

https://spicyneuron.substack.com/p/a-mac-studio-for-local-ai-6-months
2•try-working•42m ago•1 comments

My research has build errors now and honestly should have always worked this way

https://github.com/grainulation/wheat
2•volatilityfund•45m ago•0 comments

Beyond Quantum with Khrennikov

https://scottlocklin.wordpress.com/2026/04/09/beyond-quantum-with-khrennikov/
1•MrBuddyCasino•46m ago•0 comments

The Dostoevskian Moment

https://www.palladiummag.com/2026/04/11/the-dostoevskian-moment/
1•MrBuddyCasino•51m ago•0 comments

Anthropic loses appeals court bid to pause supply chain risk label

https://www.politico.com/news/2026/04/08/d-c-circuit-rejects-anthropic-plea-to-pause-supply-chain...
9•1vuio0pswjnm7•55m ago•2 comments

LLM Time

https://graydon2.dreamwidth.org/322732.html
1•sho_hn•56m ago•0 comments

We spoke to the man making viral Lego-style AI videos for Iran

https://www.bbc.com/news/articles/cjd8jrd1vnyo
46•breve•57m ago•12 comments

Ask HN: Former grok-code-fast-1 users, what coding model are you using now?

1•whycombinetor•59m ago•0 comments

When career anxiety becomes gameplay: lessons in China 'young-faculty simulator'

1•mmarian•1h ago•1 comments

Samsamelo – Silicon Valley selling trolley problem lies [fixed link]

https://lgwnncpcqsloqa4sqqqq5osup2rlqp7iiqliyu4y6vveu5jy6tlq.arweave.net/WazWieKElugDkoQhDrpUfqK4...
1•awbvious•1h ago•1 comments

AI Can't Read an Investor Deck

https://www.mercor.com/blog/Finance-tasks-ai-failures-modes/
1•gmays•1h ago•2 comments

Upstreaming Patches and the Cyber Resilience Act

https://www.thomas-huehn.com/upstreaming-patches-and-cra/
2•Brajeshwar•1h ago•0 comments

Entropy as a Measure of Surprise

https://nchagnet.pages.dev/blog/entropy-as-measure-of-surprise/
2•Brajeshwar•1h ago•1 comments

Americans still opt for print books over digital or audio versions

https://www.pewresearch.org/short-reads/2026/04/09/americans-still-opt-for-print-books-over-digit...
34•thm•1h ago•23 comments

The 'Enshittification' of the Internet [video]

https://www.youtube.com/watch?v=dCVUCdg3Uqc
2•goekjclo•1h ago•0 comments