Hardware acceleration for on-device Machine Learning