Skip to content

Jeffwhen/tpu-perf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TPU Perf

Prerequisites

Install protoc version 3.19 in order to be compatible with ufw.

mkdir build
cd build
cmake ..
make install

Usage

Refer to example for how to create test specs.

Execute from SDK environment.

python3 -m tpu_perf.build --time # To build efficiency test models
python3 -m tpu_perf.build # To build precision test models
python3 -m tpu_perf.run # To run efficency test
python3 -m tpu_perf.precision_benchmark # To run precision benchmark

config.yaml

Required and preset varibles

Name Type Usage
root Preset Repo top directory
home Preset Current model directory
workdir Preset Current model working directory
lmdb_out Preset Dataset output dir. Only set if lmdb field exists.
shape Preset Current shape list. Only set if shapes field exists.
shape_key Preset Current shape string like "1x3x224x224". Only set if shapes field exists.
shape_param Preset Current shape string like "[1,3,224,224]". Only set if shapes field exists.
name Required Specify network name, should be unique
cali Optional Calibration command. Will do calibrating if this variable exists
bmnetu_options Optional bmnetu compile options. Will do int8 compiling if this variable exists
bmnetu_batch_sizes Optional Specify int8 output batches

Variables in top level config.yaml are also set for all models.

Name Usage
nnmodels Path of nnmodels repo