Skip to content

RESPECT: Reinforcement Learning based Edge Scheduling on Pipelined Coral Edge TPUs (DAC'23)

Notifications You must be signed in to change notification settings

Yu-Maryland/RESPECT

Repository files navigation

RESPECT: Reinforcement Learning based Edge Scheduling on Pipelined Coral Edge TPUs

Core code structure

dataset/:
	dataset_generator.py  eval_dataset  __init__.py  __pycache__  training_dataset

edge_tpu_inference_results/: # saves the EdgeTPU ImageNet model scheduling results, generated by RESPECT inference	
	densenet121.txt  densenet169.txt  densenet201.txt  mobilenet_1.00_224.txt  mobilenetv2_1.00_224.txt  resnet101.txt  resnet101v2.txt  resnet152.txt  resnet152v2.txt

 

nets/: # pointer-network design
	attention_model.py  __init__.py                       pointer_network_originalbatch.py  pointer_network_singleTraining.py __pycache__
 

problems/: # scheduling cost function in toposort
__init__.py  op  pctsp  __pycache__  toposort   

 
RESPECT_Eval_ImageNet_Models/: # evaluation dataset (post-embedding)
densenet121.pt  densenet201.pt          inception_v3.pt        mobilenetv2_1.00_224.pt  resnet101v2.pt  resnet152v2.pt  resnet50v2.pt  vgg19.pt
densenet169.pt  inception_resnet_v2.pt  mobilenet_1.00_224.pt  resnet101.pt             resnet152.pt    resnet50.pt     vgg16.pt       xception.pt

saved_model/: # pre-trained model for re-producing the inference results; load for inference
run_20210827T155340

Usage

Note:

  • checking CUDA device (we set CUDA_VISIBLE_DEVICES=0)
  • checking python env (we use conda env; see details of the env setups below)
bash RESPECT_scheduling_ImageNet.sh
  • results are written in edge_tpu_inference_results
  • pre-trained model loaded from saved_model

Example of execution (ResNet101)

  [*] Loading data from saved_model/run_20210827T155340/epoch-298.pt
Batch inference runtime test over 64 (0.0357 per scheduling)
2.2832441329956055
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:02<00:00,  2.28s/it]
Validation count of misMatch: 311.58
Validation mean of recall_accuracy: 0.50
Validation max of recall_accuracy: 0.53
Validation min of recall_accuracy: 0.45
Evaluating baseline model on the evaluation dataset
0/1 [00:00<?, ?it/s]torch.Size([1, 347, 15]) torch.Size([64, 347, 15])

CONDA Env Summary

cudatoolkit               10.2.89              hfd86e86_1  
cycler                    0.10.0                     py_2    conda-forge
dbus                      1.13.18              hb2f20db_0  
decorator                 4.4.2                      py_0    conda-forge
expat                     2.4.1                h9c3ff4c_0    conda-forge
ffmpeg                    4.3                  hf484d3e_0    pytorch
fontconfig                2.13.1            he4413a7_1000    conda-forge
freetype                  2.10.4               h5ab3b9f_0  
glib                      2.69.0               h5202010_0  
gmp                       6.2.1                h2531618_2  
gnutls                    3.6.15               he1e5248_0  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               h28cd5cc_2  
icu                       58.2              hf484d3e_1000    conda-forge
intel-openmp              2021.2.0           h06a4308_610  
joblib                    1.1.0              pyhd8ed1ab_0    conda-forge
jpeg                      9b                   h024ee3a_2  
kiwisolver                1.3.1            py38h1fd1430_1    conda-forge
lame                      3.100                h7b6447c_0  
lcms2                     2.12                 h3be6417_0  
ld_impl_linux-64          2.35.1               h7274673_9  
libblas                   3.9.0           1_h6e990d7_netlib    conda-forge
libcblas                  3.9.0           3_h893e4fe_netlib    conda-forge
libffi                    3.3                  he6710b0_2  
libgcc-ng                 11.2.0              h1d223b6_11    conda-forge
libgfortran-ng            7.5.0               h14aa051_19    conda-forge
libgfortran4              7.5.0               h14aa051_19    conda-forge
libgomp                   11.2.0              h1d223b6_11    conda-forge
libiconv                  1.15                 h63c8f33_5  
libidn2                   2.3.1                h27cfd23_0  
liblapack                 3.9.0           3_h893e4fe_netlib    conda-forge
libpng                    1.6.37               hbc83047_0  
libstdcxx-ng              11.2.0              he4da1e4_11    conda-forge
libtasn1                  4.16.0               h27cfd23_0  
libtiff                   4.2.0                h85742a9_0  
libunistring              0.9.10               h27cfd23_0  
libuuid                   2.32.1            h7f98852_1000    conda-forge
libuv                     1.40.0               h7b6447c_0  
libwebp-base              1.2.0                h27cfd23_0  
libxcb                    1.13              h7f98852_1003    conda-forge
libxml2                   2.9.9                h13577e0_2    conda-forge
lz4-c                     1.9.3                h2531618_0  
matplotlib                3.4.2            py38h578d9bd_0    conda-forge
matplotlib-base           3.4.2            py38hcc49a3a_0    conda-forge
mkl                       2020.2                      256  
mkl-service               2.3.0            py38h1e0a361_2    conda-forge
mkl_fft                   1.2.0            py38hab2c0dc_1    conda-forge
mkl_random                1.2.0            py38hc5bc63f_1    conda-forge
munch                     2.5.0                    pypi_0    pypi
ncurses                   6.2                  he6710b0_1  
nettle                    3.7.3                hbbd107a_1  
networkx                  2.6.1              pyhd8ed1ab_1    conda-forge
ninja                     1.10.2               hff7bd54_1  
numpy                     1.20.3           py38h9894fe3_0    conda-forge
numpy-base                1.18.5           py38hde5b4d6_0  
olefile                   0.46                       py_0  
openh264                  2.1.0                hd408876_0  
openssl                   1.1.1l               h7f98852_0    conda-forge
pandas                    1.3.0            py38h1abd341_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pillow                    8.2.0            py38he98fc37_0  
pip                       21.1.3           py38h06a4308_0  
pretrainedmodels          0.7.4                    pypi_0    pypi
protobuf                  3.17.3                   pypi_0    pypi
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.9.2            py38h05f1152_4  
python                    3.8.10               h12debd9_8  
python-dateutil           2.8.1                      py_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytorch                   1.9.0           py3.8_cuda10.2_cudnn7.6.5_0    pytorch
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
qt                        5.9.7                h5867ecd_1  
readline                  8.1                  h27cfd23_0  
scikit-learn              1.0.1            py38hacb3eff_1    conda-forge
scipy                     1.5.3            py38h828c644_0    conda-forge
setuptools                52.0.0           py38h06a4308_0  
sip                       4.19.13          py38he6710b0_0  
six                       1.16.0             pyhd3eb1b0_0  
sqlite                    3.36.0               hc218d9a_0  
tensorboard-logger        0.1.0                    pypi_0    pypi
threadpoolctl             3.0.0              pyh8a188c0_0    conda-forge
tk                        8.6.10               hbc83047_0  
torchaudio                0.9.0                      py38    pytorch
torchvision               0.10.0               py38_cu102    pytorch
tornado                   6.1              py38h497a2fe_1   
tqdm                      4.61.2             pyhd8ed1ab_1    conda-forge
typing_extensions         3.10.0.0           pyh06a4308_0  
tzdata                    2021a                h52ac0ba_0  
wheel                     0.36.2             pyhd3eb1b0_0  
xz                        5.2.5                h7b6447c_0  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.4.9                haebb681_0  

About

RESPECT: Reinforcement Learning based Edge Scheduling on Pipelined Coral Edge TPUs (DAC'23)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published