Prior to this application, please take a look at <vta-hw-root>/apps/tsim_example
for installation This is an application that performs Bit Serial Multiplication for GEMM utilizing TSIM.
Bit Serial Multiplication for GEMM:
General Matrix Multiplications (GEMM), are mostly calculated by repeatly calculating the dot product for each pair of vectors. The dot product is calculated by summing every product of the vector pair. We approach this operation with slicing and shifting, like how basic multiplication works, each vector elements before we accumulate them. We can sufficiently reduce the cycles required to perform a gemm given that the data bit width is small. This GEMM application uses TSIM for future accerlerator prototypes.
Test Chisel3 backend with bit serial GEMM
<vta-hw-root>/apps/gemm
make
If you have already compiled chisel backend (i.e. ran make
)
make serial
make parallel
Some steps for creating your own custom TSIM application
<vta-hw-root>/apps/gemm
./hardware/chisel/src/scala.main/accel/Compute.scala
./hardware/chisel/src/scala.main/accel/RegFile.scala
./src/driver.cc
and link it with both RegFile.scala
and the test script<vta-hw-root>/apps/tsim_example
, which performs add by one to a vector, is highly encouraged to create a more complex applicationSome pointers
<vta-hw-root>/apps/gemm/tests/python
<vta-hw-root>/apps/gemm/hardware/chisel
<vta-hw-root>/apps/gemm/src/driver.cc
<vta-hw-root>/apps/gemm/python/accel