tree: 361097c1118a211d612f2e7b857de50501d0fe08 [path history] [tgz]
  1. hardware/
  2. python/
  3. src/
  4. tests/
  5. CMakeLists.txt
  6. Makefile
  7. README.md
apps/gemm/README.md

VTA TSIM Application

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

    • Go to <vta-hw-root>/apps/gemm
    • Run make
  • If you have already compiled chisel backend (i.e. ran make)

    • Bit Serial test with another input set, run make serial
    • Bit parallel test with another input set, run make parallel
  • Some steps for creating your own custom TSIM application

    • Go to <vta-hw-root>/apps/gemm
    • Create custom circuit within ./hardware/chisel/src/scala.main/accel/Compute.scala
    • Map the according Registers in ./hardware/chisel/src/scala.main/accel/RegFile.scala
    • Create your test script
    • Map the registers in ./src/driver.cc and link it with both RegFile.scala and the test script
    • Understanding of <vta-hw-root>/apps/tsim_example, which performs add by one to a vector, is highly encouraged to create a more complex application
  • Some pointers

    • Chisel3 tests in <vta-hw-root>/apps/gemm/tests/python
    • Chisel3 accelerator backend <vta-hw-root>/apps/gemm/hardware/chisel
    • Software C++ driver (backend) that handles the accelerator <vta-hw-root>/apps/gemm/src/driver.cc
    • Software Python driver (frontend) that handles the accelerator <vta-hw-root>/apps/gemm/python/accel