hn.today

Panfrost is now using Kraid

collabora.com8 points0 comments
Screenshot of Panfrost is now using Kraid

Kraid is a newly developed compiler for the Panfrost driver, replacing the older compiler by default for Mali GPUs with Valhall (v9) or newer in Mesa 27.0; Mesa 26.3 is the final release using the old one. Its redesign addresses weaknesses in modeling Mali register access and data swizzles, which had generated unnecessary instructions. Kraid also handles 64-bit values and arithmetic more effectively, benefiting workloads such as OpenCL. Across captured OpenGL shaders, it cuts instruction counts by about 18.5%. Its improved use of Mali’s mixed-precision capabilities can also remove many floating-point conversions; clpeak tests show mixed-precision compute performance rising roughly 47-65%, though some other compute results are lower.

Kraid keeps shaders in static single assignment form through register allocation, enabling more informed spilling decisions and faster algorithms. In a Vulkan shader database, spills fell about 84%, fills about 79%, and estimated spill costs about 84%; pipeline compilation ran about seven times faster and used 35% less memory. New fragment-shader optimizations can improve particular workloads dramatically, including a 40% gain on some Candy Crush traces. Across application benchmarks, performance is generally similar or a few percent better, with larger gains in selected games and tests, while some results are slightly lower. The compiler’s broader value is a more robust foundation for future development, with many structural problems in the previous compiler addressed.

Read on collabora.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.