https://www.phoronix.com/news/AMD-Peano-LLVM-Ryzen-AI Phoronix * Articles & Reviews * News Archive * Forums * Premium Ad-Free * Contact * Popular Categories * Close * * Articles & Reviews * News Archive * Forums * Premium * Contact * Categories Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals * [ ] [Search] Show Your Support: Did you know that you can get Phoronix Premium for under $4 per month? Try it today to view our site ad-free, multi-page articles on a single page, and more while the proceeds allow us to write more Linux hardware reviews. At the very least, please disable your ad-blocker. AMD's Newest Open-Source Surprise: "Peano" - An LLVM Compiler For Ryzen AI NPUs Written by Michael Larabel in AMD on 8 June 2024 at 07:56 AM EDT. 6 Comments AMD There was a very exciting Friday evening code drop out of AMD... They announced a new project called Peano that serves as an open-source LLVM compiler back-end for AMD/Xilinx AI engine processors with a particular focus on the Ryzen AI SOCs with existing Phoenix and Hawk Point hardware as well as the upcoming XDNA2 found with the forthcoming Ryzen AI 300 series. AMD's Ryzen AI NPU on Linux is finally getting interesting! Back in January out of the blue was AMD posting an open-source XDNA Linux kernel driver for supporting the Ryzen AI hardware. That kernel driver though remains out-of-tree and AMD hasn't been entirely clear with the community about its plans, etc. More recently I've begun hearing word that they will work toward upstreaming it in the Linux kernel but to date they haven't sent out any patches for review or go through those other formalities. There also hasn't been much in the way of user-space software or details about Ryzen AI on Linux... So imagine my surprise and joy while working on Friday night and noticing their subtle announcement of this new AMD Peano project. AMD Peano "Peano" is the apparent name for their new LLVM compiler back-end supporting the Ryzen AI SoCs and other AMD/Xilinx AI engines. Stephen Neuendorffer of AMD/Xilinx and part of the "Peano team" announced this new back-end to LLVM developers. He explained of AMD Peano in the announcement on LLVM's Discourse: "On behalf of AMD, I'm pleased to announce the open sourcing of an LLVM backend for AMD/Xilinx AI Engine processors. These processors exist in a number of devices including RyzenAI SoCs. The repository currently focuses on supporting the AIE2 architecture implemented by the XDNA accelerators in "Phoenix" and "Hawk Point" devices. ... Note that these accelerators include an array of processors, while the LLVM backend only supports a single processor. Support for devices as a whole is available in open source tools based on MLIR. ... In addition to support for LLVM code generation, the repository also includes support for Clang, LLD, binutils (e.g. 'llvm-objdump'), Compiler-RT, and LLVM-LIBC. ... Generally speaking, AI Engine processors are in-order, exposed-pipeline VLIW processors. Each VLIW instruction bundle specifies the behavior of one or more functional units, which begin executing a new instruction at the same time. The processor pipeline does not include stall logic to enforce data dependencies, and instructions will continue executing in order regardless of other instructions in the pipeline. As a result, the compiler is able to schedule machine instructions which access the same register in ways that potentially overlap. Other key architectural characteristics include varying width instruction slots between different instruction encodings and relatively small address spaces (20-bit pointer registers). The presence of varying-width instruction slots implies some code alignment restrictions for instructions which are branch or return targets." AMD will be working to upstream the relevant code into the LLVM codebase. For now this Peano AI engine fork is hosted via Xilinx/ llvm-aie on GitHub. The XDNA Phoenix / Hawk Point support is fully in place while the XDNA2 support for upcoming Ryzen AI 300 "Strix Point" hardware is still being developed. Having this open-source compiler back-end for Ryzen AI NPUs is significant in making the accelerators more useful under Linux. Phoronix readers need not be reminded in the versatility and widespread use of the LLVM compiler infrastructure. This open-source user-space code is also important for facilitating the upstreaming of their open-source XDNA driver into the Linux kernel. Ryzen AI example code AMD does have documentation on writing a basic code sample now for targeting the Ryzen AI NPU using the XDNA kernel driver and LLVM AIE/ Peano compiler. AMD Ryzen AI logo I'm still going through this code and announcement with yesterday marking the first time I heard of this AMD Peano project. As for the "Peano" name for this compiler, it looks like it might be a play out of NVIDIA's playbook of mathematician/scientist codenames... Giuseppe Peano was a prominent Italian mathematician who died in Turin in 1932. This is a great milestone to see albeit something that should have happened months ago... Ryzen AI as a reminder debuted a year ago with the Ryzen 7040 series. As a reminder for comparison, Intel had their IVPU kernel driver upstreamed into the Linux kernel for their NPU even before Meteor Lake shipped. Intel's IVPU driver also already has Arrow Lake and Lunar Lake support upstream. Intel also has their open-source NPU plug-in within OpenVINO, their NPU Python acceleration library, and other code available. Intel's NPU Linux support has been much more punctual than AMD. In any event having this open-source compiler backend should be useful in beginning to jump start the Linux ecosystem/support around leveraging the growing number of Ryzen AI SoCs. Next up, seeing the AMD XDNA driver in the mainline Linux kernel? In any event a nice (coincidental) birthday surprise with Phoronix turning 20 years old this week of advocating for open-source and Linux hardware support while having this AMD Peano open-source code drop to end out the week. 6 Comments Tweet Related News Linux 6.11 To Merge Support For Running AMD SEV-SNP KVM Guests Shopping For A Launch-Day AMD Ryzen AI 300 Series Laptop For Linux Testing Linux 6.10 Fixes AMD Zen 5 CPU Frequency Reporting With cpupower AMD Ryzen 9000 Series Announced - Zen 5 Showing Big Generational Uplift AMD Previews 5th Gen EPYC With Up To 192 Cores Per Socket AMD's Ryzen AI 300 Series Mobile APUs Should Be Interesting For Next-Gen Laptops About The Author Michael Larabel Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com. Popular News This Week Linux Shoots Past The 2% Threshold For The Steam Survey, AMD CPU Use Breaks 75% Rust-Written Redox OS Continues Gravitating Toward The COSMIC Desktop Linux Mint Disabling Unverified Flatpaks By Default AMD Ryzen 9000 Series Announced - Zen 5 Showing Big Generational Uplift AMD ROCm 6.1.2 Released With Fixes & Optimizations Fedora Moves Ahead In Replacing Redis With Valkey Godot 4.3 Beta 1 Released With Native Wayland Support Intel Xe2 Brings Native 64-bit Integer Arithmetic Latest Linux News AMD's Newest Open-Source Surprise: "Peano" - An LLVM Compiler For Ryzen AI NPUs Redox OS With COSMIC Apps Is Looking Quite Nice KDE Plasma 6.1 Is Looking To Be A "Good One" Google Begins Upstreaming Fuchsia OS Support Into Mesa 3D Big Speed Boost For AES-GCM Performance On Intel & AMD CPUs Queued Ahead Of Linux 6.11 Intel's Xe Driver Preps For SR-IOV Support & More Lunar Lake With Linux 6.11 Updated Intel Meteor Lake Tuning For Linux Shows Huge Performance/ Power Improvements Microsoft Releases Azure Linux 3.0 Preview Updated AMD GPU Firmware Makes Valve's Steam Deck More Robust Against Buggy Apps Today Marks 20 Years Since Starting Phoronix For Linux Hardware Reviews & News Show Your Support, Go Premium Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations. Latest Featured Articles AMD EPYC 4364P & 4564P @ DDR5-4800 / DDR5-5200 vs. Intel Xeon E-2488 Intel Xeon 6766E/6780E Sierra Forest vs. Ampere Altra Performance & Power Efficiency Intel Xeon 6780E / Xeon 6766E 144-Core Performance Benchmarks Intel Launches Xeon 6700E Sierra Forest CPUs - Initially Up To 144 Cores AMD EPYC 4124P Benchmarks: A Quad-Core $149 Server CPU Support Phoronix The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by subscribing to Phoronix Premium. You can also contribute to Phoronix through a PayPal tip or tip via Stripe. Phoronix Media --------------------------------------------------------------------- * Contact * Michael Larabel * OpenBenchmarking.org Phoronix Premium --------------------------------------------------------------------- * Support Phoronix * While Having Ad-Free Browsing, * Single-Page Article Viewing Share --------------------------------------------------------------------- * Facebook * Twitter * Legal Disclaimer, Privacy Policy, Cookies | Privacy Manager | Contact * Copyright (c) 2004 - 2024 by Phoronix Media. * All trademarks used are properties of their respective owners. All rights reserved.