FlexACC: A programmable accelerator with application-specific ISA for flexible deep neural network inference