├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── figs └── logo_torchshiftadd.png ├── setup.py ├── test ├── layers │ ├── test_adder.py │ └── test_shift.py └── models │ ├── test_resnet20_adder.py │ ├── test_resnet20_shift.py │ └── test_resnet20_shiftadd.py └── torchshiftadd ├── layers ├── __init__.py ├── adder.py ├── attention.py ├── extension │ ├── adder_cuda.cpp │ ├── adder_cuda_kernel.cu │ └── adder_cuda_kernel_torch_1.4.cu └── shift.py ├── models ├── __init__.py ├── resnet20.py ├── resnet20_adder.py ├── resnet20_shift.py └── resnet20_shiftadd.py └── utils ├── __init__.py ├── ckpt_loading.py ├── comm.py ├── decorator.py ├── quantize.py ├── ste.py ├── test_acc.py └── torch.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/.gitignore -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | Coming soon. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/README.md -------------------------------------------------------------------------------- /figs/logo_torchshiftadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/figs/logo_torchshiftadd.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/setup.py -------------------------------------------------------------------------------- /test/layers/test_adder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/test/layers/test_adder.py -------------------------------------------------------------------------------- /test/layers/test_shift.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/test/layers/test_shift.py -------------------------------------------------------------------------------- /test/models/test_resnet20_adder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/test/models/test_resnet20_adder.py -------------------------------------------------------------------------------- /test/models/test_resnet20_shift.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/test/models/test_resnet20_shift.py -------------------------------------------------------------------------------- /test/models/test_resnet20_shiftadd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/test/models/test_resnet20_shiftadd.py -------------------------------------------------------------------------------- /torchshiftadd/layers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/__init__.py -------------------------------------------------------------------------------- /torchshiftadd/layers/adder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/adder.py -------------------------------------------------------------------------------- /torchshiftadd/layers/attention.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /torchshiftadd/layers/extension/adder_cuda.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/extension/adder_cuda.cpp -------------------------------------------------------------------------------- /torchshiftadd/layers/extension/adder_cuda_kernel.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/extension/adder_cuda_kernel.cu -------------------------------------------------------------------------------- /torchshiftadd/layers/extension/adder_cuda_kernel_torch_1.4.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/extension/adder_cuda_kernel_torch_1.4.cu -------------------------------------------------------------------------------- /torchshiftadd/layers/shift.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/layers/shift.py -------------------------------------------------------------------------------- /torchshiftadd/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/models/__init__.py -------------------------------------------------------------------------------- /torchshiftadd/models/resnet20.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/models/resnet20.py -------------------------------------------------------------------------------- /torchshiftadd/models/resnet20_adder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/models/resnet20_adder.py -------------------------------------------------------------------------------- /torchshiftadd/models/resnet20_shift.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/models/resnet20_shift.py -------------------------------------------------------------------------------- /torchshiftadd/models/resnet20_shiftadd.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/models/resnet20_shiftadd.py -------------------------------------------------------------------------------- /torchshiftadd/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/__init__.py -------------------------------------------------------------------------------- /torchshiftadd/utils/ckpt_loading.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/ckpt_loading.py -------------------------------------------------------------------------------- /torchshiftadd/utils/comm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/comm.py -------------------------------------------------------------------------------- /torchshiftadd/utils/decorator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/decorator.py -------------------------------------------------------------------------------- /torchshiftadd/utils/quantize.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/quantize.py -------------------------------------------------------------------------------- /torchshiftadd/utils/ste.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/ste.py -------------------------------------------------------------------------------- /torchshiftadd/utils/test_acc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/test_acc.py -------------------------------------------------------------------------------- /torchshiftadd/utils/torch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GATECH-EIC/torchshiftadd/HEAD/torchshiftadd/utils/torch.py --------------------------------------------------------------------------------