资源与支持

SiFive 博客

来自 RISC-V 专家的最新洞察与深度技术解析

August 12, 2026

Introducing SKL: The SiFive Kernel Library

We’re thrilled to announce the launch of the SiFive Kernel Library or SKL (pronounced “skill”), an open-source collection of highly-optimized computational routines for the RISC-V Vector ISA (RVV) and its various extensions, including SiFive’s matrix engines.

The kernels in SKL are low-level building blocks for high performance applications running on RISC-V hardware from SiFive and other vendors. As self contained source files distributed under an MIT license, these performance primitives are expressly designed for integration into other projects and frameworks, both open-source and proprietary. We’ve already come to rely on SKL internally to showcase the peak performance of SiFive’s Intelligence™ series of processors to customers under NDA, and now we are excited to share it with the broader community of RVV developers.

The continued ascent of RISC-V as a superior alternative to other architectures will require a software base that can reliably extract the highest degree of performance from the diverse array of hardware offerings across different sectors. By establishing SKL as a central collection of critical algorithms in computationally-intensive domains such as AI and machine learning, we aim to ensure that popular applications will never lack optimized code for RVV platforms. This initial offering primarily emphasizes SiFive’s flagship IP, but the intention is that SKL will now be able to grow to play a pivotal role for all performant RISC-V systems in the ecosystem today and in the future.

The rest of this blog explores the details of SKL, including its structure and features at the time of launch in August 2026. We invite readers to learn more, keep up to date, and to use and contribute to SKL by visiting the repository on GitHub.

Design & Features

The primary functionality of SKL is provided in the form of kernels. A kernel consists of one or more C-language functions in a single source file implementing a standard algorithm, such as matrix multiplication or softmax. Each kernel is specialized for a particular combination of algorithm, datatype, ISA feature, and possibly micro-architecture.

SKL’s overall design and core features can be summarized as follows:

  • Standalone files & decomposability: each kernel may be executed in a single function call, though this may in turn call other functions in the same source file. In all cases, a kernel can be extracted from SKL by copying exactly three files: the kernel’s source file kernel.c, a header file kernel.h that declares prototypes for public functions, and a shared header file skl-common.h with a minimal set of common definitions used throughout codebase.
  • Composability as a submodule: At the other extreme, some projects may choose to incorporate SKL’s source tree wholesale, either as a bona fide Git submodule or a simple directory clone. The standalone nature of SKL kernels facilitates this by imposing no build system requirements: client projects can simply access the source files in skl/src directly and compile them through their existing mechanisms. Projects that integrate SKL this way can benefit from periodic updates and under-the-hood improvements to kernels, provided they rely only on the designated public-facing APIs.
  • Minimal language requirements: all SKL kernels are written in C99 with RVV intrinsics or inline assembly. The only requirement is a compiler that supports RVV, though kernels that use custom extensions will need appropriate toolchains.
  • No libc or other library dependencies: no standard library is needed to use SKL kernels, which do not perform memory allocation, I/O, or syscalls. They depend only on definitional headers such as stddef.h or RVV-related files like riscv_vector.h for access to vector intrinsics. Pipeline-specific optimizations & generic implementations: SKL includes both hand-tuned versions of some kernels for specific processor pipelines, such as SiFive’s X390 micro-architecture, and also more generic versions intended as canonical RVV vectorizations of key algorithms. Kernels with processor-specific optimizations are generally written in inline assembly and mention their target micro-architecture in the name, while more generic functions prefer compiler intrinsics and are named with an ISA requirement suffix.
  • Extensive documentation & test collateral: All SKL kernels provide API-level documentation in the form of Doxygen comments in each header file. Numerous supplementary guides in markdown format accompany families of related kernels. The repository also includes test programs and benchmark definitions in skl/test/ that illustrate kernels’ expected usage and support continuous integration. (A barebones CMake-based build system enables this, but is not intended to be the only or even primary means of compiling SKL kernels.)

Areas of Functionality

The core content of SKL can be broken down by application domain, ISA requirements, and micro-architecture targets.

  • Application Domains Functionality extends to the following areas:

  • Matrix Multiplication (GEMM): support for 2D matrix multiplication across a variety of datatypes (16-, 32-, and 64-bit IEEE floating point, BFloat16, and quad-widening 8-bit to 32-bit integers) as well as certain 4D packed matrix layouts.

  • Nonlinear Functions: primarily for use by or as activation functions, SKL contains implementations of the exponential function, softmax, sigmoid linear unit (SiLU), and the Gaussian error linear unit (GELU) across a similarly broad range of floating-point datatypes.

  • Convolution: Many convolutional neural networks (CNNs) make use of both general 2D and depthwise convolution. The former can be implemented with GEMM via the im2col transformation, while the latter requires special treatment. SKL includes 2D depthwise convolution kernels supporting the HWC data layout optimized for a variety of filter shapes.

  • Data Movement: matrix transposition and packing/unpacking functions are provided to support the use of GEMM kernels.

  • Numerics: vectorized conversion functions between various low-precision floating-point formats from the Open Compute Project are provided at the time of launch.

We expect that in the course of time this list will expand to encompass more application domains, and a greater number of algorithms within each.

Architectural Support

Within the kernel families described above, different implementations are provided to exploit a wide range of ISA features beyond the RISC-V “V” extension, including:

  • Xsfmm{base, 32a8i, 32a16f, 32a32f}: SiFive's matrix engine.
  • Xsfvfexp{16,32}e: SiFive's 16-bit and 32-bit exponential function instructions.
  • Xsfvfbfexp16e: SiFive's 16-bit brain floating point exponential function instruction.
  • Xsfvfexpa: SiFive's exponential approximation instruction.
  • Xsfvfbfa: SiFive's native brain floating point arithmetic instructions.
  • Xsfvqdotq: SiFive's 8-bit integer 4-element partial dot product instruction.
  • Zvfbfmin: Minimal support for brain floating point (conversion instructions).
  • Zvfh: IEEE half-precision floating point arithmetic.
  • Zvfofp8min: Conversion instructions for 8-bit OFP formats.
  • Zvfofp4min: Conversion instructions for 4-bit OFP formats.

While many of these extensions are not RISC-V standards, we plan to expand this roster as new standards are ratified.

Ready for AI

SKL’s initial functionality was chosen to cover the most performance-critical hotspots in AI and ML workloads. Transformer-based large language models (LLMs) benefit from high-throughput matrix multiplication and accelerated softmax during attention score calculation, while multilayer perceptron (MLP) computations make use of the same linear algebra kernels in conjunction with hardware-assisted activation functions such as sigmoid linear unit (SiLU). All are supported by auxiliary kernels to pack and transpose tensor data as required by accelerated instructions. Together, these operations constitute a majority of the inference runtime for popular models.

The kernels in SKL are suitable for integration into model-serving frameworks as drop-in replacements for their lowest-level, architecture-specific functions. For example, the PyTorch ATen tensor library supports delegation of tensor operation implementations to custom backend routines. The vLLM framework allows platforms to reimplement the entire paged-attention algorithm and replace other operators with native library calls. Moreover, vLLM and ATen already show the feasibility of integrating entire kernel libraries as the backend compute substrate, such as cuDNN or MKL BLAS. SKL is primed to serve a similar purpose.

Next Steps

This announcement marks the beginning of SKL as an open-source library. A quick glance at the commit history, list of open pull-requests, and discussions on GitHub should confirm that it is very much an active undertaking. However, we hope that SiFive’s initial contribution will be just one part of this story. The intent of SKL is not only to be used by upstream software, but also to embrace contributions from the RISC-V community.

By gathering together key algorithms tailored to different platforms in a single place behind a common set of interfaces, SKL can accelerate support for RISC-V in important applications and advance the overall ecosystem. As its integration deepens into other libraries, RISC-V vendors will find it increasingly profitable to distribute their processor-specific optimizations through SKL. At the same time, inference engines with large RISC-V user bases will see value in adding new kernels to SKL. SiFive’s focus is set on integrating SKL into vLLM, PyTorch, and other relevant projects and we are happy to collaborate with the open source community on this ongoing effort. As new models appear SiFive will stay committed to adding support for emerging operators and datatypes and making sure SKL delivers the best level of performance on RISC-V platforms.

With this launch, SKL becomes the open-source cornerstone for next-generation RISC-V performance. We look forward to seeing the innovative projects the community will develop with these fine-tuned routines, ensuring RISC-V can exceed the high-performance demands of every emerging computational domain.

The author

Eric Love is a Principal Software Engineer at SiFive and technical lead for the algorithms & libraries team. He is the architect of the SiFive Kernel Library, and has been with the company for more than six years. His experience and interests range from low-level performance programming and micro-architectural software optimization to vectorization, numerical methods, and compilers. Prior to joining SiFive, he was a graduate student at UC Berkeley, where he obtained a PhD in computer science from the Berkeley Architecture Research lab under the supervision of Krste Asanović.

Read more Insights from the RISC-V Experts

RISC-V EU Summit 2026: An Ecosystem Coming of Age
最新文章
RISC-V EU Summit 2026: An Ecosystem Coming of Age
I recently returned from the RISC-V Europe Summit 2026 in Bologna and, like many attendees, I came away energized by the announcements, the technical discussions and the sheer number of people building products around RISC-V.
P570 Gen 3:系统视角
最新文章
P570 Gen 3:系统视角
然而,CPU 的需求横跨性能、功耗和成本等多个维度。在某些细分市场中,需要在不同的功耗与成本约束下实现性能提升。基于这类 CPU 的系统需要可信赖的产品路线图,才能切实交付新的系统能力。尽管部分供应商已退出“低端市场”,SiFive 仍坚持在整条性能曲线上持续创新。本次发布的 P570 Gen 3 Performance IP,旨在为中低端、具备 Linux 能力的系统提供显著的性价比与能效比提升。
SiFive Performance™ P570 Gen 3 深度解析:面向下一代消费级与商用应用的高性能能效设计
最新文章
SiFive Performance™ P570 Gen 3 深度解析:面向下一代消费级与商用应用的高性能能效设计
SiFive 的核心是 RISC-V,这是 SiFive 创始人在公司成立 5 年前发明的指令集架构 (ISA)。SiFive 正持续演进基于 RISC-V 的 IP 基础模块,重新定义并推动各类计算平台的普及化发展。在技术领域,演进并非一串随机变化的时间线,而是一系列精心规划、环环相扣的里程碑。每一步演进都会创造一系列新的环境条件,从而推动下一次更复杂的跨越成为必然。要赢得这场竞赛,关键在于具备适应变化的灵活性与持续创新能力,而这两点正是 SiFive 与 RISC-V 的核心价值观所在。