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.

Convoro

https://convoro.co
1•ernestdefoe•1m ago•0 comments

First person in the world treated with gene therapy to regenerate optic neurons

https://www.scientificamerican.com/article/world-first-therapy-to-make-cells-young-again-given-to...
1•ck2•3m ago•0 comments

Pretty Source – Beautify

https://chromewebstore.google.com/detail/pretty-source/agiaaocdhepjibmfcjjdkkohnlkgenia
1•ihorko•3m ago•0 comments

US ban on Mythos is related to a jailbreak research by Amazon researchers

https://timesofindia.indiatimes.com/technology/tech-news/us-ban-on-anthropics-fable-5-and-mythos-...
2•maxloh•4m ago•0 comments

Underwater RF Communication at 700M Using Magnetoelectric Antennas

https://arxiv.org/abs/2411.09241
1•norcalkc•4m ago•0 comments

I built a local, free Granola alternative

https://hobnob.info/
1•polemos•6m ago•1 comments

The Mutualism Accord: a draft protocol for local-first, user-loyal AI agents

https://mutualismaccord.org
1•ravenpaige•7m ago•0 comments

LoongForge End-to-End Optimization for GR00T N1.6 Delivers 2.3× Throughput

https://baidu-baige.github.io/LoongForge/blog/2026-06-loongforge-groot-n16-acceleration.html
1•mindzzz•11m ago•0 comments

SpaceX Just Made the AI Infrastructure War Public

https://www.forbes.com/sites/robertszczerba/2026/06/13/spacex-just-made-the-ai-infrastructure-war...
2•cyrc•11m ago•0 comments

Sentencing the Innocent

https://www.craigmurray.org.uk/archives/2026/06/sentencing-the-innocent/
1•jjgreen•12m ago•0 comments

GLM 5.2 Is Out

https://digg.com/tech/ii9xibgn
4•aloknnikhil•12m ago•0 comments

When We Cease to Understand the World

https://en.wikipedia.org/wiki/When_We_Cease_to_Understand_the_World
1•petethomas•15m ago•0 comments

Show HN: Brightdeck – an OOXML-compatible AI presentation maker

https://brightdeck.ai/
3•mfn-throw•16m ago•1 comments

Cross-System Constraint Collisions: The Governance Gap in Enterprise Agentic AI [pdf]

https://himalaian.com/publications/CrAIg_WhitePaper_Public_v1.0.pdf
1•michaelmallon•16m ago•0 comments

Hacker Scripts

https://github.com/NARKOZ/hacker-scripts
1•skogstokig•16m ago•0 comments

The Wayland Protocol

https://wayland-book.com/protocol-design/design-patterns.html
2•tosh•17m ago•0 comments

Arch Linux AUR affected-package list after malicious commits were deleted

https://md.archlinux.org/s/SxbqukK6IA
1•tjek•19m ago•0 comments

SpaceX IPO made Musk a trillionaire. The old rules of capitalism no longer apply

https://www.theguardian.com/commentisfree/2026/jun/12/spacex-ipo-elon-musk-trillionaire
4•jmngomes•21m ago•1 comments

GameBoy Emulation in JavaScript (2010)

https://imrannazar.com/series/gameboy-emulation-in-javascript
2•tosh•26m ago•0 comments

As a woman thinks by Corra Harris (1926)

https://gutenberg.org/cache/epub/78847/pg78847-images.html
1•petethomas•26m ago•0 comments

Warning from our state to yours about process used to fast track the data center [video]

https://www.youtube.com/shorts/ntQOb2H__M8
3•Bender•32m ago•1 comments

The Bombardment of Ellwood During World War II

https://en.wikipedia.org/wiki/Bombardment_of_Ellwood
1•MilnerRoute•32m ago•0 comments

Show HN: Kaupang – deploy one config to Docker Compose, Swarm, or Kubernetes

1•witnz•32m ago•0 comments

Stanford Scientists Regrow Lost Cartilage and Reverse Arthritis

https://www.sciencedaily.com/releases/2026/06/260612021604.htm
4•karakoram•35m ago•0 comments

Gas Prices Wipe Out More Than a Year of Wage Gains

https://www.wsj.com/economy/inflation-wages-american-workers-cbe3f187
5•karakoram•41m ago•1 comments

Ask HN: What is the AI adoption approach at your org?

2•iExploder•42m ago•1 comments

The Strategic Oil Reserves Are Running Out Fast

https://www.economist.com/finance-and-economics/2026/06/11/the-worlds-strategic-oil-reserves-are-...
3•karakoram•42m ago•1 comments

The FBI built its own replica small town to simulate real-world cyberattacks

https://techcrunch.com/2026/06/13/the-fbi-built-its-own-replica-small-town-to-simulate-real-world...
2•Brajeshwar•43m ago•0 comments

Python 3.14 garbage collection rigamarole

https://theconsensus.dev/p/2026/06/06/python-3-14-garbage-collection-rigamarole.html
4•azhenley•48m ago•0 comments

List of Planetary Nebulae

https://en.wikipedia.org/wiki/List_of_planetary_nebulae
1•chasil•48m ago•0 comments