├── README.md ├── figures ├── deepshift-ps.png ├── deepshift-q.png └── mac2sac.png ├── pytorch ├── cifar10.py ├── cifar10_models │ ├── __init__.py │ ├── densenet.py │ ├── dpn.py │ ├── efficientnet.py │ ├── googlenet.py │ ├── lenet.py │ ├── mobilenet.py │ ├── mobilenetv2.py │ ├── pnasnet.py │ ├── preresnet.py │ ├── resnet.py │ ├── resnext.py │ ├── senet.py │ ├── shufflenet.py │ ├── shufflenetv2.py │ └── vgg.py ├── customized_models.py ├── deepshift │ ├── __init__.py │ ├── convert.py │ ├── kernels │ │ ├── __init__.py │ │ ├── cpu │ │ │ ├── setup.py │ │ │ └── shift_cpu.cpp │ │ ├── cuda │ │ │ ├── __init__.py │ │ │ ├── convert_to_unoptimized.py │ │ │ ├── setup.py │ │ │ ├── shift.cu │ │ │ ├── shift_cuda.cpp │ │ │ ├── unoptimized_conv.py │ │ │ ├── unoptimized_cuda.cpp │ │ │ ├── unoptimized_cuda_kernel.cu │ │ │ └── unoptimized_linear.py │ │ └── kernels.py │ ├── modules.py │ ├── modules_q.py │ ├── ste.py │ └── utils.py ├── imagenet.py ├── install_kernels.sh ├── mnist.py ├── optim │ ├── __init__.py │ ├── optim_shift.py │ ├── radam.py │ └── ranger.py ├── torchsummary │ ├── __init__.py │ └── torchsummary.py └── unoptimized │ ├── __init__.py │ ├── convert.py │ ├── kernels │ ├── __init__.py │ ├── cuda │ │ ├── setup.py │ │ ├── unoptimized.cu │ │ └── unoptimized_cuda.cpp │ └── kernels.py │ └── modules │ ├── conv.py │ └── linear.py └── requirements.txt /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/README.md -------------------------------------------------------------------------------- /figures/deepshift-ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/figures/deepshift-ps.png -------------------------------------------------------------------------------- /figures/deepshift-q.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/figures/deepshift-q.png -------------------------------------------------------------------------------- /figures/mac2sac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/figures/mac2sac.png -------------------------------------------------------------------------------- /pytorch/cifar10.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/__init__.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/densenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/densenet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/dpn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/dpn.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/efficientnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/efficientnet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/googlenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/googlenet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/lenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/lenet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/mobilenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/mobilenet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/mobilenetv2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/mobilenetv2.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/pnasnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/pnasnet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/preresnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/preresnet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/resnet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/resnext.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/resnext.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/senet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/senet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/shufflenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/shufflenet.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/shufflenetv2.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/shufflenetv2.py -------------------------------------------------------------------------------- /pytorch/cifar10_models/vgg.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/cifar10_models/vgg.py -------------------------------------------------------------------------------- /pytorch/customized_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/customized_models.py -------------------------------------------------------------------------------- /pytorch/deepshift/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pytorch/deepshift/convert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/convert.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/__init__.py: -------------------------------------------------------------------------------- 1 | from .kernels import * -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cpu/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cpu/setup.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cpu/shift_cpu.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cpu/shift_cpu.cpp -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/__init__.py: -------------------------------------------------------------------------------- 1 | from .convert_to_unoptimized import * -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/convert_to_unoptimized.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/convert_to_unoptimized.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/setup.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/shift.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/shift.cu -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/shift_cuda.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/shift_cuda.cpp -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/unoptimized_conv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/unoptimized_conv.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/unoptimized_cuda.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/unoptimized_cuda.cpp -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/unoptimized_cuda_kernel.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/unoptimized_cuda_kernel.cu -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/cuda/unoptimized_linear.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/cuda/unoptimized_linear.py -------------------------------------------------------------------------------- /pytorch/deepshift/kernels/kernels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/kernels/kernels.py -------------------------------------------------------------------------------- /pytorch/deepshift/modules.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/modules.py -------------------------------------------------------------------------------- /pytorch/deepshift/modules_q.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/modules_q.py -------------------------------------------------------------------------------- /pytorch/deepshift/ste.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/ste.py -------------------------------------------------------------------------------- /pytorch/deepshift/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/deepshift/utils.py -------------------------------------------------------------------------------- /pytorch/imagenet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/imagenet.py -------------------------------------------------------------------------------- /pytorch/install_kernels.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/install_kernels.sh -------------------------------------------------------------------------------- /pytorch/mnist.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/mnist.py -------------------------------------------------------------------------------- /pytorch/optim/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/optim/__init__.py -------------------------------------------------------------------------------- /pytorch/optim/optim_shift.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/optim/optim_shift.py -------------------------------------------------------------------------------- /pytorch/optim/radam.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/optim/radam.py -------------------------------------------------------------------------------- /pytorch/optim/ranger.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/optim/ranger.py -------------------------------------------------------------------------------- /pytorch/torchsummary/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/torchsummary/__init__.py -------------------------------------------------------------------------------- /pytorch/torchsummary/torchsummary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/torchsummary/torchsummary.py -------------------------------------------------------------------------------- /pytorch/unoptimized/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/__init__.py -------------------------------------------------------------------------------- /pytorch/unoptimized/convert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/convert.py -------------------------------------------------------------------------------- /pytorch/unoptimized/kernels/__init__.py: -------------------------------------------------------------------------------- 1 | from .kernels import * -------------------------------------------------------------------------------- /pytorch/unoptimized/kernels/cuda/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/kernels/cuda/setup.py -------------------------------------------------------------------------------- /pytorch/unoptimized/kernels/cuda/unoptimized.cu: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/kernels/cuda/unoptimized.cu -------------------------------------------------------------------------------- /pytorch/unoptimized/kernels/cuda/unoptimized_cuda.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/kernels/cuda/unoptimized_cuda.cpp -------------------------------------------------------------------------------- /pytorch/unoptimized/kernels/kernels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/kernels/kernels.py -------------------------------------------------------------------------------- /pytorch/unoptimized/modules/conv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/modules/conv.py -------------------------------------------------------------------------------- /pytorch/unoptimized/modules/linear.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/pytorch/unoptimized/modules/linear.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mostafaelhoushi/DeepShift/HEAD/requirements.txt --------------------------------------------------------------------------------