OpenTPU: Open-Source Reimplementation of Google Tensor Processing Unit (TPU)

https://news.ycombinator.com/rss Hits: 16
Summary

UCSB ArchLab OpenTPU Project OpenTPU is an open-source re-implementation of Google's Tensor Processing Unit (TPU) by the UC Santa Barbara ArchLab. The TPU is Google's custom ASIC for accelerating the inference phase of neural network computations. Our design is based on details from Google's paper titled "In-Datacentre Performance Analysis of a Tensor Processing Unit" (https://arxiv.org/abs/1704.04760), which is to appear at ISCA2017. However, no formal spec, interface, or ISA has yet been published for the TPU. The OpenTPU is powered by PyRTL (http://ucsbarchlab.github.io/PyRTL/). Requirements Python 3 PyRTL version >= 0.8.5 numpy Both PyRTL and numpy can be installed with pip; e.g., pip install pyrtl . How to Run To run the simple matrix multiply test in both the hardware and functional simulators: Make sure MATSIZE is set to 8 in config.py, then python3 assembler.py simplemult.a python3 runtpu.py simplemult.out simplemult_hostmem.npy simplemult_weights.npy python3 sim.py simplemult.out simplemult_hostmem.npy simplemult_weights.npy To run the Boston housing data regression test in both the hardware and functional simulators: Make sure MATSIZE is set to 16 in config.py, then python3 assembler.py boston.a python3 runtpu.py boston.out boston_inputs.npy boston_weights.npy python3 sim.py boston.out boston_inputs.npy boston_weights.npy Hardware Simulation The executable hardware spec can be run using PyRTL's simulation features by running runtpu.py . The simulation expects as inputs a binary program and numpy array files containing the initial host memory and the weights. Be aware that the size of the hardware Matrix Multiply unit is parametrizable --- double check config.py to make sure MATSIZE is what you expect. Functional Simulation sim.py implements the functional simulator of OpenTPU. It reads in three cmd args: the assembly program, the host memory file, and the weights file. Due to the different quantization mechnisms between high-level applications (written in ...

First seen: 2025-05-28 00:58

Last seen: 2025-05-28 16:01