Skip to content

This project records the process of optimizing SGEMM (single-precision floating point General Matrix Multiplication) on the riscv platform.

License

Notifications You must be signed in to change notification settings

Zhao-Dongyu/sgemm_riscv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sgemm_riscv


RISC-V is an open standard Instruction Set Architecture (ISA) enabling a new era of processor innovation through open collaboration.


GEMM General matrix multiply, one of the Basic Linear Algebra Subprograms.


This project records the process of optimizing SGEMM (single-precision floating point General Matrix Multiplication) on the riscv platform.


To get started, please refer to Section Usage

Related tutorials are located on the wiki.

Blislab

Blislab is an open source teaching project that teaches you step-by-step optimization of matrix multiplication.

On the basis of the blislab project, surez-ok has made some deletions and optimizations (deleted into the simplest code, only supports x86 or riscv Linux OS), so The project is clearer and easier to get started.

Project structure

.
├── data
├── pics
├── prepare
│   ├── 0.hello_world
│   ├── 1.memory_copy
│   ├── 2.memcpy_bandwidth_test
│   ├── 3.flw_bandwidth_test
│   ├── 4.vlw_bandwidth_test
│   ├── 5.saxpy
│   └── imgs
└── sgemm
    ├── common
    ├── step0
    ├── step1
    ├── step2
    ├── step3
    ├── step4
    ├── step5
    ├── step6
    ├── step7
    ├── step8
    └── step9

In the prepare folder, I compiled some tutorials and demos for hardware performance testing.

In the sgemm folder, step0 to step9 are my experiments.

See wiki for more details.

Installation

You need to download the cross-compilation chain of riscv.

The development board I use is Nezha D1, download from here

Usage

Take step1 as an example

You need to modify the Makefile and configure CROSS_COMPILE in the first few lines of the Makefile as the correct cross-compiler

$ cd step1
$ make
$ adb push test_bl_sgemm_step1.x ./.
$ adb shell './test_bl_sgemm_step1.x'

Acknowledgement

Support

[email protected]

License

MIT License

About

This project records the process of optimizing SGEMM (single-precision floating point General Matrix Multiplication) on the riscv platform.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published