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.

Rotten Tomato audience scores without the push votes

https://popcorngap.com/
1•thinkingemote•7m ago•0 comments

Naming a pattern in AI-generated code: Modular Mirage

1•ErsanG•7m ago•0 comments

Chess Legend Vishy Anand Becomes Interim FIDE President

https://timesofindia.indiatimes.com/sports/chess/chess-legend-viswanathan-anand-steps-in-as-fide-...
1•mellosouls•10m ago•0 comments

Google launches selfie video sign-in

https://blog.mega.io/google-launches-selfie-video-sign-in
1•dotcoma•13m ago•0 comments

The Software Should Work conference worked

https://isaacvando.com/software-should-work-worked
1•crowdhailer•13m ago•0 comments

Cardiovascular Disease Infographic

https://world-heart-federation.org/resources/cardiovascular-disease-infographic/
1•teleforce•14m ago•0 comments

BuiltWith MCP Registry

https://builtwith.com/mcp-registry
1•garazy•17m ago•1 comments

Oracle severed 21,000 employees during an AI spending spree

https://finance.yahoo.com/technology/ai/articles/oracle-severed-21-000-employees-114500493.html
1•taubek•17m ago•0 comments

Calm technologies that excite me

https://abhi.now/blog/calm-technologies/
1•birdculture•19m ago•0 comments

Topologically Consistent Multi-View 3D Head Reconstruction

https://syntec-research.github.io/SHELLS/
1•Palmik•19m ago•0 comments

Beyond Static Summarization: Proactive Memory Extraction for LLM Agents

https://arxiv.org/abs/2601.04463
1•ankitg12•23m ago•0 comments

Ask HN: Convince me to not to shelve my app (I've decided to)

1•asdfbank•24m ago•0 comments

Computer science enrollment fell for the first time in 20 years

https://www.businessinsider.com/computer-science-enrollment-fell-after-chatgpts-rise-economist-sa...
3•EasternEuroDev•28m ago•0 comments

Show HN: 100% Free, private meeting notes that never leave your Mac

https://oatsnote.com/
3•jarvisceo•29m ago•0 comments

HN: FlowShelf –free,native macOS shelf/clipboard/screenshot app,on-device AI

https://flowshelf.app/
1•abukadery•29m ago•0 comments

Frontpages of the EU

https://frontpages.eu
1•brnt•31m ago•3 comments

AI coding agents should optimize for less owned code

https://www.openenergytransition.org/posts/ai-coding-agents-should-optimize-for-less-owned-code
1•lyoncy•32m ago•0 comments

Kimi K3 found 19 0days in latest Redis 8.8.0 in 1.5hrs

https://github.com/berabuddies/redis-poc
1•doanbactam•32m ago•1 comments

Snake fossil sheds light on why lizards lost their limbs and started slithering

https://theconversation.com/80-million-year-old-snake-fossil-sheds-light-on-why-lizards-lost-thei...
2•janandonly•35m ago•0 comments

Show HN: Sealos – deploy a full-stack GitHub repo and troubleshoot the live app

https://sealos.io/
3•dedicate•36m ago•1 comments

AI Overviews could push Reddit to end its $60M-a-year deal with Google

https://www.neowin.net/news/ai-overviews-could-push-reddit-to-end-its-60-million-a-year-deal-with...
2•01-_-•36m ago•0 comments

Amazon and Microsoft pivot cloud gaming strategies to target different players

https://www.cnbc.com/2026/07/23/amazon-microsoft-cloud-gaming.html
2•01-_-•37m ago•0 comments

Jolt: Clojure on Chez Scheme

https://yogthos.net/posts/2026-07-02-jolt.html
1•ephaeton•39m ago•1 comments

Show HN: Jharu – Open-Source AI and Dev Junk Cleaner for Mac and PC

https://github.com/riponcm/Jharu
1•riponcm•40m ago•0 comments

The Ever-Receding Pocket

https://zhenyi.gibber.blog/the-ever-receding-pocket
2•zhenyi•40m ago•0 comments

About the August 2026 Total Solar Eclipse

https://www.timeanddate.com/news/astronomy/10-things-aug-2026-eclipse
1•chmaynard•42m ago•0 comments

Agent Sabotage with Deceitful Commit Message;

https://github.com/MasihMoafi/Elpis
1•masihmoafi•42m ago•0 comments

On AI

https://jcs.org/2026/07/23/ai
2•ingve•42m ago•0 comments

Reaction: Scan Logs for Patterns and Take Action

https://reaction.ppom.me/intro/
1•joahua•44m ago•0 comments

Nathan Barley

https://en.wikipedia.org/wiki/Nathan_Barley
1•ustad•55m ago•0 comments