Interesting read HPC programming

2 Likes

No mention of Zig, but my personal opinion is that it could be the dark horse of HPC if the cards are played right :slightly_smiling_face: Here is my 2c as someone who works in HPC:

On the CPU-side, std.Io is the right kind of abstraction for shared memory parallelism, and I do wonder if distributed compute could be done as an extension to that (MPI as an interface?). Only thing that is unclear to me is whether the standard library approach with futures and cancellation is low enough overhead for compute.

For GPUs, The SPIR-V backend work is promising to me, but maybe a little misguided for HPC. Vulkan/OpenCL can get you 80% of the way there for most kernels, but ultimately CUDA still dominates perf where it matters — tensor cores, warp intrinsics, etc. — and NVIDIA holds the whole ecosystem hostage with their vendored libraries and toolkits. Will be interested to see how the GPU work in Zig evolves.

On the language side, it seems like the main pain point for Zig is just syntax sugar. Sometimes it surprises me how elegant Fortran can be in comparison; maybe builtin matrix support in Zig will help here :wink:

4 Likes