Skip to content

HuggingFive ๐Ÿ–๏ธ is a collection of ML functions and libraries written in RISC-V assembly and C.

License

Notifications You must be signed in to change notification settings

OpenMachine-ai/HuggingFive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

HuggingFive ๐Ÿ–๏ธ

HuggingFive ๐Ÿ–๏ธ is a collection of ML functions and libraries written in RISC-V assembly and C. This includes neural network layers, activation functions, as well as entire neural networks. Think of it as a low-level HuggingFace for RISC-V assembly code. The table below includes performance numbers for benchmarking. The hope is to eventually roll all these handwritten tricks into the existing compiler toolchains (or have AI generate even better assembly code).

Description Author RV config Data types Performance numbers for an exemplary config Notes
Config MACs Ops Register utilization Memory size (B)
Conv2D 1x1 OpenMachine RV32IF FP32 C=32, F=32, R=6 C F R2 = 36,864 57,953 8/31 x-regs, 21/32 f-regs
Conv2D 3x3 OpenMachine RV32IF FP32 C=3, F=8, R=12, stride=1 9 C F R2 = 31,104 TBD TBD
Depthwise Conv2D 3x3 OpenMachine RV32IF FP32 C=4, R=6, stride=1 9 C R2 = 1,296 TBD TBD
  • C : input channels
  • F : output channels (or filters), only used if F is not the same as C
  • R : square root of input resolution (e.g. R=6 for image resolution of 6x6 pixels)
  • Q : square root of output resolution, only used if Q is not the same as R
  • MACs : number of fused multiply-accumulate operations required by the neural-network layer (can be used as a lower-bound for total number of ops; this number ignores possible savings from zero-padding for conv-layers)

Contribute

Please add your functions and routines to HuggingFive ๐Ÿ–๏ธ: Add a link to your code in the table and submit a PR, which will get approved promptly because there are no rules here.

More details coming soon ...

About

HuggingFive ๐Ÿ–๏ธ is a collection of ML functions and libraries written in RISC-V assembly and C.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published