CFU Playground (1) - Introduction
It is not an official open source project of Google, but a very interesting project is in progress. (Refer to the site below for details)
https://cfu-playground.readthedocs.io/en/latest/index.html
To explain the concep briefly, it is a concept that puts a RISC-V soft-core in the FPGA and allows ML to run on the soft-core. The interesting point is that we can easily customize the core with accelerators on FPGA and also add more custom instructions. CFU playgound framework is composed of many good opensource products. So, it's free. We can practice it through many projects of Pete Warden, who devised TinyML using Tensorflow lite micro Framework a few years ago. And we can refer a few more interesting projects.
One of important enablers for CFU playground would be Tensorflow lite micro in conjuction with TinyML. The purpose of TinyML is to implement ML using only a few hundred KByte of memory in an ARM Cortex-M-class microcontroller. Tensorflow lite is already used a lot by people who develop mobile applications, and Tensorflow lite micro can be completed by applying 8-bit quantization there to make machine learning algorithms run on it. (see link below)
https://www.tensorflow.org/lite/microcontrollers?hl=en
The purpose of CFU Playground is to implement an accelerator that improves the performance of machine learning by adding logics to microcontrollers. In the conventional CPU, ALU (Arithmetic Logic Unit) performs operations together with designated registers, where CFU is added to enable faster execution of operations suitable for ML. By following the tutorial on the site above, installing various tools on Linux, and targeting the recommended board, you can better understand the overall flow. Here, even if there is no board, there is an open source program called renode that emulates the board, so the ARTY-7 FPGA board can be completely driven. You don't need to purchase a separate board for the tutorial. If you want to implement a more practical example in the future, you may need to obtain a board suitable for the purpose. It's a really fun concept, so I recommend you try it.
In the previous RNN project, I try to minimize CPU intervention by implementing a full custom ML accelerator. In the future project, I will implement the same ML algorithm in the CFU Playground, understand how the entire tool chain works, and examine the strengths and weaknesses of the previous project.
1. Implementation of RNN algorithm with Tensorflow lite micro: Since CFU Playground's basic python language is Tensorflow. So, I need to convert previously implemented Pytorch model into Tensorflow model.
2. After securing the ML C source using Tensorflow lite micro, check if it operates in the RISC-V environment and figure out which part can be accelerated to improve performance.
3. Based on the above analysis, implement the accelerator and check if there is any performance improvement. I plan to post the above three steps on the blog as they progress.
Comments
Post a Comment