SiFive Blog
The latest insights, and deeper technology dives, from RISC-V leaders

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ć.











