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•8mo ago

Comments

LegNeato•8mo ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•8mo 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•8mo ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
The Zig compiler can compile C, though.

Questions to ask yourself every year

https://gourav.io/blog/yearly-review
1•jerrygoyal•6m ago•1 comments

I Won a Teknofest 2025: A Step-by-Step Guide

https://www.notion.so/yapsgg/How-I-Won-a-TEKNOFEST-2025-A-Step-by-Step-Guide-2d2465f04ab58023bed5...
1•abdibrokhim•7m ago•1 comments

Study links America's favorite cooking oil to obesity

https://medicalxpress.com/news/2025-11-links-america-favorite-cooking-oil.html
1•PaulHoule•15m ago•0 comments

Show HN: Weekly newsletter with tactical frameworks from 50 $1M+ founders

https://www.doanything.com/preview/uXalImXcFZk
1•AlexMorganFndr•16m ago•0 comments

How musicals use motifs to tell stories

https://pudding.cool/2025/12/motifs/
1•gmays•22m ago•0 comments

Ask HN: What to do when Claude Code is writing code?

1•brihati•23m ago•1 comments

Show HN: Schengen Calculator – Avoid €5K Fines for Overstaying EU"

https://owlfacts.com
1•sunrays•23m ago•1 comments

A personal recap of 2025: on running, LLMs, family, coffee, work

https://dimitarmisev.com/blog/2025-recap
1•misev•28m ago•0 comments

I Built a Module System for a Language That Doesn't Have One

https://www.claudianadalin.com/blog/building-pinecone
1•xbmcuser•30m ago•0 comments

Show HN: Magic CSV – Transform CSVs with plain English, no formulas

https://magiccsv.app/
1•bored-developer•31m ago•0 comments

The Lore of the World: Field Notes for a Child's Codex

https://www.theintrinsicperspective.com/p/the-lore-of-the-world
3•Jun8•37m ago•0 comments

Show HN: Agape – human-centered CLI task manager

https://github.com/josequiceno2000/agape
2•josequiceno2000•37m ago•0 comments

Show HN: PDU – Open-source PostgreSQL data rescue tool

https://github.com/wublabdubdub/PDU-PostgreSQLDataUnloader
2•zhangchenPDU•37m ago•1 comments

Build Your Own ML Framework

https://mlsysbook.ai/tinytorch/intro.html
2•auraham•37m ago•0 comments

Observations on safety friction and misclassification in conversational AI

2•ayumi-observer•38m ago•0 comments

A Woman on a NY Subway Just Set the Tone for Next Year

https://www.honest-broker.com/p/a-woman-on-a-ny-subway-just-set-the
4•thomassmith65•39m ago•0 comments

A Woman on a NY Subway Just Set the Tone for Next Year

https://honest-broker.com/p/a-woman-on-a-ny-subway-just-set-the
1•thomassmith65•40m ago•2 comments

Advice for generalists who want to join startups

https://twitter.com/benln/status/2006057848430604705
2•gmays•47m ago•0 comments

Languish – Programming Language Trends

https://tjpalmer.github.io/languish/
3•nickswalker•47m ago•0 comments

What to Expect from the AI Engineering World in 2026

https://sarthakai.substack.com/p/what-to-expect-from-the-ai-engineering
2•sarthakrastogi•54m ago•0 comments

Show HN: LLMRouter – first LLM routing library with 300 stars in 24h

https://github.com/ulab-uiuc/LLMRouter
3•tao2024•59m ago•1 comments

Show HN: real-time usage monitor for Claude – see cost without leaving workflow

https://github.com/SrivathsanSivakumar/simple-usage-monitor
3•supersonic339•1h ago•1 comments

Meta is sued by US Virgin Islands over ads for scams, dangers to children

https://www.reuters.com/legal/litigation/meta-is-sued-by-us-virgin-islands-over-ads-scams-dangers...
7•1vuio0pswjnm7•1h ago•0 comments

Poland urges Brussels to probe TikTok over AI-generated content

https://www.reuters.com/world/china/poland-urges-brussels-probe-tiktok-over-ai-generated-content-...
4•1vuio0pswjnm7•1h ago•1 comments

MongoBleed: Unauthenticated memory-read vulnerability in MongoDB

https://www.bitsight.com/blog/critical-vulnerability-alert-cve-2025-14847-mongodb-mongobleed
1•epicprogrammer•1h ago•1 comments

Nvelox: Lightweight, event-driven load balancer built for high-concurrency

https://github.com/nvelox/nvelox
2•thunderbong•1h ago•0 comments

Creating my own blog from scratch using zola

https://vjay15.github.io/blog/zola-tutorial/
2•vjay15•1h ago•1 comments

How can I detect that the system is running low on memory?

https://devblogs.microsoft.com/oldnewthing/20251229-00/?p=111927
4•ibobev•1h ago•0 comments

Restoring My Childhood Family Computer Part 4: Emulation

https://www.gridbugs.org/restoring-my-childhood-family-computer-part-4/
2•ibobev•1h ago•0 comments

Ten things we forgot to be true

https://kgrep.com/about
6•0xlogk•1h ago•2 comments