Top Banner
Heterogenous Bitwidth Binarization: Weird Operators with Big Benefits Josh Fromm
12

Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

May 05, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Heterogenous Bitwidth Binarization: Weird Operators with Big Benefits

Josh Fromm

Page 2: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Network Binarization

● Multiply-accumulate becomes xnor-popcount.

● 5-30x theoretical speedup.● 32x weight memory compression.

Page 3: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Network Binarization

● Multiply-accumulate becomes xnor-popcount.

● 5-30x theoretical speedup.● 32x weight memory compression.

● 1-bit accuracy is too low but fast.● 2-bit accuracy is high but too slow.● How to bridge the gap?

Page 4: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Mixed Bitwidth Tensors

Page 5: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Mixed Bitwidth Tensors

Page 6: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Middle-Out Bit Distribution

Page 7: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Middle-Out Bit Distribution

Page 8: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Middle-Out Bit Distribution

Page 9: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Super-Linear Scaling

Page 10: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Super-Linear Scaling

Page 11: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Super-Linear Scaling

Page 12: Weird Operators with Big Benefits Heterogenous Bitwidth ... · SQ-TWN (Dong et al., 2017) T WN (our implementation) TWN HBNN (our results) HBNN full precision / I-bit full precision

Hard to Implement!

Implementing on CPU

● Needs efficient sparse tensor library support

Implementing on FPGA

● Gates can be directly laid out for big benefits

● Designing FPGAs is hard, especially for non-uniform computation

TVM can enable these platforms!