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.

US reportedly mulls pulling troops from Saudi Arabia as ties sour over Iran war

https://www.timesofisrael.com/us-reportedly-mulls-pulling-troops-from-saudi-arabia-as-ties-sour-o...
1•koolhead17•36s ago•0 comments

Herdr: One terminal to rule them all

https://herdr.dev/
1•handfuloflight•40s ago•0 comments

Microsoft/Flint-Chart

https://github.com/microsoft/flint-chart
1•geoffbp•58s ago•0 comments

Society of Saint Pius X

https://en.wikipedia.org/wiki/Society_of_Saint_Pius_X
1•febed•2m ago•0 comments

Can solar and wind and batteries provide 24/7/365 electricity?

https://unpopular-truth.com/2026/06/19/can-solar-and-wind-batteries-really-provide-24-7-365-elect...
1•dpraburaj•2m ago•0 comments

Show HN: A complete AI agency at your fingertips

https://github.com/msitarzewski/agency-agents
1•adithyaharish•5m ago•0 comments

Chemurgy

https://en.wikipedia.org/wiki/Chemurgy
1•petethomas•5m ago•0 comments

State of X402 – Independent Audit – Every Faciliator, Every Chain

https://x402stats.io
1•pro_methe5•7m ago•0 comments

Zig - All Package Management Functionality Moved from Compiler to Build System

https://ziglang.org/devlog/2026/?2026-06-30#2026-06-30
3•Retro_Dev•9m ago•0 comments

Ask HN: What are you building first with Fable?

4•akashwadhwani35•18m ago•0 comments

Trump's plan to redesign every .gov website leads to AI-designed horrors

https://arstechnica.com/tech-policy/2026/06/trumps-plan-to-redesign-every-gov-website-leads-to-ai...
2•duxup•22m ago•1 comments

Understanding Why Language Models Hallucinate: Testing Reasoning Against Priors

https://neohughus.github.io/Understanding_Why_Language_Models_Hallucinate/
1•ilreb•23m ago•0 comments

Who Shuts Down the Internet the Most?

https://pulse.internetsociety.org/en/shutdowns/
1•Bender•25m ago•0 comments

White House accelerates plans for AI model standards

https://www.ft.com/content/0bb7e2f9-007b-4577-9c4a-858948ee969a
1•OutOfHere•25m ago•0 comments

Carson Block: If you thought the global financial crisis was bad

https://www.economist.com/by-invitation/2026/06/28/if-you-thought-the-global-financial-crisis-was...
1•burntcaramel•26m ago•0 comments

Circle of Empathy

https://video.cirquedusoleil.com/originals/cirque-du-sound/season-1/ep5
1•andsoitis•27m ago•0 comments

Your AI lover will change you

https://www.newyorker.com/culture/the-weekend-essay/your-ai-lover-will-change-you
1•andsoitis•28m ago•0 comments

Arena, the AI leaderboard everyone uses, is now a $100M business

https://techcrunch.com/2026/06/29/arena-the-ai-leaderboard-everyone-uses-is-now-a-100m-business/
2•doppp•35m ago•0 comments

Ask HN: What things might help me to become inference engineer?

2•chalshik•38m ago•2 comments

Apple 'Hide My Email' Vulnerability Reveals Peoples' Real Email Addresses

https://www.404media.co/apple-hide-my-email-vulnerability-reveals-peoples-real-email-addresses/
2•phyzome•42m ago•0 comments

Show HN: One Page Life Calendar

https://beta.actions.life
1•eltonlin•42m ago•0 comments

Egg Libor Was Also Manipulated

https://www.bloomberg.com/opinion/newsletters/2026-07-01/egg-libor-was-also-manipulated
1•greyface-•47m ago•0 comments

The Graduate-School Dropout Toppling China's Academic Stars

https://www.wsj.com/science/the-graduate-school-dropout-toppling-chinas-academic-stars-3c1e5d86
1•petethomas•50m ago•0 comments

UK-US trade deal will lead to more than 200k avoidable deaths

https://www.theguardian.com/society/2026/jul/01/us-uk-drug-deal-could-result-in-229000-excess-dea...
2•secretslol•53m ago•0 comments

Stashing data in WOFF2 color glyphs to get free Brotli decompression via Canvas

https://github.com/EtherDream/brpack/
1•etherdream•54m ago•0 comments

MacBasic (1985)

https://www.folklore.org/MacBasic.html
1•andsoitis•1h ago•0 comments

Ask HN: noticed how HN performs sentiment-analysis on everything posted here?

1•bridgettegraham•1h ago•6 comments

Nvidia Through a Crypto Miner's Eyes

https://vincentping.com/en/nvidia-through-miner-eyes
1•vincentping•1h ago•1 comments

Check Out My Website

https://topic-chat-hub--seattlem112.replit.app/
1•computerwonder•1h ago•1 comments

Kids learn to bully from adults' threats, manipulation and criticism

https://theconversation.com/kids-learn-to-bully-from-adults-threats-manipulation-and-criticism-a-...
5•1659447091•1h ago•1 comments