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

Comments

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

Autonomous AI Agents Have an Ethics Problem

https://undark.org/2026/03/05/opinion-ai-agents-ethics/
1•EA-3167•2m ago•0 comments

Typst Meetup 2026: Keynote

https://www.youtube.com/watch?v=WOQXL6vRrJs
1•todsacerdoti•3m ago•0 comments

Show HN: I built a zero-lag, local-first Markdown capture tool

https://gojot.app/
1•shubham2892•4m ago•0 comments

Show HN: Main Character – A gamified productivity app (no login demo)

https://maincharacter.game
1•gmays•7m ago•0 comments

Apple Silicon Laptops Can Run a Mind, but Never a Superintelligence

https://vbar.io/laptop-mind.html
1•walterbell•10m ago•0 comments

New KV cache compaction technique cuts LLM memory 50x without accuracy loss

https://venturebeat.com/orchestration/new-kv-cache-compaction-technique-cuts-llm-memory-50x-witho...
1•mellosouls•11m ago•0 comments

Building a TB-303 from Scratch

https://loopmaster.xyz/tutorials/tb303-from-scratch
1•stagas•11m ago•0 comments

Show HN: OpenGrammar Open-source, self-hostable Grammarly alternative

https://swadhinbiswas.github.io/opengrammar/
1•0x0003r•14m ago•0 comments

Show HN: Open-Sable, Self-hosted cognitive AI agent with memory and 127 tools

https://github.com/IdeoaLabs/Open-Sable
1•aerosol•14m ago•0 comments

Calif. lawsuit accuses Meta of sending nude video from AI glasses to workers

https://www.sfgate.com/tech/article/meta-ai-glasses-lawsuit-21960004.php
2•c420•16m ago•0 comments

Show HN: BeyondComments – Find content ideas and signals from YouTube comments

https://beyondcomments.io
1•ProgrammerByDay•19m ago•0 comments

Show HN: Sajtanalys.se – Automated website analysis for Swedish businesses

https://sajtanalys.se
1•qvalitet•19m ago•0 comments

The Day NY Publishing Lost Its Soul

https://www.honest-broker.com/p/the-day-ny-publishing-lost-its-soul
1•wallflower•19m ago•0 comments

LLM Writing Tropes.md

https://tropes.fyi/tropes-md
2•walterbell•21m ago•0 comments

Palmer Luckey's $1B pitch to reboot 1990s video game consoles

https://www.ft.com/content/77e330a5-8e59-4a36-b08b-c18010a2383b
2•hackerbeat•21m ago•1 comments

Show HN: MicroBin – Easy File Sharing for Everyone – Self-Hostable

https://my.microbin.eu/
1•dszb•22m ago•0 comments

SWE-CI: Evaluating Agent Capabilities in Maintaining Codebases via CI

https://arxiv.org/abs/2603.03823
1•stepri•25m ago•0 comments

I Failed an Interview. Fair or Not, I Built This Workbook

https://doap.metal.bohyen.space/blog/post/java-fintech-interview-workbook/
2•nanacnote•27m ago•1 comments

Sunflowers

https://napo.dev/sunflowers/
1•napolux•31m ago•0 comments

Senators Launch Effort Ban Elected Officials Profiting from Prediction Markets

https://www.merkley.senate.gov/merkley-klobuchar-launch-new-effort-to-ban-federal-elected-officia...
22•stopbulying•34m ago•4 comments

Show HN: ShareNova – Zero-knowledge file transfer with magic-byte scanning

2•HatemDabet•37m ago•0 comments

Show HN: Luna Agent – Custom AI agent in ~2300 lines of Python, no frameworks

https://nonatofabio.github.io/blog/post.html?slug=luna_agent
1•nonatofabio•40m ago•0 comments

Drink the Radioactive Gatorade (AI Pilled)

https://twitter.com/SparksZilla/status/2030336440987463837
1•rmason•40m ago•0 comments

Homo Ignorans: Deliberately Choosing Not to Know

https://pubmed.ncbi.nlm.nih.gov/27217249/
4•Jimmc414•41m ago•2 comments

The False Flag of Viewpoint Diversity

https://www.chronicle.com/article/the-false-flag-of-viewpoint-diversity
1•mmooss•41m ago•0 comments

Prompt Guidance for GPT-5.4

https://developers.openai.com/api/docs/guides/prompt-guidance/
2•andromaton•41m ago•1 comments

Astronomers are capturing video of a black hole for the first time

https://www.cbc.ca/lite/story/9.7117478
1•colinprince•42m ago•0 comments

Do developers even give feedback?

2•xerrs•45m ago•2 comments

CasNum

https://github.com/0x0mer/CasNum
40•aebtebeten•46m ago•8 comments

Lunch with Lord Mancroft

https://www.ft.com/content/ab4d34b3-b73a-48a6-8654-6792c9c39d20
1•theopsimist•47m ago•0 comments