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.

Samsung's SSD warranty policy scammed me so I'm taking them to court [video]

https://www.youtube.com/watch?v=WpPIW4aeeag
1•richardboegli•33s ago•0 comments

Ask HN: How do you get into a flow state when using AI to code?

1•kilroy123•42s ago•0 comments

Claude Code's statusLineHook: read rate limits locally without any API calls

https://headroom.walls.sh/hook
1•patwalls•1m ago•0 comments

Scoped Blob Storage

https://blog.val.town/scoped-blob-storage
1•stevekrouse•1m ago•0 comments

Brain Floating-Point

https://en.wikipedia.org/wiki/Bfloat16_floating-point_format
1•tosh•2m ago•0 comments

ECB raises interest rates for first time since 2023

https://www.ft.com/content/95ec93a9-1153-4837-be82-32a87eaabe1d
1•JumpCrisscross•2m ago•0 comments

How HN: JediMock – Mock API responses in DevTools by wrapping fetch and XHR

https://jedimock.com
1•machopicchu•3m ago•0 comments

AltiVerse

https://github.com/LeoTheAIDev/Altiverse
4•leoTheCoderrr•3m ago•0 comments

Encrypted Spaces – Signal Alums' System for Making Private Collaboration Apps

https://www.wired.com/story/signal-alums-release-encrypted-spaces-a-new-system-for-building-priva...
2•jakemauer•4m ago•0 comments

Adix. Rock-paper-scissors on a 9x9 board, real-time 1v1

https://adix.games
1•hoxydav•5m ago•0 comments

Show HN: Kikubot – Each AI agent is an inbox

https://github.com/mxaiorg/kikubot
1•asp68•6m ago•0 comments

ServiceNow Mass Layoffs [Reddit Thread]

https://old.reddit.com/r/servicenow/comments/1u2c5dq/june_layoffs_its_a_blood_bath/
1•scapecast•6m ago•0 comments

Adaptive Screen Brightness from Content

https://rubarb.bar/
1•ericbigguy•7m ago•0 comments

Thomas Bayes

https://en.wikipedia.org/wiki/Thomas_Bayes
1•davedx•8m ago•0 comments

Opendoor fires all Indian employees, shuts India operations

https://economictimes.indiatimes.com/nri/latest-updates/opendoor-fires-all-indian-employees-shuts...
1•amalfra•8m ago•0 comments

Has the lakehouse battle shifted from table formats to catalogs?

https://www.onehouse.ai/blog/databricks-iceberg-support-has-a-catch-its-called-unity-catalog
1•sivabalan•8m ago•0 comments

Pokemon PWA

https://pokemon.gksander.com/
1•zi_•10m ago•1 comments

Resurrecting a Soaked, corroded, and damaged Commodore SX‑64 (2025)

https://jerrylparker.com/blogs/posts/sx-64.html
1•hggh•10m ago•0 comments

The Platypus Affiliated Society

https://platypus1917.org/
1•jruohonen•10m ago•0 comments

GM is betting on battery cells that don't use lithium

https://electrek.co/2026/06/10/gm-sodium-ion-battery-peak-energy/
2•Brajeshwar•11m ago•0 comments

When is detecting AI-generated text worthwhile?

https://statmodeling.stat.columbia.edu/2026/06/06/when-is-detecting-ai-generated-text-worthwhile/
1•sebg•11m ago•0 comments

Office 2019 for Apple to become useless from July

https://www.theregister.com/applications/2026/06/11/apple-version-of-office-2019-becomes-useless-...
3•rippeltippel•12m ago•1 comments

Kagi Privacy Redirects – Automatic Alternative Front Ends

https://github.com/elia-orsini/kagi-privacy-redirects
1•mysticaltech-•12m ago•0 comments

CLI that scores Terraform change risk and stores your team's infra fixes

https://fixdoc.dev
1•FixDoc•13m ago•0 comments

Show HN: Mimirs – persistent local memory for AI coding agents (MCP)

https://github.com/TheWinci/mimirs
2•winci•14m ago•0 comments

You can lead a horse to water but you can't force it to drink

https://williamdurand.fr/2025/12/24/you-can-lead-a-horse-to-water-but-you-cant-force-it-to-drink/
1•speckx•14m ago•0 comments

C.M. Kosemen – Dinosauroids [2008/2019]

http://www.cmkosemen.com/dinosauroids.html
2•bilegeek•16m ago•0 comments

Harness-Bench: Measuring Harness Effects Across Models

https://arxiv.org/abs/2605.27922
1•ZeljkoS•16m ago•0 comments

Show HN: In-browser real LLM token counter and cost estimation

https://holaclaw.ai/tools/token-studio
1•angelmm•19m ago•1 comments

Petition to Withdraw Canada's Bill C-22

https://www.ourcommons.ca/petitions/en/Petition/Sign/e-7416
2•hmokiguess•19m ago•0 comments