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•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.

A Long Elusive Lung Cancer Target May Be Yielding to New Drugs

https://www.wsj.com/health/pharma/a-long-elusive-lung-cancer-target-may-finally-be-yielding-to-ne...
1•marc__1•9s ago•0 comments

12 types of Submarines: A detailed guide to powerful underwater naval vessels

https://timesofindia.indiatimes.com/defence/news/12-types-of-submarines-a-detailed-guide-to-power...
1•rustoo•1m ago•0 comments

On the Cult of Meetings

https://yanmaani.net/on-the-cult-of-meetings/
1•yanmaani•4m ago•0 comments

What Claude Code Chooses

https://amplifying.ai/research/claude-code-picks/report
1•ville•10m ago•1 comments

Hand Paintings and Engravings in Rock Art

https://www.bradshawfoundation.com/hands/hand_paintings_world_rock_art/index.php
1•jruohonen•11m ago•0 comments

NSA using Anthropic's Mythos despite blacklist

https://www.axios.com/2026/04/19/nsa-anthropic-mythos-pentagon
2•jbegley•13m ago•0 comments

Show HN: NYC Guessr – GeoGuessr for NYC but with live video cam footage

https://nycguessr.vercel.app/
2•aldrinjenson•13m ago•0 comments

Blue Origin's rocket reuse achievement marred by upper stage failure

https://arstechnica.com/space/2026/04/errant-upper-stage-spoils-blue-origins-success-in-reusing-n...
1•rbanffy•14m ago•0 comments

Drawmode: MCP server for Excalidraw architecture diagrams with auto-layout

https://github.com/teamchong/drawmode
1•rahimnathwani•15m ago•0 comments

Should Your Patient Be on Statins? Maybe the Eyes Can Tell

https://www.medscape.com/viewarticle/should-your-patient-be-statins-maybe-eyes-can-tell-2026a1000avs
3•brandonb•15m ago•0 comments

Good APIs Age Slowly – Yusuf Aytas

https://yusufaytas.com/good-apis-age-slowly
14•kiyanwang•15m ago•0 comments

I saw MOVA's new 3D printer handle 36 colors without the waste

https://www.xda-developers.com/movas-3d-printer-handle-36-colors-without-waste-changes-everything/
1•rbanffy•16m ago•0 comments

Documentation Is a Leaking Pipe

https://medium.com/zenzic-engineering/your-documentation-is-a-leaking-pipe-7c1d6f4a84d0
2•PythonWoods•17m ago•1 comments

Hitachi Ltd, Part I – By Bradford Morgan White

https://www.abortretry.fail/p/hitachi-ltd-part-i
1•rbanffy•19m ago•0 comments

How Wales' most obese area is declaring war on junk food

https://www.bbc.co.uk/news/articles/c36r43zjzppo
1•mmarian•19m ago•0 comments

MAGA Is Winning Its War Against U.S. Science

https://paulkrugman.substack.com/p/maga-is-winning-its-war-against-us
29•devonnull•19m ago•1 comments

Open Standard for socketable CXL-based DDR

https://github.com/Luiguard/XMM-Standard
2•Luiguard•20m ago•1 comments

How Aesop and Jean de la Fontaine help us learn new languages

https://antipodeanodyssey.wordpress.com/
1•jruohonen•22m ago•0 comments

Light Phone III

https://www.thelightphone.com/lightiii
5•sssilver•23m ago•1 comments

The Economist who was terrified of AI just found a rare reason for hope

https://fortune.com/2026/04/19/alex-imas-human-jobs-ai-economy-chicago-economist-substack-doomsda...
1•Brajeshwar•25m ago•0 comments

Ancient-DNA Study Reveals Natural Selection Has Accelerated in Evolution

https://hms.harvard.edu/news/massive-ancient-dna-study-reveals-natural-selection-has-accelerated-...
3•consumer451•25m ago•0 comments

Show HN: EIDWTimes – Predicting airport wait times with ML for a school project

https://eidwtimes.xyz/
3•odig•25m ago•0 comments

Web Design Awards have been announced

2•Pyades•27m ago•0 comments

Show HN: YouDeserveNow, Justifications for Treating Yourself

https://www.youdeservenow.com
1•oneprofiledev•29m ago•0 comments

The LLM costs are not going up

https://simianwords.bearblog.dev/conclusive-proofs-that-llm-costs-are-going-down/
2•simianwords•29m ago•0 comments

The coming global food crisis

https://www.ft.com/content/36343e24-b06f-434d-a7e5-6046e7bcf3df
1•Anon84•29m ago•1 comments

Why was a plane too heavy for take-off at Southend Airport?

https://www.bbc.co.uk/news/articles/cn8dp480p0no
1•edward•31m ago•0 comments

I wrote a CHIP-8 emulator in my own programming language

https://github.com/navid-m/chip8emu
5•pizza_man•34m ago•0 comments

Show HN: LiteMarkup: Markdown parser with TypeScript AST, <3KB, no deps

https://github.com/tuures/LiteMarkup
2•ttts•34m ago•0 comments

10 years ago, someone wrote a test for servo that included an expiry in 2026

https://mastodon.social/@jdm_/116429380667467307
1•luu•35m ago•0 comments