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.

Neuralink ALS Trial Approved

https://podnews.app/clip/5Ea2LyiryRY/454
1•nsemikey•1m ago•0 comments

Coveted Lego octopus found 29 years after cargo spill

https://www.bbc.com/news/articles/cwkgr7k8e82mo
1•wood_spirit•2m ago•0 comments

I worked with Gemini Neon to set a new prime number world record

https://github.com/atonalfreerider/grh-prime-prover/releases/tag/v1.1.0
1•atonalfreerider•3m ago•0 comments

WPML vs. Gato: what it's like to translate a WooCommerce shop with each

https://gatoaitranslations.com/blog/wpml-vs-gato-ai-translations
1•leoloso•8m ago•0 comments

1982 "Thriller" Music Video-Worn and Signed Red and Black Leather Jacket

https://www.juliensauctions.com/en/items/2315162/michael-jackson-1982-thriller-music-video-worn-a...
3•donsupreme•9m ago•0 comments

Out on Parole: Small open-world crime game (GTA clone) in C and raylib

https://github.com/shaydex-codes/outonparole
1•doppp•10m ago•0 comments

Show HN: An early-warning system for when RSA kicks the bucket

https://fucked.natey.sh
2•imbobbytables•16m ago•0 comments

Small plugin for the PI agent – you might be able to say goodbye to your IDE

https://github.com/examplecode/pi-coderef
5•chengkaime•20m ago•0 comments

A Gallery of World Models

https://kleytoncosta.com/picks/wm-gallery
2•kleytondacosta•21m ago•0 comments

Pretraining a 2500 Elo chess Transformer

https://erikschluntz.com/software/2026/11/28/chess-transformer.html
1•eschluntz•23m ago•1 comments

Show HN: InkFolio – Handwritten notes app with AI for iPad and iPhone

https://apps.apple.com/us/app/inkfolio-handwritten-notes/id6830744573
2•rahul_cloudhike•29m ago•1 comments

Show HN: Genie – any model, at any text box

https://github.com/Lazarus-931/genie
1•alazarmb•31m ago•0 comments

Geely EV cars to more than double UK sales despite trade barrier

https://www.ft.com/content/85cca83f-8a68-40df-9372-6bc92e391562
6•Alien1Being•37m ago•2 comments

Understanding why 1 and 2 and 3 and 4 and 5 and = -1/12 (rather than ∞)

https://www.lesswrong.com/posts/F7DNBdoADqktjn2Hk/understanding-why-1-2-3-4-5-1-12-rather-than-in...
3•eatitraw•40m ago•0 comments

Lithography War: Never Interrupt the Enemy

https://lithowar.com/lithography-war/
2•walterbell•42m ago•0 comments

$0.10 per-user per-year: Nighttroop

https://maori.geek.nz/posts/2026/nighttroop/
2•grahar64•43m ago•0 comments

Kanon 2.5 Embedder, a legal embedding model

https://isaacus.com/blog/introducing-kanon-2-5-embedder
2•ubutler•43m ago•0 comments

Hinge users seek $1.7B class-action lawsuit

https://nypost.com/2026/11/28/us-news/1-75b-lawsuit-accuses-hinge-of-unfairly-banning-men-from-da...
4•circumcised•47m ago•1 comments

Polynomial Time Factoring Algorithm

https://geohot.github.io//blog/jekyll/update/2026/03/16/polynomial-time-factoring.html
1•verysmart•50m ago•0 comments

Building a game engine with coding agents

https://medium.com/@eigenbom/building-a-game-engine-with-coding-agents-4707aa26039d
1•eigenbom•52m ago•0 comments

FAFO: Don't Get Got

https://neonronin.sh/blog/stop-putting-model-keys-in-the-sandbox/
3•pandemicsyn•52m ago•0 comments

Text Compression Through the Looking Glass

https://utndatasystems.github.io/blog/2026/text-compression/
1•hazemdawahi•54m ago•0 comments

Realtime Waterbending: Cinematic 3D Fluid Simulation (UE5) [video]

https://www.youtube.com/shorts/T_pHILE075Q
1•shroom1•57m ago•0 comments

Why I Switched from Godot to Ebitengine (2025)

https://en.bioerrorlog.work/entry/devlog-4-godot-vs-ebitengine
1•indigodaddy•58m ago•0 comments

SocialSpec – The future of social media is websites

https://socialspec.org/
4•rd07•1h ago•0 comments

Egg production kills more animals than beef, pork, and lamb combined

https://ourworldindata.org/egg-production-kills-more-animals-than-beef-pork-and-lamb-combined
4•sohkamyung•1h ago•1 comments

Remote tech jobs that show which countries can apply

https://guruitjobs.com/
4•renan_dev_br•1h ago•0 comments

Reflections on training a 1B LLM on 100B tokens from scratch

https://www.marginalintelligence.com/posts/malama-model
2•jakobfrick•1h ago•1 comments

The Second Great Stock Market Rotation of 2026

https://ehwazwaves.substack.com/p/the-second-great-stock-rotation-of
1•_ehwaz•1h ago•0 comments

Swarm: Serverless, end-to-end encrypted messaging and calls

https://github.com/CWNE88/swarm
2•l8rlump•1h ago•0 comments